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

Incorrect default export #30

Open
rubiesonthesky opened this issue Mar 3, 2024 · 0 comments
Open

Incorrect default export #30

rubiesonthesky opened this issue Mar 3, 2024 · 0 comments

Comments

@rubiesonthesky
Copy link

After updating my local project to use moduleResolution: nodenext, I noticed that type checking is no longer working.

Checking with Are types wrong tool, it seems to be reporting same problem https://arethetypeswrong.github.io/?p=ssl-checker%402.0.9

Problems
❗️ Incorrect default export

  • The resolved types use export default where the JavaScript file appears to use module.exports =. This will cause TypeScript under the node16 module mode to think an extra .default property access is required, but that will likely fail at runtime. These types should use export = instead of export default.

The problem probably stems that this package has both cjs and esm output and those need little bit different type definitions 🙈

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