-
-
Notifications
You must be signed in to change notification settings - Fork 37.5k
TypeScript Support #43816
Copy link
Copy link
Closed
Labels
feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.loadersIssues and PRs related to ES module loaders.Issues and PRs related to ES module loaders.never-staleIssues and PRs exempt from automated stale handling.Issues and PRs exempt from automated stale handling.
Description
Activity
Metadata
Metadata
Assignees
Labels
feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.loadersIssues and PRs related to ES module loaders.Issues and PRs related to ES module loaders.never-staleIssues and PRs exempt from automated stale handling.Issues and PRs exempt from automated stale handling.
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