I get the following error:
error TS2307: Cannot find module 'easydl/utils' or its corresponding type declarations.
Based on the following TypeScript code (TS 5.6.3) in an ESM project:
import { clean as easyDlClean } from "easydl/utils";
My tsconfig:
This works though:
import { clean as easyDlClean } from "easydl/dist/utils.js";
Should you be simply exporting the clean function from the main file instead?
I get the following error:
Based on the following TypeScript code (TS 5.6.3) in an ESM project:
My tsconfig:
{ "compilerOptions": { /* Base Options: */ "esModuleInterop": true, "skipLibCheck": true, "target": "ES2022", "allowJs": true, "outDir": "dist", "moduleDetection": "force", "moduleResolution": "NodeNext", "isolatedModules": true, "verbatimModuleSyntax": true, /* Strictness */ "strict": true, "noUncheckedIndexedAccess": true, "noImplicitOverride": true, /* AND if you're building for a library: */ "declaration": false, /* If NOT transpiling with TypeScript: */ "module": "NodeNext", "noEmit": true, /* If your code doesn't run in the DOM: */ "lib": ["es2022"] } }This works though:
Should you be simply exporting the
cleanfunction from the main file instead?