refactor(compiler): export static-query detection logic (#29815)
The `@angular/compiler` package currently contains the logic for determining whether given queries are used statically or dynamically. This logic would be necessary in order to build a schematic that leverages the Angular compiler API's in order to simulate the query timing based on what ViewEngine computed at compilation-time/runtime. Exporting the logic that is necessary to detect the timing should not affect the public API as the `@angular/compiler` package is denoted as private in `PUBLIC_API.md` PR Close #29815
This commit is contained in:
parent
205a45e9a8
commit
0d6c9d36a1
|
@ -85,7 +85,7 @@ export * from './schema/dom_element_schema_registry';
|
|||
export * from './selector';
|
||||
export * from './style_compiler';
|
||||
export * from './template_parser/template_parser';
|
||||
export {ViewCompiler} from './view_compiler/view_compiler';
|
||||
export {ViewCompiler, findStaticQueryIds, staticViewQueryIds} from './view_compiler/view_compiler';
|
||||
export {getParseErrors, isSyntaxError, syntaxError, Version} from './util';
|
||||
export {SourceMap} from './output/source_map';
|
||||
export * from './injectable_compiler_2';
|
||||
|
|
|
@ -1023,7 +1023,7 @@ interface StaticAndDynamicQueryIds {
|
|||
}
|
||||
|
||||
|
||||
function findStaticQueryIds(
|
||||
export function findStaticQueryIds(
|
||||
nodes: TemplateAst[], result = new Map<TemplateAst, StaticAndDynamicQueryIds>()):
|
||||
Map<TemplateAst, StaticAndDynamicQueryIds> {
|
||||
nodes.forEach((node) => {
|
||||
|
@ -1056,7 +1056,7 @@ function findStaticQueryIds(
|
|||
return result;
|
||||
}
|
||||
|
||||
function staticViewQueryIds(nodeStaticQueryIds: Map<TemplateAst, StaticAndDynamicQueryIds>):
|
||||
export function staticViewQueryIds(nodeStaticQueryIds: Map<TemplateAst, StaticAndDynamicQueryIds>):
|
||||
StaticAndDynamicQueryIds {
|
||||
const staticQueryIds = new Set<number>();
|
||||
const dynamicQueryIds = new Set<number>();
|
||||
|
|
Loading…
Reference in New Issue