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:
Paul Gschwendtner
2019-04-10 18:49:28 +02:00
committed by Alex Rickabaugh
parent 205a45e9a8
commit 0d6c9d36a1
2 changed files with 3 additions and 3 deletions

View File

@ -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>();