diff --git a/packages/core/src/render3/interfaces/query.ts b/packages/core/src/render3/interfaces/query.ts index 110e73163f..c69542a7de 100644 --- a/packages/core/src/render3/interfaces/query.ts +++ b/packages/core/src/render3/interfaces/query.ts @@ -69,11 +69,9 @@ export interface LQueries { */ track( queryList: QueryList, predicate: Type|string[], descend?: boolean, - read?: QueryReadType|Type): void; + read?: Type): void; } -export class QueryReadType { private defeatStructuralTyping: any; } - // Note: This hack is necessary so we don't erroneously get a circular dependency // failure based on types. export const unusedValueExportToPlacateAjd = 1; diff --git a/packages/core/src/render3/query.ts b/packages/core/src/render3/query.ts index 921642a88c..1245e208ed 100644 --- a/packages/core/src/render3/query.ts +++ b/packages/core/src/render3/query.ts @@ -24,7 +24,7 @@ import {DirectiveDef, unusedValueExportToPlacateAjd as unused1} from './interfac import {unusedValueExportToPlacateAjd as unused2} from './interfaces/injector'; import {TContainerNode, TElementContainerNode, TElementNode, TNode, TNodeFlags, TNodeType, unusedValueExportToPlacateAjd as unused3} from './interfaces/node'; import {LQueries, QueryReadType, unusedValueExportToPlacateAjd as unused4} from './interfaces/query'; -import {LViewData, TVIEW} from './interfaces/view'; +import {DIRECTIVES, LViewData, TVIEW} from './interfaces/view'; import {flatten, isContentQueryHost} from './util'; import {createElementRef, createTemplateRef} from './view_engine_compatibility'; @@ -48,7 +48,7 @@ export interface QueryPredicate { /** * Indicates which token should be read from DI for this query. */ - read: QueryReadType|Type|null; + read: Type|null; } /** @@ -95,7 +95,7 @@ export class LQueries_ implements LQueries { track( queryList: viewEngine_QueryList, predicate: Type|string[], descend?: boolean, - read?: QueryReadType|Type): void { + read?: Type): void { if (descend) { this.deep = createQuery(this.deep, queryList, predicate, read != null ? read : null); } else { @@ -337,8 +337,7 @@ function addMatch(query: LQuery, matchingValue: any): void { query.list.setDirty(); } -function createPredicate( - predicate: Type| string[], read: QueryReadType| Type| null): QueryPredicate { +function createPredicate(predicate: Type| string[], read: Type| null): QueryPredicate { const isArray = Array.isArray(predicate); return { type: isArray ? null : predicate as Type, @@ -349,7 +348,7 @@ function createPredicate( function createQuery( previous: LQuery| null, queryList: QueryList, predicate: Type| string[], - read: QueryReadType| Type| null): LQuery { + read: Type| null): LQuery { return { next: previous, list: queryList,