Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing types for default export #203

Open
jelhan opened this issue Feb 18, 2024 · 0 comments
Open

Missing types for default export #203

jelhan opened this issue Feb 18, 2024 · 0 comments

Comments

@jelhan
Copy link

jelhan commented Feb 18, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant