dsync icon indicating copy to clipboard operation
dsync copied to clipboard

ts-rs support

Open fidoriel opened this issue 1 year ago • 1 comments

Hey,

it would be nice to have support for adding the imports and derive macros from ts-rs automatically to structs. Then typescript bindings can be generated based on the models. Very helpful for a crud api. see https://github.com/Aleph-Alpha/ts-rs?tab=readme-ov-file#get-started

Something like pub ts_rs_support in GenerationConfigOpts would be nice.

fidoriel avatar Oct 24 '24 09:10 fidoriel

currently in dsync tsync is already supported, which to my knowledge is similar to ts-rs, so i dont see a reason why not to support it.

though it would likely be better to implement some kind of hook system (with events like [import, struct beginning / attributes, field] and likely more) for more expand-ability (in library mode), instead of having to wait for it to be supported in dsync itself.

hasezoey avatar Oct 24 '24 11:10 hasezoey