ballercat / walt

:zap: Walt is a JavaScript-like syntax for WebAssembly text format :zap:
https://ballercat.github.io/walt/
MIT License
4.64k stars 122 forks source link

Type declarations for walt-loader. #129

Open Chamberlain91 opened 6 years ago

Chamberlain91 commented 6 years ago

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.

ballercat commented 6 years ago

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!

aman123424 commented 1 year ago

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