vinatis/typescript-generator
Generates TypeScript definitions from your Laravel codebase, turning models, form requests, and API resources into typed interfaces so frontend and backend stay in sync. Keep type safety across your stack without writing declarations by hand.
Adopt or evaluate it when all of the following hold:
Look elsewhere when:
nelmio/api-doc or API Platform → openapi-typescript), Symfony's native type-info tooling, or a schema-first approach with Zod/Valibot.types.ts is cheaper than any generator.To executives (one paragraph): We're evaluating a small open-source Symfony bundle that auto-generates TypeScript types from our backend, which would remove a recurring source of front-end breakage and manual rework. The catch is that it's archived with no community, so the realistic proposal is not "add a dependency" — it's a short, timeboxed spike to see whether the approach is worth adopting, either by forking this code or by buying into a maintained OpenAPI-based pipeline. Cost is a few engineering days; the decision it unlocks is whether to fund contract automation on the roadmap.
To engineering: Treat vinatis/typescript-generator as a reference implementation first and a dependency second. It's a Symfony bundle that emits TypeScript from the Symfony project, which is exactly the seam we keep patching by hand. Because it's archived with zero dependents, anything we adopt we own: fork it, pin it, and add it to the upgrade checklist. Recommended next step is a two-day spike against our three messiest DTOs, benchmarked head-to-head against an OpenAPI → openapi-typescript path, with a clear "stop if it doesn't handle enums, nullables, and route params" gate. If it wins, we fork; if it loses, we've still learned what our contract layer needs.
How can I help you explore Laravel packages today?