We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I define a test like
#[cfg(target_arch = "wasm32")] #[wasm_bindgen_test] async fn screen_example() { // ... }
in my wasm-bindgen module screening_wasm/src/lib.rs, the resulting screening_wasm/pkg/screening_wasm.d.ts contains
screening_wasm/src/lib.rs
screening_wasm/pkg/screening_wasm.d.ts
// ... export interface InitOutput { readonly memory: WebAssembly.Memory; readonly __wbg_screenconfig_free: (a: number, b: number) => void; readonly __wbg_enumerationsettings_free: (a: number, b: number) => void; readonly __wbg_fixeddomains_free: (a: number, b: number) => void; readonly start: () => void; readonly screen: (a: any, b: any) => any; readonly __wbgt__screening_wasm::screen_example: (a: number) => void; // ^ Expected a type but instead found ':'. // ...
I'm not sure how this is supposed to work, but I guess the cause of this behavior is that wasm-bindgen-test-macro generates
#[export_name = ::core::concat!("__wbgt_", #ignore_name, "_", ::core::module_path!(), "::", ::core::stringify!(#ident))]
and then wasm2es6js.rs uses that name when making the .d.ts file, but it contains :: which is not valid in a TypeScript identifier.
::
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I define a test like
in my wasm-bindgen module
screening_wasm/src/lib.rs
, the resultingscreening_wasm/pkg/screening_wasm.d.ts
containsI'm not sure how this is supposed to work, but I guess the cause of this behavior is that wasm-bindgen-test-macro generates
#[export_name = ::core::concat!("__wbgt_", #ignore_name, "_", ::core::module_path!(), "::", ::core::stringify!(#ident))]
and then wasm2es6js.rs uses that name when making the .d.ts file, but it contains
::
which is not valid in a TypeScript identifier.The text was updated successfully, but these errors were encountered: