cefn / watchable

Repo for @watchable/store and supporting packages.
MIT License
5 stars 1 forks source link

Don't wrap Selected in Immutable #33

Closed cefn closed 1 year ago

cefn commented 1 year ago

Wrapping inferred Selected itself in a further Immutable is unnecessary and problematic.

If the return type of the Selector is Immutable when passed an Immutable<State>, then it will be inferred as such. In practice wrapping Selected in Immutable ends up with cases where some T or Immutable<T> ends up being assigned to Immutable<Immutable<T>> which throws errors.