ballercat / walt

:zap: Walt is a JavaScript-like syntax for WebAssembly text format :zap:

Home Page:https://ballercat.github.io/walt/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Type declarations for walt-loader.

Chamberlain91 opened this issue · comments

Feature Request

Today I found that walt-loader doesn't work seamlessly in a webpack environment using typescript because its missing type declarations.

This is the type file I've used:

type WaltInstantiate = (deps?: any) => Promise<WebAssembly.ResultObject>

declare module "*.walt" {
    const value: WaltInstantiate
    export default value;
}

where WebAssembly.ResultObject is defined in @types/emscripten.

Other than the parts that overlap with JS I have next to zero knowledge of TypeScript. If you'd like to add some type definitions (or a types file? I don't know how that works), I would accept a PR!

Other than the parts that overlap with JS I have next to zero knowledge of TypeScript. If you'd like to add some type definitions (or a types file? I don't know how that works), I would accept a PR!

Hey, Do you still need help with this issue, I would like to help