I built tsrun, a minimal TypeScript runtime designed for embedding. It runs JavaScript and TypeScript seamlessly. The main use case is config files where you want IDE autocompletion and type checking.
Features:
- Full TypeScript: enums, interfaces, decorators, generics, namespaces
- ES modules, async/await, classes, generators, destructuring
- Embed via C API or WASM (browsers, Node, Go/wazero)
Backstory:
This is a side project of a side project of a side project. Started as an engine for transformation logic in a CLI tool I was building, where I wanted rich autocompletion in the editor. Somehow the interpreter became the main thing.
You can play with it on wasm playground https://tsrun.org/playground/