declare namespace WXWebAssembly {
interface Instance {
readonly exports: Exports
}
function instantiate(
path: string,
importObject?: Imports
): Promise<Instance>
}
实际返回的是:
lifetimes: {
async created() {
WXWebAssembly.instantiate('/wasm/img2webp_wasm_bg.wasm.br', IMPORTS).then(r => {
console.log(r) // {"instance":{},"module":{}}
})
}
}
实际返回值与签名不符。