Skip to content

Mention / Compare with new node typescript support #944

@SimonSiefke

Description

@SimonSiefke

With the new node version 24, node can also execute typescript files.

Previously I've used

node --import @swc-node/register/esm-register src/index.ts

Now

node src/index.ts

This doesn’t seem to mentioned in the current SWC Node documentation. But I think it worth adding a note, that while Node’s native TypeScript support seems to have some limitations like no support for enums or tsx code, it can be a useful alternative for executing typescript code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions