* Creates a new instance of LQuery and returns its index in the collection of LQuery objects. * * @returns index in the collection of LQuery objects
(tView: TView, lView: LView, flags: QueryFlags)
| 471 | * @returns index in the collection of LQuery objects |
| 472 | */ |
| 473 | function createLQuery<T>(tView: TView, lView: LView, flags: QueryFlags): number { |
| 474 | const queryList = new QueryList<T>( |
| 475 | (flags & QueryFlags.emitDistinctChangesOnly) === QueryFlags.emitDistinctChangesOnly, |
| 476 | ); |
| 477 | |
| 478 | storeCleanupWithContext(tView, lView, queryList, queryList.destroy); |
| 479 | |
| 480 | const lQueries = (lView[QUERIES] ??= new LQueries_()).queries; |
| 481 | return lQueries.push(new LQuery_(queryList)) - 1; |
| 482 | } |
| 483 | |
| 484 | export function createViewQuery<T>( |
| 485 | predicate: ProviderToken<unknown> | string[] | string, |
no test coverage detected
searching dependent graphs…