Skip to content

"clean" is not properly exported #26

@slhck

Description

@slhck

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:

{
	"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:

import { clean as easyDlClean } from "easydl/dist/utils.js";

Should you be simply exporting the clean function from the main file instead?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions