refactor(ivy): first pass at extracting ReflectionHost for abstract reflection (#24541)
ngtsc needs to reflect over code to property compile it. It performs operations such as enumerating decorators on a type, reading metadata from constructor parameters, etc. Depending on the format (ES5, ES6, etc) of the underlying code, the AST structures over which this reflection takes place can be very different. For example, in TS/ES6 code `class` declarations are `ts.ClassDeclaration` nodes, but in ES5 code they've been downleveled to `ts.VariableDeclaration` nodes that are initialized to IIFEs that build up the classes being defined. The ReflectionHost abstraction allows ngtsc to perform these operations without directly querying the AST. Different implementations of ReflectionHost allow support for different code formats. PR Close #24541
This commit is contained in:

committed by
Miško Hevery

parent
84272e2227
commit
10da6a45c6
@ -488,4 +488,4 @@ export function parseHostBindings(host: {[key: string]: string}): {
|
||||
});
|
||||
|
||||
return {attributes, listeners, properties, animations};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user