← All notes

TypeScript project references

Answer: Project references (TypeScript 3.0+) split a codebase into smaller projects, each with its own tsconfig, that reference one another.

Setup

// packages/app/tsconfig.json
{
  "compilerOptions": { "outDir": "dist" },
  "references": [{ "path": "../core" }]
}

// packages/core/tsconfig.json
{ "compilerOptions": { "composite": true, "declaration": true, "outDir": "dist" } }

composite

Referenced projects need composite: true. It enforces constraints so build tools can tell quickly whether a project is up to date:

Build mode

tsc -b            # build everything needed
tsc -b --watch
tsc -b --clean

Build mode automatically builds referenced projects when needed.

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted).

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: TypeScript (Microsoft), TypeScript: Documentation - Project References, CC BY 4.0 (microsoft/TypeScript-Website); TypeScript (Microsoft), TypeScript: TSConfig Option: composite, CC BY 4.0 (microsoft/TypeScript-Website).

Cite this

Permanent ID: iil:note:ygxprkp6

iinventedlight. 2026. "TypeScript project references." iinventedlight Library, iil:note:ygxprkp6, version of 2026-11-04. https://iinventedlight.com/library/notes/typescript-project-references/. License: CC-BY-4.0.

@misc{iil_note_ygxprkp6,
  author = {{iinventedlight}},
  title = {{TypeScript project references}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-04},
  url = {https://iinventedlight.com/library/notes/typescript-project-references/},
  note = {Permanent ID iil:note:ygxprkp6. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt. This page in Markdown: /library/notes/typescript-project-references.md.