Skip to content

TypeScript Support #43816

Closed
Closed
@avin-kavish

Description

@avin-kavish

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-node to 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 require ts-node. ts-node by 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.loadersIssues and PRs related to ES module loadersnever-staleMark issue so that it is never considered stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions