Add encode() and decode() types

This commit is contained in:
Steven
2021-07-26 23:22:28 -04:00
parent 16a53caa48
commit de4eb9c8f7
3 changed files with 44 additions and 15 deletions

View File

@@ -11,7 +11,7 @@ export function instantiateEmscriptenWasm<T extends EmscriptenWasm.Module>(
factory: EmscriptenWasm.ModuleFactory<T>,
path: string,
workerJS: string = '',
): Promise<any> {
): Promise<T> {
return factory({
locateFile(requestPath) {
// The glue code generated by emscripten uses the original