Not being able to auto-generate a complete TypeScript definition haunted me for my Wasm project in Rust. The official toolchain using serde-wasm-bindgen generates a lot of "any" type for structs and enums. Not very helpful so I started looking for solution. I found it. I got the entire typings in no time and with almost no change in my code.
I wrote down how I did it: https://dawchihliou.github.io/articles/share-rust-types-with...