A complete guide for functions in TypeScript. Learn how to guard your functions with types. I present all the possible ways to create functions. Discover Hoisting and how to prevent it. Get familiar with the most unique type keywords any, unknown, object, Function and never.
00:00 Intro
01:02 Function declarations
03:06 Function expressions
05:14 Default parameters
06:34 Callbacks
08:47 Optional parameters
11:57 Arrow functions
15:04 Hoisting
16:40 Function overloading
20:47 Advanced types
21:57 Object types
22:47 Unknown types
26:48 Function types
28:31 Never
Check out my ✨TypeScript course:
https://tltr-typescript.com
Find all the code examples in my blog:
https://nicotsou.com/tltr-typescript-...
This video belongs to my series Too Long To Read TypeScript. Every episode covers in detail a core concept of the language.
You can support this channel by clicking SUBSCRIBE :)