Skip to content

mohsen1/tsz

Repository files navigation

tsz

tsz is a performance-first TypeScript compiler in Rust. z is for Zang!1 The goal is a correct, fast, drop-in replacement for tsc, with both native and WASM targets.

tsz is built the with help of AI-assistant coding. Many tools and AI models were used during its development.

TypeScript is intentionally unsound. tsz keeps a sound core solver and layers a compatibility engine on top to match TypeScript behavior while preserving correctness where possible.

Status

Warning

This project is not ready for general use yet.

tsz will be released after TypeScript 6 stable is released. tsz will only be compatible with TypeScript 6, not any older versions.

Currently targeting TypeScript@6.0.3

Progress

Type Checker

To ensure tsz is a drop-in replacement for tsc, we run the official TypeScript conformance test suite against it.

Progress: [███████████████████░] 97.0% (12,205/12,582 tests)

Conformance is measured by diagnostic fingerprint comparison: each diagnostic must match tsc in error code, file, line, column, and message.

Emitter

We compare tsz JavaScript/declaration emit output against TypeScript's baseline files to ensure correct code generation.

JavaScript:  [██████████████████░░] 91.2% (12,335 / 13,526 tests)
Declaration: [███████████████░░░░░] 77.0% (1,285 / 1,668 tests)

Language Service

We run TypeScript's fourslash language service tests against tsz-server to measure language service feature coverage (completions, quickinfo, go-to-definition, etc.).

Progress: [████████████████████] 99.9% (6,558 / 6,562 tests)

1: "Zang" is the Persian word for "rust".

About

A performance-first TypeScript checker

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors