microsoft / microsoft/TypeScript

Add ability to get emit output from the API

オープン
#63,851 コメント 0 件 リアクション 2 件 担当者 1 名 GitHub で見る

@andrewbranch がすでに取り組んでいます。

2026年7月15日 から。

Needs Investigation
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
2日 4時間
マージ済み PR(30日)
132

説明

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: microsoft/TypeScript#63843 similar, but only mentions declaration files.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。