microsoft/TypeScript
Glossary
Project-specific terms used throughout the codebase. For broader TypeScript language vocabulary (generics, conditional types, etc.) consult the TypeScript handbook.
Core compiler terms
- AST / Node — the parsed syntax tree. Every parsed token, expression, statement, and declaration is a
Nodewith akind: SyntaxKind. See primitives/node. - SourceFile — the root
Nodeof one parsed.ts/.tsx/.js/.d.tsfile. See primitives/source-file. - SyntaxKind — the enum (in
src/compiler/types.ts) that tags every node and every token. - Symbol — the binder's record of a named declaration. One symbol can have multiple
declarations(e.g., merged interfaces). See primitives/symbol. - Type — the checker's view of a value. Types are usually flyweighted via
TypeFlags. See primitives/type. - Signature — a function or constructor signature (parameters, return type, type parameters). See primitives/signature.
- FlowNode — a node in the flow graph the binder produces and the checker walks for control-flow narrowing.
- Diagnostic — a single error/warning/suggestion message produced by the compiler or the language service. See primitives/diagnostic.
- Path — a branded
stringfor an absolute, normalized, canonical filesystem path. Created bytoPath(). Used as a key into source-file/program maps. - Program — the immutable bundle of source files, options, references, and the lazily created type checker. See systems/program.
- CompilerHost / LanguageServiceHost — the abstraction the compiler/language-service uses to talk to a filesystem-like environment. See systems/program and systems/language-service.
Pipeline phases
- Scan — turn text into tokens (
scanner.ts). - Parse — turn tokens into a tree (
parser.ts); producesSourceFile. - Bind — walk the tree to compute symbols, container relationships, flow nodes (
binder.ts). - Check — answer type queries on demand (
checker.ts). - Transform — lower newer syntax/semantics into older targets (
transformer.ts,transformers/*). - Emit — print transformed trees as
.js,.d.ts, or source maps (emitter.ts). - Resolve — find the file referenced by an
importspecifier (moduleNameResolver.ts,resolutionCache.ts).
Editor / project terms
tsserver— the standalone language server process (src/server/).- Project —
tsserver's runtime concept of a compilation unit. Variants:ConfiguredProject(backed by atsconfig.json),InferredProject(loose files),ExternalProject(driven by an embedder like Visual Studio's project system),AutoImportProvider(a derived project used to compute auto-imports). - ScriptInfo —
tsserver's record for one file: its open/closed state, content snapshot, attached projects, etc. (src/server/scriptInfo.ts) - EditorServices — the project-graph manager owned by
tsserver(src/server/editorServices.ts). - Refactor / CodeFix — language-service operations that produce file edits. See features/refactors-and-codefixes.
- Fourslash — the DSL used in
tests/cases/fourslash/for language-service tests. See how-to-contribute/testing.
Build / tooling terms
- LKG — last known good. The compiler under
lib/used to bootstrap a build.hereby LKGpromotes the local build into LKG. - hereby — the gulp-style task runner that drives builds, tests, lint, and packaging.
- dprint — the formatter used by
hereby format. - Knip — dead-code/unused-export checker run by
hereby knip. - Baseline — an expected-output snapshot under
tests/baselines/reference/. Tests compare their output to baselines and fail on diff. - Twoslash — a comment-marker DSL inside
.tstest files used for cursor positions, error expectations, and other meta-information.
ATA / typings
- ATA — Automatic Type Acquisition.
tsserveraskstypingsInstallerto fetch@types/*packages for plain JavaScript projects so editor features work. See systems/automatic-type-acquisition. - Typings cache — the per-user directory where ATA stores acquired packages.
Module / target terms
- Target — the JavaScript output level (
ES5,ES2015, …,ES2022,ESNext). Selects which transformers run and which library.d.tsfiles are loaded. - Module — the module-system kind for emit and import resolution:
none,commonjs,amd,umd,system,es2015,es2020,es2022,esnext,node16,node18,node20,nodenext,preserve. - Library —
--libcontrols whichlib.*.d.tsdeclaration files are auto-included. - Project references — multi-project builds via
referencesintsconfig.json. See systems/build-mode.
Diagnostic categories
Error— fatal type or syntax error (red squiggle).Warning— non-fatal but flagged.Suggestion— surfaced only by the language service (e.g., unused-symbol suggestions).Message— informational (used for things like "Cannot find name" hints).
Frequently-used abbreviations
| Abbrev | Meaning |
|---|---|
| LS | Language service |
| LSH | Language service host |
| CFA | Control-flow analysis |
| TSC | The compiler executable (tsc) |
| LKG | Last known good (the bootstrapping compiler in lib/) |
| DOM lib | The auto-generated lib.dom.d.ts |
| ATA | Automatic type acquisition |
| RWC / RWA | Real-world-code test runner (legacy) |
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.