ranile / ducktor

A macro to generate constructor to instanicate structs from JsValue using duck-typing.

Home Page:https://crates.io/crates/ducktor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generate typings for types using ducktor

DusterTheFirst opened this issue · comments

One of the important pieces that wasm-bindgen provides is the generated typescript declaration file that describes the public API of the generated bindings. If I understand correctly,when using ducktor in a public facing API, the types will just show up as JsValues and all type information will be lost. So even though you can pass any object with the same fields, you would not get typechecking for those objects.