refactor(compiler-cli): abstract type check block metadata to be AST-free#67482
Open
atscott wants to merge 1 commit intoangular:21.2.xfrom
Open
refactor(compiler-cli): abstract type check block metadata to be AST-free#67482atscott wants to merge 1 commit intoangular:21.2.xfrom
atscott wants to merge 1 commit intoangular:21.2.xfrom
Conversation
…free This commit refactors the template type checking metadata interfaces to use detached, serializable metadata rather than retaining direct references to ts.Node or ts.Declaration instances. A new tcb_adapter translates traditional TypeScript AST-bound metadata into these decoupled structures. This abstraction lays the groundwork for supporting native preprocessors (such as Rust or ts-go) which serialize metadata over JSON rather than passing live TypeScript objects. Key changes: - Introduced TcbDirectiveMetadata, TcbComponentMetadata, TcbReferenceMetadata, and TcbPipeMetadata to replace TypeCheckableDirectiveMeta where appropriate. - Substituted deep TS compilation AST references with string module names and source spans to preserve out-of-band diagnostic capabilities. - Detached generic typeParameters and transformType properties into synthesized, standalone TS mappings. - Updated generateTypeCheckBlock and corresponding Operations to consume the new metadata.
Contributor
Author
|
Blocked on 21.2.2 release, to split TCB refactorings across multiple releases in case we need to narrow down an unforeseen issue |
crisbeto
approved these changes
Mar 6, 2026
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.
(cherry pick for patch)