fix(ivy): make pipe invocation locality neutral (#22030)

PR Close #22030
This commit is contained in:
Miško Hevery
2018-02-05 13:28:38 -08:00
parent 7a406a3896
commit efc67ee5ef
3 changed files with 23 additions and 22 deletions

View File

@ -795,11 +795,11 @@ export interface Pipe {
/**
* If Pipe is pure (its output depends only on its input.)
*
* Normally pipe's `translate` method is invoked on each change detection
* cycle. If the cost of invoking the `translated` method is non-trivial and
* if the output of the pipe depends only on its input, then declaring a pipe
* as pure would short circuit the invocation of the `translate` method and
* invoke the method only when the inputs to the pipe change.
* Normally pipe's `transform` method is only invoked when the inputs to pipe`s
* `transform` method change. If the pipe has internal state (it's result are
* dependant on state other than its arguments) than set `pure` to `false` so
* that the pipe is invoked on each change-detection even if the arguments to the
* pipe do not change.
*/
pure?: boolean;
}