* Initializes the flags on the current node, setting all indices to the initial index, * the directive count to 0, and adding the isComponent flag. * @param index the initial index
(tNode: TNode, index: number, numberOfDirectives: number)
| 552 | * @param index the initial index |
| 553 | */ |
| 554 | function initTNodeFlags(tNode: TNode, index: number, numberOfDirectives: number) { |
| 555 | ngDevMode && |
| 556 | assertNotEqual( |
| 557 | numberOfDirectives, |
| 558 | tNode.directiveEnd - tNode.directiveStart, |
| 559 | 'Reached the max number of directives', |
| 560 | ); |
| 561 | tNode.flags |= TNodeFlags.isDirectiveHost; |
| 562 | // When the first directive is created on a node, save the index |
| 563 | tNode.directiveStart = index; |
| 564 | tNode.directiveEnd = index + numberOfDirectives; |
| 565 | tNode.providerIndexes = index; |
| 566 | } |
| 567 | |
| 568 | function assertNoDuplicateDirectives(directives: DirectiveDef<unknown>[]): void { |
| 569 | // The array needs at least two elements in order to have duplicates. |
no test coverage detected
searching dependent graphs…