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

Provide correct types when using cjs with moduleResolution:nodenext #79

Merged
merged 2 commits into from
Sep 21, 2024

Conversation

ef4
Copy link
Collaborator

@ef4 ef4 commented Sep 21, 2024

When typescript is using moduleResolution:nodenext, our d.ts file is always treats as ESM due to our type: "module" in package.json.

But when we're actually providing a cjs implementation, we need typescript to see a cjs declaration file as well.

When typescript is using moduleResolution:nodenext, our d.ts file is always treats as ESM due to our `type: "module"` in package.json.

But when we're actually providing a cjs implementation, we need typescript to see a cjs declaration file as well.
@ef4 ef4 merged commit d024873 into main Sep 21, 2024
1 check passed
@ef4 ef4 deleted the cjs-types branch September 21, 2024 15:32
@ef4 ef4 added the bug Something isn't working label Sep 21, 2024
@github-actions github-actions bot mentioned this pull request Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant