mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-12 20:41:24 +00:00
Implement support for js_class
on exported types
Allow defining types which have different names in Rust than they have in JS! (just like can be done with imported types) Closes #1010
This commit is contained in:
@ -136,3 +136,10 @@ exports.js_js_rename = () => {
|
||||
exports.js_access_fields = () => {
|
||||
assert.ok((new wasm.AccessFieldFoo()).bar instanceof wasm.AccessFieldBar);
|
||||
};
|
||||
|
||||
exports.js_renamed_export = () => {
|
||||
const x = new wasm.JsRenamedExport();
|
||||
assert.ok(x.x === 3);
|
||||
x.foo();
|
||||
x.bar(x);
|
||||
};
|
||||
|
Reference in New Issue
Block a user