You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add ability to get emit output from the API #63851
Our internal tool uses the TypeScript compiler to generate JS output from TS. While there are other solutions that perform TS->JS transpilation, since we already use the TS API we would like to also get the JS output from it (as well as declarations and source maps). In the Strada API this was possible using program.emit.
Possible solution: Add back the program.emit method. Instead of accepting a write-file callback (which would incur IPC overhead per file when called from Go), return the output files as an array in the response. The method should also accept an array of files so that multiple files can be emitted in a single round-trip.
Limitation: This approach currently would not allow us to get the tsbuildinfo file with the per file variant. Then again the API currently does not seem to use incremental programs anyway.
Related: #63843 similar, but only mentions declaration files.
Activity