-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
module: add module.stripTypeScriptTypes #55282
base: main
Are you sure you want to change the base?
Conversation
Review requested:
|
7c1529b
to
ecc1d82
Compare
ecc1d82
to
56fcf17
Compare
I think it makes more sense for it to be just in its own API as a function, which can be used to strip the type before the text is passed into any of the |
56fcf17
to
80fa828
Compare
there's also #54250 |
eca9ab2
to
f41d422
Compare
Unfortunately it seems to have been stalled for a while. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #55282 +/- ##
=======================================
Coverage 88.41% 88.41%
=======================================
Files 653 654 +1
Lines 187497 187497
Branches 36101 36069 -32
=======================================
+ Hits 165767 165770 +3
+ Misses 14968 14960 -8
- Partials 6762 6767 +5
|
50afe56
to
9ab643f
Compare
I think this could be benefited from a dedicated module |
Maybe putting it on module also makes sense? Or module.typescript if we can foresee adding other typescript-related utilities in the future |
I'm ok with a new module, I think parser is ok, I'd like to hear more opinions about it |
If we decide to ship it I'll drop the vm commits |
If this needs to be a new module, then it should be added to node/lib/internal/bootstrap/realm.js Line 130 in b4e8f1b
require('parser') without the node: prefix, otherwise it breaks https://www.npmjs.com/package/parser or anyone creating an alias of parser in node_modules.
|
76ff249
to
4fbcb6c
Compare
I moved it to the |
4d72bec
to
f7f29c3
Compare
f7f29c3
to
5ee1b1d
Compare
f7f29c3
to
065f06f
Compare
5961f8a
to
f4f5067
Compare
f4f5067
to
c1c262a
Compare
Looks like this is moving forward, removing TSC agenda lable after discussion in todays meeting, please re-add if there is still something the TSC needs to discuss |
its still blocked by @anonrig review |
I propose having a vote on this. @nodejs/tsc |
This PR introduces a new api in
node:module
.Fixes: #54300