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
I am trying to use flow together with the seamless-immutable package, and add a declaration so it would typecheck. I get strange error:
declareclassImmutableExt<T>{merge(x : any,options : ?any) : Immutable<T>;}typeImmutable<T>=T&ImmutableExt<T>;declarefunctionimmutable<T>(x : T) : Immutable<T>;typeProgressState=Immutable<{failedActions: Array<any>,succeededActions: Array<any>}>;functionprogress(state/*: ?ProgressState */)/*: ProgressState */{if(!state){returnimmutable({failedActions: [],succeededActions: []});}else{returnstate;}// curiously, if I only have return state, without any if's, it typechecks}
33: merge(x : any, options : ?any) : Immutable<T>;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ property `merge`. Property not found in
45: return state;
^^^^^ object type
Found 1 error
The text was updated successfully, but these errors were encountered:
Hi!
I am trying to use flow together with the seamless-immutable package, and add a declaration so it would typecheck. I get strange error:
The text was updated successfully, but these errors were encountered: