
Lesson Description
The "Wrapping Up" Lesson is part of the full, Fullstack TypeScript, v2 (feat. Zod) course featured in this preview video. Here's what you'd learn in this lesson:
Steve wraps up the course by summarizing the pros and cons of full-stack type-safety across an application. While there isn't a one-size-fits-all approach to type safety, the abundance of tooling gives teams flexibility based on their stack, application environment, or unique constraints.
Transcript from the "Wrapping Up" Lesson
[00:00:00]
>> Steve Kinney: Again, if you have a big, big legacy code base, start with the small stuff, right? If you are get a knitting or starting with a relatively new project, right? Maybe you can choose to go down some of these other paths, right? Some of them have extra complexity, or with any library from, honestly, anything.
[00:00:20]
Even React has certain things that it makes it harder, despite the 1000 things that it makes easier, right? That is true for everything. And there is a set of trade offs all the time. But again, you get to the point where, from that Prisma to generating Zod schemas and TRPC clients, so and then it.
[00:00:40]
Exposing all of those different methods to the clients without having to make a whole bunch of different restful API routes, that can save a ton of time. In addition to the best way to get that type safety is to take the humans out of the loop, right? If you get to things where it's a standardized schema, you can get to the point where, yeah, we can generate the Zod schemas off the database tables, the routes off the Zod schemas, the client off of the like route, so on and so forth.
[00:01:10]
And then like the chance, yes, software's bad. You're not gonna get to a hundred percent type safety, but you can at least take the like somebody was a little tired. Or decided to wing it all of a sudden at the end of a several hour long workshop, and make choices, you can protect from those things by having automated systems.
[00:01:30]
It's the same world that if you think you're gonna catch every coding pattern through code review, you're not. You better have CICD and prettier and ES lint and all those things, at least backing you up a little bit. But I do think that the promise of type safety across the stack is doable.
[00:01:48]
At what level you can approach it, it depends on your codebase. But I think there is a lot of really great tooling, and some of the game is just knowing all of the options that do exist and ways of thinking about it, and then figuring out how to apply that wide range of tools to your particular code base.
[00:02:04]
>> [APPLAUSE]
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops