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

How to set parameters? #288

Closed
forki opened this issue Jul 27, 2016 · 3 comments
Closed

How to set parameters? #288

forki opened this issue Jul 27, 2016 · 3 comments

Comments

@forki
Copy link
Collaborator

forki commented Jul 27, 2016

type ImagePicker =
    abstract member showImagePicker: (ImagePickerOptions * (ImagePickerResult -> unit)) -> unit

renders to

$import1.showImagePicker([p, result => {}]);

why is the array generated? I would expect

$import1.showImagePicker(p, result => {});
@forki
Copy link
Collaborator Author

forki commented Jul 27, 2016

/cc @Krzysztof-Cieslak

@alfonsogarciacaro
Copy link
Member

Apparently the F# compiler is interpreting that you're passing an actual tuple to the method (maybe because of the parens in the signature) which Fable translates to JS arrays.

@forki
Copy link
Collaborator Author

forki commented Jul 27, 2016

right. without parens it works as well. thx

@forki forki closed this as completed Jul 27, 2016
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

No branches or pull requests

2 participants