-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find namespace 'WebAssembly' #2388
Comments
It's defined by TypeScript itself in declare namespace WebAssembly {
interface Module {
}
var Module: {
prototype: Module;
new(bytes: BufferSource): Module;
customSections(moduleObject: Module, sectionName: string): ArrayBuffer[];
exports(moduleObject: Module): ModuleExportDescriptor[];
imports(moduleObject: Module): ModuleImportDescriptor[];
};
...
} Maybe you're using an old version of TypeScript? |
Hey @evanw Here is the project that the problem exists if you'd like to check yourself: https://github.com/doteric/funpack |
This is because you have The simplest solution would be changing your tsconfig to Another solution I was thinking about is installing Another choice would be esbuild trying to loose the type constraints, providing a minimal interface WebAssemblyModule {}
...
wasmModule?: WebAssemblyModule |
Thanks for looking into this @hyrious |
Ok. I'm going to close this since the |
See evanw/esbuild#2388 for why this fix was necessary.
See evanw/esbuild#2388 for why this fix was necessary.
See evanw/esbuild#2388 for why this fix was necessary.
See evanw/esbuild#2388 for why this fix was necessary.
See evanw/esbuild#2388 for why this fix was necessary.
See evanw/esbuild#2388 for why this fix was necessary.
See evanw/esbuild#2388 for why this fix was necessary.
See evanw/esbuild#2388 for why this fix was necessary.
See evanw/esbuild#2388 for why this fix was necessary.
See evanw/esbuild#2388 for why this fix was necessary.
See evanw/esbuild#2388 for why this fix was necessary.
See evanw/esbuild#2388 for why this fix was necessary.
See evanw/esbuild#2388 for why this fix was necessary.
See evanw/esbuild#2388 for why this fix was necessary.
See evanw/esbuild#2388 for why this fix was necessary.
See evanw/esbuild#2388 for why this fix was necessary.
See evanw/esbuild#2388 for why this fix was necessary.
See evanw/esbuild#2388 for why this fix was necessary.
Currently the TypeScript types for esbuild depend on the DOM types. However, esbuild itself does not depend on the DOM. This change uses type augmentation to make the type error go away, while keeping backwards support for use with the DOM types. Closes evanw#2388
Found the solution here: evanw/esbuild#2388
Found the solution here: evanw/esbuild#2388
During the compilation using
tsc
with the esbuild API I encountered following error:I had to
skipLibCheck
in TypeScript so that I can compile without any errors.The text was updated successfully, but these errors were encountered: