Is there a way to generate Typescript types for Models? I see that when I installed the Inertia + Vue starter kit, User was defined already in an index.d.ts file. Do I just put my types in that same file? Is there a convention for where types get stored or created? Is there a package that helps with this automatically? I've heard of Laravel Data but don't know if it's a good solution for me, or overkill.
I imagine this is something that will eventually get covered by Laravel’s first-party Wayfinder package in the future, though. It seems to be the direction it’s going in.
So I don't need Laravel Data to do this? I can just use that package and be good to go? Seems Laravel Data has this bundled into it maybe? Or at least, the TS types generation part.
The update to Laravel Wayfinder (first party package) will include support for this.
Automatically generates client-side type definitions and JS for backend route definitions, form requests, Inertia props, enums, and more. That means fewer errors and better alignment between backend and frontend code.
The goat himself responded. So, it definitely will include TS types generation. That is fantastic! Thanks Jeff! Watching your video between afternoon kid shenanigans and it's super informative. Thanks!