You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected:
computedFrom operator should allow type narrowing
Small example using filterNil() to reproduce:
n=signal<number|undefined|null>(3);// filter with typeguard is workingx$=of(this.n()).pipe(filter((x): x is number=>Boolean(x)),map((x)=>(xasnumber)+1));// filterNil has typeguard alreadyy$=of(this.n()).pipe(filterNil(),map((x)=>x+1));// but with computedFrom it failes to narrowz$=computedFrom([this.n],pipe(filterNil(),map(([x])=>x+1)// x is possibly null or undefined));
z$ should act like y$
I can’t find why this happens, @nartc might help here
Expected:
computedFrom operator should allow type narrowing
Small example using filterNil() to reproduce:
z$ should act like y$
I can’t find why this happens, @nartc might help here
Originally posted by @tomer953 in #73 (comment)
The text was updated successfully, but these errors were encountered: