golang-wasm/example/basic/src/index.js

8 lines
165 B
JavaScript

2021-03-21 07:41:36 +07:00
import wasm from './api/main.go';
const { hello, helloName } = wasm;
(async () => {
console.log(await hello());
console.log(await helloName("world"));
})()