-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
TypeScript Support #43816
Copy link
Copy link
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.loadersIssues and PRs related to ES module loadersIssues and PRs related to ES module loadersnever-staleMark issue so that it is never considered staleMark issue so that it is never considered stale
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.loadersIssues and PRs related to ES module loadersIssues and PRs related to ES module loadersnever-staleMark issue so that it is never considered staleMark issue so that it is never considered stale
What is the problem this feature will solve?
With TypeScript becoming ubiquitous these days, and alternative js runtimes presenting TypeScript support as a value proposition to users, I think it would be good for node.js to support it out of the box too.
Currently, users have to explicitly run
ts-nodeto run ts files without a pre-compile step. This only applies to the main process, programs that spawn processes that need to run TypeScript also have to requirets-node.ts-nodeby default doesn't use the optimized transpilers like swc that have popped up recently. There's further configuration to do to get that speed boost.It's more ergonomic when the runtime supports typescript without configuration.
What is the feature you are proposing to solve the problem?
Include a typechecker + transpiler in node.js that'll activate when .ts files are loaded.
What alternatives have you considered?
No response