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