You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment we generate the TypeScript types by outputting JSON Schema files and then converting them into TypeScript types.
This not only loses some type information but it also complicates the setup.
Since TypeScript is pretty much the only language that clients are written in, we decided through internal discussion that phasing out JSON Schemas in favour of generating TypeScript types is a worthwhile endeavour.
This drops our dependence on the schemars crate in favour of using the ts-rs crate to generate these types.
The text was updated successfully, but these errors were encountered:
Just adding this here to not forget: apparently some people are not using the cw_serde macro to generate their types (ref: https://twitter.com/kromssten/status/1747287780214935754), so simply changing the generate_api macro to unconditionally emit TS definitions won't cut it. Since that would break these users.
Technically we have two options:
Call it acceptable breakage and say anything besides the cw_serde macro isn't supported
I think the second option would probably be nicer for our consumers since it doesn't break anything for them, but it would increase the macro complexity a bit (but I don't think to a big enough degree to really matter)
At the moment we generate the TypeScript types by outputting JSON Schema files and then converting them into TypeScript types.
This not only loses some type information but it also complicates the setup.
Since TypeScript is pretty much the only language that clients are written in, we decided through internal discussion that phasing out JSON Schemas in favour of generating TypeScript types is a worthwhile endeavour.
This drops our dependence on the
schemars
crate in favour of using thets-rs
crate to generate these types.The text was updated successfully, but these errors were encountered: