Skip to content

Commit 3ba2d24

Browse files
authored
Merge pull request mobxjs#824 from newoga/feature/improve-flow-typing-action
Improve flow typing for action method
2 parents 94a11b1 + 5cab298 commit 3ba2d24

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

flow-typed/mobx.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ declare module 'mobx' {
301301
declare function extendShallowObservable(target: any): any;
302302

303303
declare function action(targetOrName: any, propertyKeyOrFuc?: any, descriptor?: PropertyDescriptor): any;
304+
declare function action<T>(name: string, func: T): T;
305+
declare function action<T>(func: T): T;
304306
declare function runInAction<T>(name: string, block: () => T, scope?: any): T;
305307
declare function runInAction<T>(block: () => T, scope?: any): T;
306308
declare function isAction(thing: any): boolean;

0 commit comments

Comments
 (0)