Playground:
@module("./math.js")
external sum: (int, int) => int = "sum"
let result = sum(3, 4)
import * as MathJs from "./math.js";
function sum(prim0, prim1) {
return MathJs.sum(prim0, prim1);
}
let result = MathJs.sum(3, 4);
export {
sum,
result,
}
I’m a little confused why this wrapper sum
function is generated?
Am I missing something syntax wise?