wasm-bindgen: wasm-bindgen-webidl doesn't seem to support typedefs
It appears that wasm_bindgen_webidl::compile_ast removes all typedefs via remove_undefined_imports, which prevents typedef bindings from being emitted. This occurs even when working with typedefs that directly reference defined types, such as:
typedef long MyInt;
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (17 by maintainers)
Actually, I just noticed the following line:
So we should probably not be including these typedefs at all, but replacing all their appearances with their underlying type.
Actually, on a second review, it looks like the WebIDL spec doesn’t permit
typedefs to reference each other, so we may be safe there. ButTypeAlias::srcis asyn::Type, not anIdent, so it looks like some interface refactoring may be necessary.