binder
The compiler phase that links every name in the code to the declaration it refers to and records which scope it lives in.
In more detail
After parsing, the binder creates symbols, the compiler's record of each declared name, and connects each use to its symbol. This lets the checker know that two mentions of user are the same variable. It also merges declarations that share a name, such as two interfaces.
Related terms
- compiler pipeline — The ordered stages the TypeScript compiler runs: scan and parse into a syntax tree, bind names, check types, then emit JavaScript.
- scope claim — A token claim listing the permissions a client was granted, such as catalog.write.
- identifier — A name or number that picks out exactly one thing, such as one container, one image or one database row.
Taught in
- The Compiler Pipeline: tsc, AST And Code Emission — Production TypeScript
- Tuples: Fixed Length, Labeled Elements And Variadic Tuples — Production TypeScript