-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
.d.ts for _bg module #1040
Comments
Oops yeah I forgot about importing memory! Definitely something we should emit We could also go ahead and emit a |
alexcrichton
added a commit
to alexcrichton/wasm-bindgen
that referenced
this issue
Nov 27, 2018
This generates a `*.d.ts` file for the wasm file that wasm-bindgen emits whenever typescript is enable *in addition* to the `*.d.ts` file that already exists for the JS shim. Closes rustwasm#1040
Works fine. Thank you very much! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to access wasm memory from TypeScript like this example.
https://rustwasm.github.io/wasm-bindgen/reference/types/pointers.html
But, the TypeScript compiler shows an error because the type definition for _bg module does not exist.
Currently, I manually added following .d.ts file to avoid the error.
(@types/webassembly-js-api is needed.)
I think it is better to automatically generate .d.ts file for _bg module.
Or, is there any other way to solve this?
The text was updated successfully, but these errors were encountered: