-
Notifications
You must be signed in to change notification settings - Fork 469
group Jsx
modules
#7347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
group Jsx
modules
#7347
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.
tests/analysis_tests/tests-generic-jsx-transform/src/GenericJsx.res
Outdated
Show resolved
Hide resolved
runtime/Jsx.res
Outdated
module Event = JsxEvent | ||
module DOM = { | ||
type style = DOMStyle.t | ||
type domRef |
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 think it is problematic that the types defined here (other than style
) are different from those in JsxDOM
. They should all be aliases.
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.
JsxDOM.domProps.children
is of type Jsx.element
, defining a alias here creates a cyclic dependency Jsx.cmj -> JsxDOM.cmj -> Jsx.cmj
Unless we create a file Jsx_common.res
to put the common values/types
25f43c3
to
668ccb3
Compare
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/win32-x64
commit: |
dfb8221
to
1f70005
Compare
@@ -9,6 +9,4 @@ | |||
|
|||
This has type: [1;31mfloat[0m | |||
But children passed to this component must be of type: | |||
[1;33mReact.element[0m [2m(defined as[0m [1;33mJsx.element[0m[2m)[0m | |||
|
|||
In JSX, all content must be JSX elements. You can convert float to a JSX element with [1;33mReact.float[0m. |
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.
We are losing the improved error messages here, so it seems that some adjustment to the error handling logic is missing. /cc @zth
Creates a top-level module for
Jsx
. It contains the following submodules:Jsx.DOMStyle
Jsx.Event
Jsx.DOM
Deprecate
JsxDOM.res
,JsxDOMStyle
andJsxEvent
With these changes we can have a section in the sidebar menu for the
Jsx
module containingDOM
,DOMStyle
andEvent