Node.js API for https://github.com/microsoft/typescript-go project
npm install @typescript-go/api@typescript-go/apiThis project is an experimental Node.js binding for https://github.com/microsoft/typescript-go.
> 🚀 Help me to become a full-time open-source developer by sponsoring me on Github
We have only few api at this moment:
``ts
import { transform } from '@typescript-go/api'
transform('const a: number = 1;', '/absolute/path/a.ts')
// 'const a = 1;\n'
`
`ts
import { runProject } from '@typescript-go/api'
// equivalent to tsc -p ./rust/tsconfig.json``
runProject('./rust/tsconfig.json')