Skip to main content

Module project_refs

Module project_refs 

Source
Expand description

Project References Support

This module implements TypeScript project references, which enable:

  • Splitting large codebases into smaller projects
  • Faster incremental builds through project-level caching
  • Better editor support with scoped type checking
  • Cleaner dependency management between project boundaries

§Key Concepts

  • Composite Project: A project with composite: true that can be referenced
  • Project Reference: A { path: string, prepend?: boolean } entry in tsconfig.json
  • Build Order: Topologically sorted order of projects based on dependencies
  • Declaration Output: .d.ts files that reference consuming projects use

Structs§

CompositeCompilerOptions
Extended CompilerOptions with composite project settings
ProjectReference
A project reference as specified in tsconfig.json
ProjectReferenceGraph
Graph of project references for build ordering
ResolvedProject
A resolved project with its configuration and metadata
ResolvedProjectReference
A resolved reference to another project
TsConfigWithReferences
Extended TsConfig that includes project references

Functions§

get_declaration_output_path
Get the declaration output path for a source file in a composite project
load_project
Load a project from its tsconfig.json path
parse_tsconfig_with_references
Parse tsconfig with references support
resolve_cross_project_import
Resolve an import from a referencing project to a referenced project’s declarations
validate_composite_project
Validate that a project meets composite requirements

Type Aliases§

ProjectId
Unique identifier for a project in the reference graph