This repository was archived by the owner on Apr 24, 2021. It is now read-only.
This repository was archived by the owner on Apr 24, 2021. It is now read-only.
Undefined variables inside React component callbacks have a wrong type #14
Closed
Description
It seems like if I have a callback in my react component, I can reference undefined variables without the extension seeing a problem and it even has a type:
Js.Fn.arity1<
option<React.element> => unit
>
type arity1<'a> = {I1: 'a}
This react component is inline in a call to a arity1 function showModal(. <Component ... />)
which might be relevant.
If I do the same in a more normal spot, at the bottom of my functional component, I get a similar behavior but with this type instead:
(
string,
~props: option<ReactDOMRe.props>,
array<React.element>
) => React.element
If I cmd+click it, it jumps to ReasonReact's createElement
external function
Metadata
Metadata
Assignees
Labels
No labels