TypeScript Generics Explained - Creating Reusable Components with TS Generics Examples
Learn how to use generics in Typescript inside the TypeScript Playground. See TypeScript generics examples and how they could be applied to your project with Chris Held, Development Lead at Headway.
TypeScript is a great way to improve consistency and reliability in your JavaScript applications, as well as improve developer experience with static analysis tools.
The problem
This does carry some overhead, and eventually, your application might start to carry a lot of types that can feel overwhelming.
The solution
Thankfully, TypeScript has a few ways to refactor and reuse common types, and the one we’re going to cover today is generics.
What are TypeScript generics?
TS generics is a concept borrowed from other more strongly typed languages like C# and Java, and it allows a component to work across a variety of types, rather than a single one.
Chris' Blog Post on Generics
www.headway.io/blog/typescript-generics-explained-creating-reusable-components
TypeScript Documentation - Generics
https://www.typescriptlang.org/docs/handbook/2/generics.html
TypeScript Course for Beginners
https://www.executeprogram.com/courses
Advanced TypeScript Tutorial
https://youtu.be/eJ6R1knfsoc
Segments:
00:00 - Intro to TypeScript Generics
01:04 - TypeScript Generics Explained
01:39 - TypeScript Generics Example
04:40 - Supporting Multiple Generics
07:56 - TypeScript Documentation and Resources
#typescript #javascript #softwareengineer
Видео TypeScript Generics Explained - Creating Reusable Components with TS Generics Examples автора React Мастер
Видео TypeScript Generics Explained - Creating Reusable Components with TS Generics Examples автора React Мастер
Информация
28 ноября 2023 г. 4:59:24
00:08:22
Похожие видео