-
Notifications
You must be signed in to change notification settings - Fork 38
jsx: allow locally abstract types and type constraints on @react.component definitions #487
jsx: allow locally abstract types and type constraints on @react.component definitions #487
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -0,0 +1,6 @@ | |||
@obj external makeProps: (~a: a, ~b: 'b, ~key: string=?, unit) => {"a": a, "b": 'b} = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note this won't compile: type a
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the transform is incorrect. Will revert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@glennsl reverted the PR for now, we'll need a new PR with a fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crap. Shouldn't have assumed the tests were run through the compiler. I'll fix. I suspect this will make it a much more invasive change though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we also have a concrete piece of UI code to verify the result?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can certainly make one. Is there anywhere I can put this, or do you just want something to test manually on the side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a gist is ok, we don't have "full stack integration tests", so manual it is.
This one won't compile: @react.component
let make = (type a, ~a: a, ~b, _) => <div /> gives
|
No description provided.