| 585 | * @codeGenApi |
| 586 | */ |
| 587 | export function ɵɵdefinePipe<T>(pipeDef: { |
| 588 | /** Name of the pipe. Used for matching pipes in template to pipe defs. */ |
| 589 | name: string; |
| 590 | |
| 591 | /** Pipe class reference. Needed to extract pipe lifecycle hooks. */ |
| 592 | type: Type<T>; |
| 593 | |
| 594 | /** Whether the pipe is pure. */ |
| 595 | pure?: boolean; |
| 596 | |
| 597 | /** |
| 598 | * Whether the pipe is standalone. |
| 599 | */ |
| 600 | standalone?: boolean; |
| 601 | }): PipeDef<T> { |
| 602 | return { |
| 603 | type: pipeDef.type, |
| 604 | name: pipeDef.name, |
| 605 | factory: null, |
| 606 | pure: pipeDef.pure !== false, |
| 607 | standalone: pipeDef.standalone ?? true, |
| 608 | onDestroy: pipeDef.type.prototype.ngOnDestroy || null, |
| 609 | }; |
| 610 | } |
| 611 | |
| 612 | function getNgDirectiveDef<T>(directiveDefinition: DirectiveDefinition<T>): DirectiveDef<T> { |
| 613 | const declaredInputs: Record<string, string> = {}; |