How to run the TypeScript compiler on a website
I would like to run the TypeScript compiler on a website to build something like a playground on the TypeScript site TypeScript Playground .
Unlike running tsc on the server side, I would like to run the compilation directly in JS. I've searched for any similar posts here and any description in the TypeScript language spec, but I can't find any information on that.
+3
source to share
2 answers
There is documentation for the TS Compiler API and typestring is a wrapper that is still meant to be used in NodeJS, but you can use that as a starting point.
0
source to share