The code char 97 is convert to (97).toString(), should be String.fromCharCode(97)
char 97 = 'a'
char 97 -> (97).toString() -> "97"
I don't know any.
Another compilation issue:
``` f#
let charListToString chars =
System.String(List.toArray chars)
Convert to
``` js
var charListToString = exports.charListToString = function (chars) {
return _fableCore.String.fsFormat(Array.from(chars));
};
I am using System.String, it is not related to String.fsFormat. :disappointed:
Workaround:
chars |> List.fold (fun s c -> s + c.ToString()) ""
Thank you for the report!
Fixed in 35f6b4b5509da0626397d95421461cb7090469af.
Please take a look at it and let me know if this solves the problem for you.
Thanks @fdcastel for fixing the string constructor, is that your changes fixing the char constructor too?
Yeah, the changes made by @fdcastel have also fixed various String constructors as you can see in the new unit tests :) I have published the new versions (fable-compiler 0.2.3 & fable-core 0.0.12). Please give them a try and feel free to close the issue if it's working.
OK, I will try that later. Thanks very much!
Most helpful comment
Thank you for the report!
Fixed in 35f6b4b5509da0626397d95421461cb7090469af.
Please take a look at it and let me know if this solves the problem for you.