Commit edd5a7c
Add Mode A
Introduce contextual `brand type Name = Lit | Lit` with dual type/value
binding, synthesized `.is`/`.from`, runtime companion emit, and nominal
assignability that still accepts matching string literals.
Co-authored-by: Cursor <cursoragent@cursor.com>brand type for finite string literal brands.1 parent f29aeb9 commit edd5a7c
32 files changed
Lines changed: 1146 additions & 196 deletions
File tree
- packages/typescript/src/ast
- tools/scripts/tsc
- tsc
- internal
- api/encoder
- ast
- binder
- checker
- parser
- scanner
- transformers/tstransforms
- testdata
- baselines/reference/compiler
- tests/cases/compiler
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
| |||
330 | 331 | | |
331 | 332 | | |
332 | 333 | | |
| 334 | + | |
333 | 335 | | |
334 | 336 | | |
335 | 337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| 198 | + | |
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments