-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Use module: node16
in types
#68
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @Gerrit0!
Would it make sense to set the resolution in the TypeScript config file, so this is tested going forward?
mdast-util-to-hast/tsconfig.json
Lines 3 to 7 in 7d20e86
"compilerOptions": { | |
"target": "ES2020", | |
"lib": ["ES2020"], | |
"module": "ES2020", | |
"moduleResolution": "node", |
It looks like there is an unrelated typescript error, a breaking change in the latest minor TS release which will take some looking into. (Doesn't need to be a part of this PR, but if you have a moment to open a PR resolving it, it could accelerate being able to merge this PR 🙂 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module: node16
in types
This comment has been minimized.
This comment has been minimized.
Thanks, released in 12.2.5! |
Initial checklist
Description of changes
Adds a
.js
file extension to the type import forcomplex-types.d.ts
. This is necessary for TypeScript projects using"module": "Node16"
to compile without errors:Yes, the
.js
file extension looks wrong... but it isn't. TypeScript will still resolve the import to the declaration file.Without this change, the build still does not pass, due to three type errors, likely due to installing a newer TypeScript version than was used to write this package (package-lock.json is a good thing!), I opted not to fix this at this time.
cc: @gaurishhs