The TypeScript 7 repository (codenamed Corsa) contains a high-performance Go reimplementation of the TypeScript compiler, language service, and associated developer tooling. This project aims to provide a faster, native experience while maintaining compatibility with the existing TypeScript ecosystem.
For detailed information about specific subsystems:
SourceFile, Symbol, and Type, and behavioral differences, see Key Concepts and Artifacts.This repository implements a multi-layered architecture to serve different host environments:
tsc/): The core engine providing scanning, parsing, type checking, and emitting. It is written in Go for performance.packages/typescript/): A Node.js package that wraps the Go binary, providing a familiar interface for the JavaScript ecosystem packages/typescript/README.md1-7packages/vscode-typescript/): The integration layer for Visual Studio Code that utilizes the native compiler.Sources: README.md1-10 packages/typescript/README.md1-7 go.work1-6
The project bridges the Go-native space and the Node.js/TypeScript space through a set of defined entry points and protocols.
Sources: tsc/cmd/tsc/main.go1-20 packages/typescript/README.md11-17 packages/vscode-typescript/src/extension.ts1-20 tsc/internal/api/server.go1-30
The Corsa compiler is organized into a pipeline that transforms source text into semantic models and eventually JavaScript output.
Sources: tsc/internal/compiler/program.go1-30 tsc/internal/checker/checker.go1-30 tsc/internal/ls/languageservice.go1-30 tsc/internal/project/project.go1-30
This diagram maps the natural language phases of compilation to the specific Go entities used in the repository.
Sources: tsc/internal/compiler/program.go1-50 tsc/internal/parser/parser.go1-50 tsc/internal/checker/checker.go1-50 tsc/internal/compiler/emitter.go1-50
| Directory | Purpose | Key Components |
|---|---|---|
tsc/ | Core Go compiler & services | internal/checker/, internal/parser/, internal/ls/ |
packages/typescript/ | Node.js API wrapper | src/api/, src/ast/, bin/tsgo |
packages/vscode-typescript/ | VS Code extension | src/extension.ts, src/client.ts |
tools/ | Build & codegen utilities | scripts/tsc/ast.json, customlint/ |
tsc/testdata/ | Test suites & baselines | tests/cases/, baselines/ |
Sources: go.work1-6 package.json9-11 packages/typescript/README.md1-24
The repository uses a hybrid build system. Go code is managed via go.work go.work1-6 while the overall orchestration (including codegen and extension builds) is handled by hereby package.json13-25
Sources: package.json13-25 go.work1-6 Herebyfile.mjs1-50
For detailed information about the monorepo structure and entrypoints, see Repository Tour and Package Layout. For definitions of the core compiler artifacts, see Key Concepts and Artifacts.