Skip to content

Commit 6a47b60

Browse files
authored
Merge pull request mobxjs#930 from jamsea/fix/flowWhen
Fix MobX flow typings for when
2 parents bca27a8 + ae06173 commit 6a47b60

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

flow-typed/mobx.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,8 @@ declare module 'mobx' {
312312
declare function runInAction<T>(block: () => T, scope?: any): T;
313313
declare function isAction(thing: any): boolean;
314314
declare function autorun(nameOrFunction: string | (r: IReactionPublic) => any, viewOrScope?: any, scope?: any): any;
315-
declare function when(predicate: () => boolean, effect: Lambda, scope?: any): any
315+
declare function when(name: string, cond:() => boolean, effect: Lambda, scope?: any): any
316+
declare function when(cond:() => boolean, effect: Lambda, scope?: any): any
316317
declare function autorunAsync(func: (r: IReactionPublic) => any, delay?: number, scope?: any): any
317318
declare function reaction<T>(
318319
expression: (r: IReactionPublic) => T, effect: (arg: T, r: IReactionPublic) => void, fireImmediately?: boolean, delay?: number, scope?: any

0 commit comments

Comments
 (0)