Closed
Description
Add this issue to keep track of the work for supporting typescript out of the box, in the PR you can find documentation etc...
The main idea is to use type-stripping.
This is achieved ideally through the use of an external dependency, in my opinion @swc/wasm-typescript.
I would like to have something basic and usable to propose to the public.
Tracking points to discuss:
- Support commonjs syntax
- SourceMaps (enabling them with a flag)
- Type stripping on
.cts
- Add a flag to enable transformation to support TS only features (enums etc...)
- Extension guessing (
.js
because of transpilation => but at runtime is a TS) - Transpiling
.ts
files in the node_modules - TypeScript linting
- Externalize swc wasm
Roadmap: #217