How vercel-labs/tsc-ts works
tsc-ts is an experimental TypeScript compiler port, with a CLI and a tsc-compatible API server. Its main workflow takes project files and compiler options through program construction, parsing and semantic analysis, then emits JavaScript or declarations and diagnostics. The graph also preserves documented incremental/build, module-resolution, and language-service capabilities. Source-index references and the README support the broad compiler relationships; unsampled implementation details are grouped rather than traced as specific calls.
Main entry points: main.ts CLI Entry · checker.ts Type Checker · program.ts Program Setup · parser.ts Parser and AST
Components 20
Compiler Front End
- Program Setup
packages/tsc-ts/src/compiler/program.ts - Scanner
packages/tsc-ts/src/compiler/scanner.ts - Parser and AST
packages/tsc-ts/src/compiler/parser.ts - Syntax Model
packages/tsc-ts/src/compiler/ast.ts
Semantic Analysis
- Binder
packages/tsc-ts/src/compiler/binder-utilities.ts - Symbols
packages/tsc-ts/src/compiler/symbol.ts - Module Resolution
packages/tsc-ts/src/compiler/module-resolution.ts - Type Checker
packages/tsc-ts/src/compiler/checker.ts - Type System
packages/tsc-ts/src/compiler/checker-types.ts - Type Inference
packages/tsc-ts/src/compiler/checker-inference.ts
Compiler Outputs
- JavaScript Emit
packages/tsc-ts/src/compiler/emitter.ts - Declaration Emit
packages/tsc-ts/src/compiler/transformers/declarations.ts - Build and Incremental
packages/tsc-ts/src/compiler/tsc-build.ts - Diagnostics
packages/tsc-ts/src/compiler/diagnostics.ts
User Interfaces
- CLI Entry
packages/tsc-ts/src/main.ts - API Server
packages/tsc-ts/src/api/server.ts - API Session
packages/tsc-ts/src/api/session.ts - Language Services
packages/tsc-ts/src/services/completions.ts
Other components
- Developer
- Compiler Results
Connections 22
- Developer → CLI Entry: runs project
README.md - CLI Entry → Program Setup: creates program
packages/tsc-ts/src/main.ts - Program Setup → Parser and AST: parses files
packages/tsc-ts/src/compiler/program.ts - Parser and AST → Scanner: scans tokens
packages/tsc-ts/src/compiler/parser.ts - Parser and AST → Syntax Model: builds syntax tree
packages/tsc-ts/src/compiler/parser.ts - Program Setup → Module Resolution: resolves modules
packages/tsc-ts/src/compiler/program.ts - Developer → Binder: uses compiler
README.md - Binder → Symbols: creates symbols
packages/tsc-ts/src/compiler/binder-utilities.ts - Developer → Type Checker: checks types
README.md - Type Checker → Type System: uses type model
packages/tsc-ts/src/compiler/checker.ts - Type Checker → Type Inference: infers types
packages/tsc-ts/src/compiler/checker.ts - CLI Entry → API Server: starts server
packages/tsc-ts/src/main.ts - API Server → API Session: handles sessions
packages/tsc-ts/src/api/server.ts - API Session → Type Checker: queries compiler
packages/tsc-ts/src/api/session.ts - API Session → Language Services: supports queries
README.md - Developer → Build and Incremental: builds incrementally
README.md - Developer → JavaScript Emit: requests emit
README.md - Developer → Declaration Emit: requests declarations
README.md - CLI Entry → Diagnostics: reports diagnostics
packages/tsc-ts/src/main.ts - JavaScript Emit → Compiler Results: writes output
README.md - Declaration Emit → Compiler Results: writes declarations
README.md - Diagnostics → Compiler Results: returns diagnostics
README.md