Repository navigation
Remove vestigial immediate keyword. - #65612
Merged
Daniel Rosenwasser (DanielRosenwasser) merged 1 commit intoNov 21, 2026
Merged
Conversation
Daniel Rosenwasser (DanielRosenwasser)
requested review from
Ryan Cavanaugh (RyanCavanaugh),
Anders Hejlsberg (ahejlsberg),
Andrew Branch (andrewbranch) and
Jake Bailey (jakebailey)
and
a balanced review from Copilot
November 20, 2026 23:42
Copilot started reviewing on behalf of
Daniel Rosenwasser (DanielRosenwasser)
November 20, 2026 23:42
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
An explicit regression test for immediate is still needed because the existing keyword-map-derived test would not catch its accidental restoration as a keyword.
1 open issue
5 files not reviewed
tsc/internal/api/encoder/decoder_generated.go: Generated filetsc/internal/api/enum_values_generated.go: Generated filetsc/internal/ast/ast_generated.go: Generated filetsc/internal/ast/kind_generated.go: Generated filetsc/internal/ast/kind_stringer_generated.go: Generated file
What changed in this PR
Removes the vestigial immediate keyword from the compiler and JavaScript API, cleaning up syntax support associated with the unmerged experiments.
Changes:
- Treats
immediateas an identifier rather than a keyword. - Removes
ImmediateKeywordfrom the AST schema and generated token handling. - Updates generated Go and JavaScript syntax-kind values and declarations consistently.
| File | Description |
|---|---|
tsc/internal/scanner/scanner.go |
Removes immediate from keyword lookup. |
tsc/internal/ast/kind_stringer_generated.go |
Updates kind names and numeric offsets. |
tsc/internal/ast/kind_generated.go |
Removes the kind and updates token-union comments. |
tsc/internal/ast/ast_generated.go |
Removes the kind from generated token handling. |
tsc/internal/api/enum_values_generated.go |
Removes the exported enum mapping. |
tsc/internal/api/encoder/decoder_generated.go |
Removes the decoder’s keyword case. |
tools/scripts/tsc/ast.json |
Removes the keyword from the source schema. |
packages/typescript/src/ast/ast.generated.ts |
Updates keyword and token type unions. |
packages/typescript/enums/syntaxKind.js |
Updates runtime enum values and boundaries. |
packages/typescript/enums/syntaxKind.d.ts |
Aligns enum declarations with runtime values. |
Review effort: Balanced
| "get": ast.KindGetKeyword, | ||
| "if": ast.KindIfKeyword, | ||
| "immediate": ast.KindImmediateKeyword, | ||
| "implements": ast.KindImplementsKeyword, |
Jake Bailey (jakebailey)
approved these changes
Nov 20, 2026
Andrew Branch (andrewbranch)
approved these changes
Nov 20, 2026
Daniel Rosenwasser (DanielRosenwasser)
enabled auto-merge
November 20, 2026 23:59
Daniel Rosenwasser (DanielRosenwasser)
deleted the
immediate_hmmMaybeLater
branch
November 21, 2026 00:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

It's not clear how this snuck into the codebase. I know we had #58729 and #59580, but they never got merged in. In fact, if you pull up the 6.0 branch, I couldn't find any
immediatekeyword there. So I'm not sure how we ported this in.