Which Vue Developers should learn TypeScript?
4:22
Installing TypeScript, Transpiling and Watching Files
4:44
Introduction to TypeScript’s Types
8:38
A Quick Tour of TypeScript’s Basic Types
9:21
Functions and Types in Typescript
9:42
Custom Types and Literal Types
6:02
Custom Object Types in TypeScript
7:44
Type Intersections
7:36
Type Unions
7:48
Interfaces
7:50
Intro to TypeScript - Conclusion (for now)
1:19
Generics
10:11
0% done with TypeScript: The Vue Parts

Generics

Generics keep a type constant throughout your code but don’t specify the exact type. They’re a useful way to make your functions, interfaces, and types more reusable without losing TypeScript’s benefits.

The “hello world” of Generics is the Identity function - it just returns what it gets as an argument.

To make Generics more practical, we must do one of two things: Set constraints on what the Generic Type can be Specify the structure of your data, without constraining the Type

We show toy examples of both, and then show an example from the Vue 3 source code.

After this video, you should be able to decipher most TypeScript code.

Handbook Docs https://www.typescriptlang.org/docs/handbook/generics.html

Vue 3 Example

https://github.com/vuejs/vue-next/blob/09b4202a22ae03072a8a8405511e37f65b626568/packages/runtime-core/src/renderer.ts#L83

What do others think of VueScreencasts?
"Great video as always, I really like the idea of basing the video in terms of features, as someone only looking to learn particular feature can get benefits from the video. Also, I really like you going through what we have done in the video at the end, it really helps in better understanding."
—Paurakh Sharma Humagain
"Really nice, thank you."
—WaterCamelsHowLong
"Really enjoying these, thank you!"
—Lars Sørensen
"Thank you. Even after having seen many tutorials, I keep learning a lot from you. You teach well!"
—Lars Sørensen
Take your career to the next level