refactor(ivy): rename `PipeDef.n` to `PipeDef.factory` (#23883)
The original reason for this property to be short no longer holds true, as pipes always need to be defined using `definePipe`. PR Close #23883
This commit is contained in:
parent
e53179ef8c
commit
b87d650da2
|
@ -431,7 +431,7 @@ export function definePipe<T>(pipeDef: {
|
|||
}): never {
|
||||
return (<PipeDef<T>>{
|
||||
name: pipeDef.name,
|
||||
n: pipeDef.factory,
|
||||
factory: pipeDef.factory,
|
||||
pure: pipeDef.pure !== false,
|
||||
onDestroy: pipeDef.type.prototype.ngOnDestroy || null
|
||||
}) as never;
|
||||
|
|
|
@ -204,12 +204,9 @@ export interface PipeDef<T> {
|
|||
name: string;
|
||||
|
||||
/**
|
||||
* factory function used to create a new directive instance.
|
||||
*
|
||||
* NOTE: this property is short (1 char) because it is used in
|
||||
* component templates which is sensitive to size.
|
||||
* Factory function used to create a new pipe instance.
|
||||
*/
|
||||
n: () => T;
|
||||
factory: () => T;
|
||||
|
||||
/**
|
||||
* Whether or not the pipe is pure.
|
||||
|
|
|
@ -33,7 +33,7 @@ export function pipe(index: number, pipeName: string): any {
|
|||
pipeDef = tView.data[index] as PipeDef<any>;
|
||||
}
|
||||
|
||||
const pipeInstance = pipeDef.n();
|
||||
const pipeInstance = pipeDef.factory();
|
||||
store(index, pipeInstance);
|
||||
return pipeInstance;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue