Open-Source Wikis

/

TypeScript

/

Lore

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 transformersrc/compiler/transformers/es2015.ts exists 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.ts first commit 49d2d933 on 2016-02-09).
  • tsserver matures — the src/server/ project takes shape, gaining editorServices.ts, project.ts, scriptInfo.ts, and the JSON command protocol used by VS Code, Sublime, Atom, and Vim plugins.
  • Project referencestsbuild.ts and tsbuildPublic.ts arrive in src/compiler/ to support tsc -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 transformersrc/compiler/transformers/legacyDecorators.ts is split out in commit cb1bc616 on 2022-06-03, separating decorator-metadata-emit from the rest of the TS transformer.
  • Stage-3 ECMAScript decoratorssrc/compiler/transformers/esDecorators.ts first appears in commit 5b189796 on 2023-01-19 as part of the @stage-3 decorator implementation.
  • node16 / nodenext module modes — module resolution is rewritten to support package.json exports, dual-package hazards, and .mjs / .cjs.
  • bundler module 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 rule no-direct-import enforces the pattern. Herebyfile.mjs and the build scripts under scripts/build/ orchestrate the resulting layout.
  • Decorators v2. The decorators transformer was split into legacyDecorators.ts (the original TS-flavoured experimentalDecorators) and esDecorators.ts (the standards-track Stage-3 form) in 2022–2023.
  • Module resolution rewrite. moduleNameResolver.ts (~3,400 lines) accreted node16, nodenext, and bundler modes alongside the original node and classic modes; resolutionCache.ts was 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 to hereby (the Herebyfile.mjs at 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 @types and TypeScript-aware bundlers.
  • JavaScript file checking (allowJs + checkJs) — actively maintained but no longer the centrepiece of "JS users get TypeScript benefits"; explicit .ts migration 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.ts keeps 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 by tsc's self-build constraints and the need for a stable public API surface bundled into one typescript.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.

Lore – TypeScript wiki | Factory