microsoft / microsoft/TypeScript

Add ability to get emit output from the API

Đang mở
#63,851 0 bình luận 2 reaction 1 người được giao Xem trên GitHub

@andrewbranch đang làm issue này rồi.

Từ ngày 15/7/2026.

Needs Investigation
Ngôn ngữ chính
Go
Star
111k
Fork
14.3k
Merge trung bình
2 ngày 4 giờ
Pull request đã merge (30 ngày)
132

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.