- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.9k
 
Closed
Description
Currently, if you do
if (typeof x === "function") {
  // ...
}
then Flow knows that the code within the if statement is a function. This doesn't work if you instead call a helper function like Underscore's _.isFunction. Similarly, utilities like Object.assign and React.PropTypes seem to have hardcoded behavior at the AST level, so they don't work when aliased or given alternative names.
Will it be possible to teach Flow about these sorts of functions so that it's possible to use these third-party libraries without changing code too much?
ryanashcraft, notadrill, philikon, junosuarez, vsheyanov and 62 moretlrobinson, vadimgoncharov, vashchukmaksim, arabold, jeremistadler and 8 more