Skip to content

Missing types for default export #203

@jelhan

Description

@jelhan

Using the latest version with TypeScript 5.3.3 I'm seeing the following error:

Could not find a declaration file for module 'testdouble-qunit'. '/home/main/Code/open-source/ember-popper-modifier/node_modules/.pnpm/[email protected]/node_modules/testdouble-qunit/dist/index.modern.js' implicitly has an 'any' type.

There are types at '/home/main/Code/open-source/ember-popper-modifier/node_modules/testdouble-qunit/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'testdouble-qunit' library may need to update its package.json or typings.

The project defines two exports:

"exports": {
"require": "./dist/index.js",
"default": "./dist/index.modern.js"
},

But the build only includes types for the require export in dist/index.d.ts. Types for the default export seems to be missing. I can "fix" the issue if copying the dist/index.d.ts to dist/index.modern.d.ts in node_modules/testdouble-qunit.

I noticed the same issue with another package of yours: alexlafroscia/qunit-wait-for#300

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