workers-types icon indicating copy to clipboard operation
workers-types copied to clipboard

Where is WebAssembly type?

Open nkss7 opened this issue 3 years ago • 2 comments

In new version of workers-type, I cant find WebAssembly type(which present in "dom", "webworker" libs)

nkss7 avatar Feb 02 '22 10:02 nkss7

I don't believe the runtime supports this which is why you don't see it. WebAssembly must be uploaded and bound as part of your project. You can't interact with it dynamically at runtime.

vlovich avatar Feb 25 '22 17:02 vlovich

the runtime does support WebAssembly as can be seen in the miniflare docs here. Unfortunately this documentation does not appear in the main cloudflare worker docs, however it does work.

we had to add skipLibCheck and sprinkle in some // @ts-ignore to get our type check passing.

f5io avatar Jun 17 '22 13:06 f5io

Hey! 👋 Thanks for reporting this, we'll get this fixed in the next major version of workers-types using the new type generation system. 👍

mrbbot avatar Oct 21 '22 13:10 mrbbot

Hey! 👋 WebAssembly types have been added to @cloudflare/workers-types@4. 🎉

mrbbot avatar Jan 19 '23 15:01 mrbbot