mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
It's not safe to infer types of arguments and return values because Javascript is so polymorphic. Instead just infer the type of the callee for non methods. Interestingly, even this is not conservative enough for JavaScript because Proxy can also be callable. But I think for our use cases we will treat Proxy and Functions similarly (they're all just objects) so it's ok.