politie / sherlock

A reactive programming library for JavaScript applications, built with TypeScript.
Apache License 2.0
39 stars 11 forks source link

typings of DerivableProxy and Derivable have deviated #199

Closed emielb closed 3 years ago

emielb commented 3 years ago

The type of the reaction parameter of Derivable.react() has changed from (value: V) => void to (value: V, stop: () => void) => void. The type of the same parameter of DerivableProxy.$react() does still not include the stop() function as a parameter.

This does not usually cause much trouble, but it is a bug, and causes compilation errors when using the ValuePipe from @politie/ngx-sherlock on DerivableProxys.

Proposed fix: add the stop() function parameter to DerivableProxy.$react's reaction parameter.