madonoharu / tsify

A library for generating TypeScript definitions from rust code.
Apache License 2.0
311 stars 42 forks source link

Allow Configuration of Serialization #31

Open cwfitzgerald opened 1 year ago

cwfitzgerald commented 1 year ago

Partially fixes #26. Built off of #28.

This wires up being able to modify the serialization of types in ways that serde_wasm_bindgen supports. We find use for both of these options within our project as the surrounding TS code uses null for optional types, as well as always using objects as opposed to Maps.

I've tried to keep the code as contained and reasonable as possible and glad to explain any of the decisions I've made.