Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve flow typing for action method
This commit adds better flow typing for the `action()` method. Using flowtype's method overloading feature, I have added two new type definitions: `action(name: string, func: T): T` `action(func: T): T` The existing `action()` type definition returned `any`, which caused type information from passed wrapped functions to be lost. The new type definitions return the same type of function that is passed as an argument so that type information for the function is not lost when wrapping the function in `action()`. github.com/newoga
- Loading branch information