Open-Source Wikis

/

TypeScript

/

By the numbers

microsoft/TypeScript

By the numbers

A quantitative snapshot of the microsoft/TypeScript codebase.

Data collected on 2026-04-30, against commit f350b52331494b68c90ab02e2b6d0828d2a22a74 on main (TypeScript 6.0.0).

Repo at a glance

Metric Value
Total commits 36,754
Distinct authors (raw) 922
First commit 2014-07-07
Latest commit on main 2026-04-27
TypeScript source files (src/**.ts) 709
TypeScript source lines ~452,600
Test files (tests/cases/**.ts) 18,876
Diagnostic messages 2,130
Top-level src/ projects 17

Source size by area

xychart-beta horizontal
    title "Lines of TypeScript by directory"
    x-axis ["src/lib (incl. DOM .d.ts)", "src/compiler", "src/testRunner", "src/services", "src/server", "src/harness", "src/jsTyping + typingsInstaller"]
    y-axis "Lines" 0 --> 220000
    bar [73594, 192559, 82061, 65478, 18733, 17650, 1209]

Notes:

  • src/lib/ is dominated by the auto-generated dom.generated.d.ts (45,109 lines) and webworker.generated.d.ts (15,590 lines). Excluding those leaves ~13k lines of hand-written lib.*.d.ts.
  • src/testRunner/ includes the unit-test sources for the compiler/services. The tests/cases/ and tests/baselines/ directories add tens of thousands more files but are not TypeScript source.

Largest source files

Lines File Role
54,434 src/compiler/checker.ts Type checker
45,109 src/lib/dom.generated.d.ts Generated DOM declarations
15,590 src/lib/webworker.generated.d.ts Generated WebWorker declarations
12,447 src/compiler/utilities.ts Compiler-wide utilities
10,823 src/compiler/parser.ts Parser
10,670 src/compiler/types.ts Core type definitions and SyntaxKind
7,542 src/compiler/factory/nodeFactory.ts AST node factory
6,378 src/compiler/emitter.ts Emitter
6,173 src/services/completions.ts Completion provider
5,727 src/server/editorServices.ts tsserver project graph
5,215 src/harness/fourslashImpl.ts Fourslash test runtime
5,201 src/compiler/program.ts Program/Compilation orchestration

checker.ts alone is roughly 12% of all source lines and 28% of src/compiler/.

Activity

xychart-beta horizontal
    title "Commits per calendar year"
    x-axis ["2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024", "2025", "2026"]
    y-axis "Commits" 0 --> 7000
    bar [3328, 6550, 6156, 5121, 5176, 3125, 2140, 1243, 1330, 1305, 916, 280, 84]

Commit volume peaked in 2015–2018 during TypeScript's most active feature-addition era and has trended down ever since. The drop in 2024–2025 reflects the maintenance-mode posture and the work pivoting to microsoft/typescript-go.

2025 monthly commits

Month Commits
2025-01 40
2025-02 33
2025-03 11
2025-04 12
2025-05 10
2025-06 54
2025-07 20
2025-08 9
2025-09 20
2025-10 31
2025-11 13
2025-12 27

The June 2025 spike is mostly merge work for the 5.9 release branch.

Bot-attributed commits

git log reveals at least 1,233 commits with bot attribution (matched on Co-authored-by:, dependabot[bot], github-actions[bot], Copilot, etc.). That's approximately 3.4% of the project history. Recent windows show a higher share — in 2025, dependabot[bot] and Copilot together accounted for roughly 50 of the 280 commits (~18%). This is a lower bound on AI-assisted work since IDE-integrated tools leave no trace in git history.

Test inventory

Test category Path Files
Compiler tests/cases/compiler/ ~13,000
Conformance (organised by language area) tests/cases/conformance/ ~5,800 across 50+ subdirectories
Fourslash (language-service) tests/cases/fourslash/ ~3,500
Project (multi-file project tests) tests/cases/project/ hundreds
Transpile tests/cases/transpile/ small
Unit (Mocha) tests/cases/unittests and src/testRunner/unittests/ hundreds

The corresponding tests/baselines/reference/ directory holds the expected output snapshots for each compiler test. A full run produces ~150,000 baseline files.

TODO / FIXME / HACK comments

grep -E '\b(TODO|FIXME|HACK)\b' over src/ yields 468 occurrences across 111 files. The hottest are:

File Count
src/compiler/checker.ts 59
src/server/session.ts 34
src/harness/client.ts 23
src/services/services.ts 21
src/compiler/parser.ts 15
src/services/refactors/extractSymbol.ts 13
src/services/completions.ts 13
src/compiler/program.ts 12

Many TODO: GH#NNNN comments link to long-standing GitHub issues.

Dependency footprint

The main package.json has 0 runtime dependenciestypescript ships its own bundle. Dev dependencies number ~40 and include @dprint/formatter, @octokit/rest, chai, chokidar, dprint, esbuild, eslint 10, glob, hereby, knip, mocha, playwright, source-map-support, tslib, the typescript-eslint family, and miscellaneous Azure-DevOps utilities. See reference/dependencies.

Source-file vs test-file ratio

The ratio of test files to source files is roughly 27 : 1 (18,876 : 709). For a compiler that aspires to TC39-tracking conformance and to backwards compatibility with a decade of user code, that is a feature, not an indictment.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

By the numbers – TypeScript wiki | Factory