fwiw, I think the most comprehensive cross-typing work done here has been specta:
https://github.com/specta-rs/tauri-specta