8000 `[<ReactComponent>]` in typescript will always transpile args to `any` · Issue #645 · fable-hub/Feliz · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[<ReactComponent>] in typescript will always transpile args to any #645

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

Open
Freymaurer opened this issue Feb 13, 2025 · 0 comments · May be fixed by #646
Open

[<ReactComponent>] in typescript will always transpile args to any #645

Freymaurer opened this issue Feb 13, 2025 · 0 comments · May be fixed by #646

Comments

@Freymaurer
Copy link
Contributor
Freymaurer commented Feb 13, 2025

Using [<ReactComponent>], will currently create a Fable.Ident with Fable.Any

let makeIdent name: Fable.Ident =
    { Name = name
      Type = Fable.Any
      IsCompilerGenerated = true
      IsThisArgument = false
      IsMutable = false
      Range = None }

To allow for nice type creation we need to pass arg names and types to it.

This would allow for nicer creation of ReactComponents in F# and publishing them to npm.

Will open a PR for this soon! 🙂

Freymaurer added a commit to Freymaurer/Feliz that referenced this issue Feb 13, 2025
@Freymaurer Freymaurer linked a pull request Feb 13, 2025 that will close this issue
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.

1 participant
0