module: expose configureTypeScript()#64556
Conversation
|
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #64556 +/- ##
=======================================
Coverage 90.24% 90.25%
=======================================
Files 739 739
Lines 241698 241774 +76
Branches 45556 45558 +2
=======================================
+ Hits 218129 218210 +81
- Misses 15103 15106 +3
+ Partials 8466 8458 -8
🚀 New features to boost your workflow:
|
Signed-off-by: Rishikmanche <rishikmanche@gmail.com>
8662c0d to
9f90dfe
Compare
|
I'm not sure this is a good idea. I think it would make it harder to release breaking changes in Amaro, and it would complicate configuring Node itself because now there's a runtime way to configure this subsystem in addition to the CLI flags and config file. |
What's your preferred approach for users who need to customize TypeScript behavior programmatically? Is there a pattern you'd recommend instead? |
This PR resolves issue #64518 by exposing the full Amaro loader API via
node:module.Specifically:
module.configureTypeScript()throughnode:modulemode: 'transform'inmodule.stripTypeScriptTypes()kTransformedTypeScriptandkTransformedTypeScriptWithSourceMapsisUnderNodeModulescheck whennodeModulesis enabled in configurationextensionFormatMap