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

Functions and Types in Typescript

Adding Types to function definitions makes your code easier to read and easier to use… and eliminates an entire category of runtime errors.

By defining the Types of the input and output precisely, you clearly communicate to future programmers -- and to IDEs like VSCode -- what they can expect from the function. Type information combines with the function and argument name to provide a more complete picture of what the purpose and inner workings of the function are, before even looking at what code is inside.

This video uses the Functions section of the TypeScript Handbook as a rough guide, but changes the emphasis significantly based on the needs of Vue developers. We also look at some real-world code from the Vuetify codebase, to see what we’re learning in action!

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
"Excellent video!"
—Kenneth Solberg
"I like your videos they are very good."
—Kreshnik Palushi
"Man, this is a nice video, thank you."
—Esteban Cordoba
Take your career to the next level