MCPcopy Create free account
hub / github.com/angular/angular / ɵɵdefinePipe

Function ɵɵdefinePipe

packages/core/src/render3/definition.ts:593–616  ·  view source on GitHub ↗
(pipeDef: {
  /** Name of the pipe. Used for matching pipes in template to pipe defs. */
  name: string;

  /** Pipe class reference. Needed to extract pipe lifecycle hooks. */
  type: Type<T>;

  /** Whether the pipe is pure. */
  pure?: boolean;

  /**
   * Whether the pipe is standalone.
   */
  standalone?: boolean;
})

Source from the content-addressed store, hash-verified

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

Callers 2

SayHelloPipeClass · 0.90
nameless_pipe.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected