-
Notifications
You must be signed in to change notification settings - Fork 471
Open
Description
Consider
module WebAPI = {
module DOMAPI = {
type element
}
}
let elementRefCorrect : React.ref<Nullable.t<WebAPI.DOMAPI.element>> = React.useRef(Nullable.null)
let elementRef = React.useRef<WebAPI.DOMAPI.element>(Nullable.null)In F#, you can specify the React.useRef<WebAPI.DOMAPI.element> syntax.
I can live with the fact that ReScript doesn't have the same syntax as F#.
But the error message is very confusing:
Type Errors
[E] Line 8, column 30:
The value element can't be found in WebAPI.DOMAPI
The type does exists, whatever I'm going for syntax-wise is the issue here.
Could we improve this?
Thoughts @zth?
Metadata
Metadata
Assignees
Labels
No labels