Practical TypeScript for the Laravel Developer
In this series, we are going to learn about the typical situations you will encounter when building a Laravel app with a TypeScript frontend. We'll talk about TypeScript primitives, how to organize your types, when to type, and, ultimately, how to generate types from your PHP code. All signal, no noise!

Progress
Series Info
- Episodes
- 15
- Run Time
- 1h 22m
- Difficulty
- Intermediate
- Last Updated
- Dec 16, 2025
- Version
- Latest
Series Episodes
- Getting Started (2)
Intro + Setup
Let's get started! We'll talk about why we may want to use TypeScript in the first place and how it benefits you during development. Then we'll dive into configuring TypeScript for your application and converting the app entry point.TypeScript Basics
Before converting our components to TypeScript, let's take a moment to talk about the basic primitives we'll be using to add type safety to our client side code.
- Typing Your Components (4)
Inertia Props
The first step in converting our Edit component is to add types to our component props, in this case, the props being passed to the component via Inertia. We'll learn how to take our PHP data and convert it to the equivalent types in TypeScript.Form Requests
We'll look at the InertiauseFormhook and use the provided generic to ensure that the outgoing form request matches the validation expected by the server.Side Quest: Form Handlers
We've added a lot of type safety to our Edit component, but we still have some stragglers that have red squiggles: form and input handlers. Let's tackle them.Adding Types to Laravel Echo and Stream Hooks
It's very possible that you'll use Laravel's first party Echo and Stream hooks in your application. Let's learn how to increase our type safety and IDE intelligence when using these hooks.
- Organization and Utilities (2)
Where Should Everything Go?
Our component is looking a bit verbose. Let's clean it up! We'll introduce a couple of strategies regarding how to organize your types to maximize usability and readability.TypeScript Utilities
We're going a bit deeper on this one. We'll use TypeScript utilities such asPick,Required,Omit, andPartialto re-use our existing types in creative ways.
- TypeScript Patterns (4)
Vanilla TS
Sometimes you're not working in the context of a component! We explore how to add type safety around two common HTTP concepts:axiosandfetch.Vue Example
React shouldn't have all the fun. Let's convert our Edit.vue component to TypeScript so you can see how Vue handles type safety.Typing Common React Hooks
Let's explore common React hooks such asuseRef,useState, anduseMemoand figure out how to enhance them with TypeScript where it makes sense.Typing Common Vue Functions
You're likely to use Vue functions such asrefandcomputed, let's learn how to add some type safety where it makes sense.
- Automatic Type Generation (2)
Generating Types with Laravel Data and TypeScript Transformer
Up until this point we've been manually writing our types. Let's generate them automatically using two packages from Spatie by specifying which PHP classes we'd like converted to TypeScript.Generating Types with Laravel Wayfinder
Now let's generate every type you can think of in your Laravel app, automatically, with Laravel Wayfinder. We'll explore the benefits of automatic type generation and how to incorporate Wayfinder into your local dev process.
- Wrap Up (1)