Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Supporting polymorphic function arguments #114

Closed
thangngoc89 opened this issue Dec 23, 2018 · 1 comment
Closed

Supporting polymorphic function arguments #114

thangngoc89 opened this issue Dec 23, 2018 · 1 comment

Comments

@thangngoc89
Copy link
Collaborator

It's very common in JS for a function to accept polymorphic arguments. Bucklescript has support for this via bs.unwrap directive.

[@bs.unwrap] [
    | `Str(string)
    | `Int(int)
  ]

It would be lovely to have this in genType as well

@thangngoc89 thangngoc89 changed the title Supporting polymorphic function Supporting polymorphic function arguments Dec 23, 2018
@cristianoc
Copy link
Collaborator

In #118.

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

No branches or pull requests

2 participants