mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
8e37df6dab0d44ac8f1ea452afc70708b7851387
--- #1254 added inference for hooks loaded from globals. This is the only time we need to generate a type equation assigning `lval` to a resolved`Hook` type. @gsathya Would love to get your feedback here on the change. From my understanding, this change is technically incorrect, since the type equation we generate should be dependent on the `callee` type (i.e. `Hook` if callee is a hook, `Function` if callee is a function). Would the next step be to consolidate `Hook` and `Function` types? ```js type Function { ... isHook: boolean, // set by inference } type FunctionSignature { isHook: boolean, // set when adding to ShapeRegistry } ```
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%