Fable: How to set parameters?

Created on 27 Jul 2016  路  3Comments  路  Source: fable-compiler/Fable

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 => {});

Most helpful comment

right. without parens it works as well. thx

All 3 comments

/cc @Krzysztof-Cieslak

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.

right. without parens it works as well. thx

Was this page helpful?
0 / 5 - 0 ratings

Related issues

funlambda picture funlambda  路  4Comments

alfonsogarciacaro picture alfonsogarciacaro  路  3Comments

rommsen picture rommsen  路  3Comments

alfonsogarciacaro picture alfonsogarciacaro  路  3Comments

ncave picture ncave  路  3Comments