Skip to content
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

Create-Interface command in uncurried mode does not preserve @react.component #772

Closed
fhammerschmidt opened this issue May 21, 2023 · 1 comment · Fixed by #810
Closed

Comments

@fhammerschmidt
Copy link
Member

Consider the following example:

@react.component
let make = (~name="") => <div />

In ReScript 11.0.0-alpha.6 with "uncurried": false when using the create-interface command, this is the resulting .resi:

@react.component
let make: (~name: string=?) => Jsx.element

but when I set "uncurried": true, this is the result:

type props<'name> = {name?: 'name}
let make: (. props<string>) => Jsx.element

I expected it to be the same as before.

@fhammerschmidt fhammerschmidt changed the title Create-Interface-Command in uncurried mode does not preserve @react.component Create-Interface command in uncurried mode does not preserve @react.component May 21, 2023
@cristianoc
Copy link
Collaborator

Indeed it will need to support uncurried types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants