I use ts-rs [1] in my project to generate Typescript definitions. The files are copied to the web app automatically.
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.