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

Fix .d.ts extension usage in type declaration exports #335

Closed
MajorLift opened this issue Jun 25, 2024 · 1 comment · Fixed by #336 or #337
Closed

Fix .d.ts extension usage in type declaration exports #335

MajorLift opened this issue Jun 25, 2024 · 1 comment · Fixed by #336 or #337
Assignees

Comments

@MajorLift
Copy link
Contributor

MajorLift commented Jun 25, 2024

We should set up ts-bridge to generate and expose unambiguous .d.cts and .d.mts type declarations only.

Using .d.ts causes issues in downstream projects that have their moduleResolution option set to Node16 or NodeNext.

e.g.

error TS2307: Cannot find module '@metamask/providers' or its corresponding type declarations.

https://github.com/MetaMask/core/actions/runs/9668650800/job/26673339021?pr=3645

@mcmire
Copy link
Contributor

mcmire commented Jun 25, 2024

@MajorLift I believe that this is one of the design goals of ts-bridge and so it does this by default. If you view the latest version of @metamask/utils you can see separate .d.cts and .d.mts files: https://npmfs.com/package/@metamask/utils/8.5.0/dist/

@MajorLift MajorLift reopened this Jun 26, 2024
@MajorLift MajorLift linked a pull request Jun 26, 2024 that will close this issue
@MajorLift MajorLift reopened this Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants