feat(pipes): add support for pure pipes
By default, pipes are pure. This means that an instance of a pipe will be reused and the pipe will be called only when its arguments change. BREAKING CHANGE Before: @Pipe({name: 'date'}) class DatePipe {} defines an impure pipe. After: @Pipe({name: 'date'}) class DatePipe {} defines a pure pipe. @Pipe({name: 'date', pure: false}) class DatePipe {} defines an impure pipe. Closes #3966
This commit is contained in:
@ -398,10 +398,8 @@ export interface QueryFactory {
|
||||
* ```
|
||||
*/
|
||||
export interface PipeFactory {
|
||||
(obj: {name: string}): any;
|
||||
new (obj: {
|
||||
name: string,
|
||||
}): any;
|
||||
(obj: {name: string, pure?: boolean}): any;
|
||||
new (obj: {name: string, pure?: boolean}): any;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user