(type: Type<any>)
| 511 | ]; |
| 512 | |
| 513 | function shouldAddAbstractDirective(type: Type<any>): boolean { |
| 514 | const reflect = getReflect(); |
| 515 | |
| 516 | if (LIFECYCLE_HOOKS.some((hookName) => reflect.hasLifecycleHook(type, hookName))) { |
| 517 | return true; |
| 518 | } |
| 519 | |
| 520 | const propMetadata = reflect.propMetadata(type); |
| 521 | |
| 522 | for (const field in propMetadata) { |
| 523 | const annotations = propMetadata[field]; |
| 524 | |
| 525 | for (let i = 0; i < annotations.length; i++) { |
| 526 | const current = annotations[i]; |
| 527 | const metadataName = current.ngMetadataName; |
| 528 | |
| 529 | if ( |
| 530 | isInputAnnotation(current) || |
| 531 | isContentQuery(current) || |
| 532 | isViewQuery(current) || |
| 533 | metadataName === 'Output' || |
| 534 | metadataName === 'HostBinding' || |
| 535 | metadataName === 'HostListener' |
| 536 | ) { |
| 537 | return true; |
| 538 | } |
| 539 | } |
| 540 | } |
| 541 | |
| 542 | return false; |
| 543 | } |
no test coverage detected
searching dependent graphs…