microsoft/TypeScript
Lore
A narrative history of the microsoft/TypeScript repository, derived from git history (36,754 commits between 2014-07-07 and 2026-04-27), tag dates, and visible architectural layers in src/.
Eras
Public bring-up (Jul 2014 – Sep 2014)
The repository's public history begins with commit 99ec3a96… on 2014-07-07, "Add snapshot of compiler sources". This is the post-rewrite codebase that became TypeScript 1.1; the earlier C#-then-TypeScript-bootstrapped sources are not in this repo. The first weeks consist of large code drops to populate src/compiler, src/services, and src/harness.
TC39 catch-up (2015 – 2017)
This era contains the majority of the codebase's growth: 17,800+ commits across three years. Major milestones derived from tag dates and directory creation times:
- ES2015 transformer —
src/compiler/transformers/es2015.tsexists since this era and is still the single largest transformer at 5,065 lines. - JSX — JSX support was added Feb 2016 (
src/compiler/transformers/jsx.tsfirst commit49d2d933on 2016-02-09). tsservermatures — thesrc/server/project takes shape, gainingeditorServices.ts,project.ts,scriptInfo.ts, and the JSON command protocol used by VS Code, Sublime, Atom, and Vim plugins.- Project references —
tsbuild.tsandtsbuildPublic.tsarrive insrc/compiler/to supporttsc -b.
Maturity and consolidation (2018 – 2020)
The pace of commits stays high (5,176 in 2018, 3,125 in 2019, 2,140 in 2020) but the work shifts from new language features to perfecting type checking. The conditional-types and mapped-types eras, control-flow analysis improvements, and the --strict family of flags all land here. The checker grows past 30,000 lines.
Modern modules and decorators (2021 – 2023)
- Legacy decorators transformer —
src/compiler/transformers/legacyDecorators.tsis split out in commitcb1bc616on 2022-06-03, separating decorator-metadata-emit from the rest of the TS transformer. - Stage-3 ECMAScript decorators —
src/compiler/transformers/esDecorators.tsfirst appears in commit5b189796on 2023-01-19 as part of the@stage-3decorator implementation. node16/nodenextmodule modes — module resolution is rewritten to support package.jsonexports, dual-package hazards, and.mjs/.cjs.bundlermodule mode — added for ESM-aware bundlers that don't need full Node-style resolution.
Transition to typescript-go (2024 – present)
Commit volume drops sharply: 916 commits in 2024 and only ~280 in 2025. The repository's posture shifts to maintenance only. The June 2025 commit spike (54 commits) corresponds to release-branch work for 5.9. The most recent commits at the time of writing are:
f350b523— "Redirect Claude Code to read AGENTS.md" (2026-04-27)af087e57— "docs: improve Math.sign JSDoc grammar and clarity" (2026-04-27)55423abe— "Update CONTRIBUTING.md with comment automation policy" (2026-04-17)
The AGENTS.md and .github/copilot-instructions.md files explicitly tell coding agents to direct most PRs to microsoft/typescript-go. TypeScript 6.0 is the last JavaScript-based release.
Longest-standing features
These pieces of the codebase have been continuously edited since at least 2014–2015 and remain core today:
| Feature | First seen | Notes |
|---|---|---|
scanner.ts |
2014-07-12 | The lexer; structurally unchanged in shape, repeatedly extended for new tokens. |
parser.ts |
2014-07-12 | Recursive-descent parser; incremental-parse mode added later. |
binder.ts |
2014-07-12 | Symbol-table builder; flow nodes added in the CFA work circa 2016. |
checker.ts |
2014-07-12 | The type checker. Effectively monotonically grown for ~12 years. |
emitter.ts |
2014-07-12 | The JavaScript/declaration printer. |
tsserver JSON protocol |
2015 | Backwards-compatible to the original VS plugin. |
Major rewrites and pivots
- Switch from internal modules (
namespace) to ES modules. The codebase originally used TypeScript namespaces internally. A migration converted everything to ES modules with generated_namespaces/barrels. The local ESLint ruleno-direct-importenforces the pattern.Herebyfile.mjsand the build scripts underscripts/build/orchestrate the resulting layout. - Decorators v2. The decorators transformer was split into
legacyDecorators.ts(the original TS-flavouredexperimentalDecorators) andesDecorators.ts(the standards-track Stage-3 form) in 2022–2023. - Module resolution rewrite.
moduleNameResolver.ts(~3,400 lines) accretednode16,nodenext, andbundlermodes alongside the originalnodeandclassicmodes;resolutionCache.tswas carved out to coordinate caching across watch and project rebuilds. - Build-mode (
tsc -b). Project references and the build orchestrator (tsbuild.ts,tsbuildPublic.ts) were added for incremental multi-project builds. hereby-based build. The build script was migrated from gulp tohereby(theHerebyfile.mjsat the repo root) — a move toward a smaller, ESM-first task runner.
Deprecated areas
src/deprecatedCompat/— a small project that re-introduces previously public APIs that were removed from the main namespaces. Its existence is the cleanest signal of the project's deprecation discipline.- Legacy decorators (
@experimentalDecorators) — still supported but no longer the default; ECMAScript decorators (Stage 3) are the recommended path. src/jsTyping/+src/typingsInstaller/— Automatic Type Acquisition is still shipped but is increasingly displaced by per-package@typesand TypeScript-aware bundlers.- JavaScript file checking (
allowJs+checkJs) — actively maintained but no longer the centrepiece of "JS users get TypeScript benefits"; explicit.tsmigration is the recommended path.
Growth trajectory
- 2014: 3,328 commits in the second half of the year as the public sources land and the TC39-tracking work begins.
- 2015–2018: ~5,000 commits/year; this is when the codebase doubles in size.
- 2019–2023: 1,000–3,000 commits/year — sustained but slower;
checker.tskeeps growing. - 2024: ~916 commits as work begins shifting to typescript-go.
- 2025: ~280 commits; majority are dependabot bumps, release-branch cherry-picks, and the occasional crash fix.
- 2026 (YTD through April): 84 commits, almost all docs and policy updates.
Speculative moments
A few changes in the history don't have a single PR explanation visible from git log alone:
- The decision to keep the
_namespaces/indirection rather than direct ES-module imports appears to have been driven bytsc's self-build constraints and the need for a stable public API surface bundled into onetypescript.d.ts. - The choice to write the next-generation TypeScript in Go rather than continuing in TypeScript itself is documented in the TypeScript 7.0 progress blog post — it appears motivated by ~10× compile-time targets that are difficult to reach in JS without a fundamental rewrite.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.