We pass some data from backend to frontend via custom objects/structs (whatever they are called). For typing to work in TypeScript we need to also define an interface for that object in TypeScript.
Keeping the Rust<->TypeScript object definition synced manually is annoying and prone to errors. Instead we should auto-generate them from the Rust code where applicable (usually the definition in Rust is the "main" one) so that any changes in the Rust object get automatically transferred to the frontend.