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

MangelMaxime picture MangelMaxime  路  3Comments

et1975 picture et1975  路  3Comments

alfonsogarciacaro picture alfonsogarciacaro  路  3Comments

funlambda picture funlambda  路  4Comments

AngelMunoz picture AngelMunoz  路  4Comments