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 import types #371

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

arjunyel
Copy link

https://arethetypeswrong.github.io/?p=bignumber.js%409.1.2

Fix imports and types by copying bignumber.d.ts to bignumber.d.mts.

Test with: npx @arethetypeswrong/cli@latest --pack .

@AdamVig
Copy link

AdamVig commented Jan 10, 2025

I'm trying to migrate from CommonJS to ES Modules and this issue is getting in the way. I'm seeing errors like the following on tsc:

src/index.ts(20,37): error TS2339: Property 'clone' does not exist on type 'typeof import("node_modules/bignumber.js/bignumber")'.
src/index.ts(22,28): error TS2339: Property 'ROUND_HALF_EVEN' does not exist on type 'typeof import("node_modules/bignumber.js/bignumber")'.

Manually applying the changes from this pull request in node_modules/bignumber.js fixes the build. With those changes, npx @arethetypeswrong/cli@latest --pack node_modules/bignumber.js passes.

@MikeMcl Any hesitation about merging this? I'm happy to help in any way I can.

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

Successfully merging this pull request may close these issues.

2 participants