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
One more case when typescript does not report an error with the sample (link)
import{sample,createEvent,createStore}from"effector";typeAnyObject={name: string;}functionisDefined<T>(value: T|null|undefined): value is T{returnvalue!==null&&value!==undefined;}constvoidEvent=createEvent();conststringEvent=createEvent<string>();const$nullableStore=createStore<AnyObject|null>(null);sample({clock: voidEvent,source: $nullableStore,filter: isDefined,target: stringEvent});
sergeysova
changed the title
Typescript does not report an error with the sample ([link](https://tsplay.dev/w2zJ4w))
Typescript does not report an error with the sampleApr 15, 2023
exportfunctionfilter<T,SextendsT,A>(predicate: (this: A,value: T,index: number)=>value is S,thisArg: A): OperatorFunction<T,S>;exportfunctionfilter<T,SextendsT>(predicate: (value: T,index: number)=>value is S): OperatorFunction<T,S>;exportfunctionfilter<T>(predicate: BooleanConstructor): OperatorFunction<T,TruthyTypesOf<T>>;/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */exportfunctionfilter<T,A>(predicate: (this: A,value: T,index: number)=>boolean,thisArg: A): MonoTypeOperatorFunction<T>;exportfunctionfilter<T>(predicate: (value: T,index: number)=>boolean): MonoTypeOperatorFunction<T>;exportfunctionfilter<T>(predicate: (value: T,index: number)=>boolean,thisArg?: any): MonoTypeOperatorFunction<T>{
One more case when typescript does not report an error with the
sample
(link)Originally posted by @Lonli-Lokli in #811 (comment)
The text was updated successfully, but these errors were encountered: