hn.today

tsc-ts: TypeScript written in TypeScript

github.com39 points47 comments
Screenshot of tsc-ts: TypeScript written in TypeScript

This is an experimental reimplementation of the TypeScript 7.0.2 compiler written in idiomatic TypeScript and packaged to run as a native executable via scriptc. It provides a drop-in tsc-compatible command and API (packages/tsc-ts), reference tsgo builds used for comparison (packages/tsgo), and a documentation site in apps/web. Installation is via npm (tsc-ts), with per-platform native binaries published as optional dependencies; developers can build and pack native or Node builds using the included npm scripts. Required tools for building include Node.js 24+, Go 1.26, and a scriptc host with clang. Build and test scripts are provided to fetch the upstream tsgo snapshot, produce native artifacts, run comparisons, and run a local documentation site.

The implementation is validated against TypeScript-Go’s test corpus (roughly 12,500 files, ~17,000 units) and claims exact parity across critical subsystems: scanner, parser/AST, binder, module resolution, tsconfig handling, CLI/options, diagnostics, JS and declaration emit, incremental/build behavior, and the type checker. An API server exposes the same stdin/stdout tsc API so tools like scriptc can drive it; many language-service methods (completions, JSDoc, references, signatures) are supported, while profiling methods are not. Test, bench, lint, and format commands are included, and the project is released under Apache-2.0.

Read on github.com47 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

My C23 Conventions

My C23 Conventions

Abner Coimbre discusses modern C conventions in C23, emphasizing the use of maybe_unused to handle unused return values and improve code clarity. He also highlights issues with designated initializers not zero-initializing structs, leading to more careful struct initialization practices. (abner.page)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.