Hacker News new | ask | show | jobs
by mootoday 356 days ago
I use ts-rs [1] in my project to generate Typescript definitions. The files are copied to the web app automatically.

[1] https://crates.io/crates/ts-rs

3 comments

I use https://github.com/1Password/typeshare it has it's quirks, but works nicely
I use aeson-typescript but it is broken in subtle ways

https://hackage.haskell.org/package/aeson-typescript

I switched to utoipa as I also needed an Open api client generator.

One neat thing is that I generate the complete client with a bit of python code. Then I use Knip to find unused exports in my Typescript project. I actually found some unused backend methods that were left over from refactoring.