-
Notifications
You must be signed in to change notification settings - Fork 0
remote.Function.registerMountHandler
github-actions[bot] edited this page Jun 8, 2026
·
2 revisions
@zenstone/ts-utils / remote / registerMountHandler
registerMountHandler<
K>(type,handler):void
Defined in: src/remote/mountRemote.ts:115
注册挂载类型处理器
K extends keyof MountHandlerMap
K
资源类型标识
处理函数
void
registerMountHandler('wasm', async (ctx, opts) => {
const response = await fetch(opts.url);
const module = await WebAssembly.instantiateStreaming(response, opts.importObject);
return { type: ctx.type, scope: ctx.scope, url: opts.url, module };
});