Common Typescript Mistakes You Don’t Know About

  Рет қаралды 2,857

Monsterlessons Academy

Monsterlessons Academy

Күн бұрын

Learn common Typescript mistakes that you for sure do every day. By avoid these Typescript mistakes you improve your code, type safety and scalability.
TIMESTAMPS
0:00 Introduction
0:40 Disabling strictness
1:25 Any operator
2:24 Unknown operator
3:41 Narrowing type
4:57 Type assertion
6:20 Don't skip types
7:32 Understanding errors
8:27 Happy path
10:20 Too much optional
11:30 Union vs enum
13:36 Exclamation mark
► CHECK MY COURSES - monsterlessons-academy.com/co...
MOST POPULAR COURSES
► Javascript interview questions - monsterlessons-academy.com/co...
► Typescript interview questions - monsterlessons-academy.com/co...
► React interview questions - monsterlessons-academy.com/co...
► Angular Interview Questions monsterlessons-academy.com/co...
► Building real project with Angular + NgRx - monsterlessons-academy.com/co...
► Building real NestJS API - monsterlessons-academy.com/co...
► Building real fullstack project - monsterlessons-academy.com/co...
► Mastering Git - monsterlessons-academy.com/co...
► Mastering Docker and Docker Compose - monsterlessons-academy.com/co...
FOLLOW ME
► TWITTER - / monster_lessons
► INSTAGRAM - / monsterlessonsacademy
► TIKTOK - / monsterlessonsacademy

Пікірлер: 21
@karthikeyan878
@karthikeyan878 3 ай бұрын
Great !! very useful !
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 ай бұрын
Glad you think so!
@alexanderkomanov4151
@alexanderkomanov4151 3 ай бұрын
Amazing!!! Thanks a lot!!!!
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 ай бұрын
You are welcome!
@advance5189
@advance5189 3 ай бұрын
Great tutorial! Stay the course, your videos are really helpful
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 ай бұрын
Thanks, will do!
@gunman479
@gunman479 3 ай бұрын
Great video and some very valid points. Regarding the use of many optional properties, I somewhat agree. I think having 2-3 optional properties is manageable. However, for anything beyond that, I would recommend adding an options property to the User interface like so; options?: Partial; I think this approach is cleaner.
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 ай бұрын
Yeap, I would also use partial.
@tomekk3569
@tomekk3569 3 ай бұрын
Good revision, thanks!
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 ай бұрын
Glad it was helpful!
@andreistein2429
@andreistein2429 3 ай бұрын
Great points. I have read that some projects remove typescript from there projects and advocating that you don't need it. What do you think on this matter? Is it because of the strictness of typescript or the lag of knowledge of how to use typescript?
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 ай бұрын
Doesn't make sense to me. Probably lack of knowledge and understanding how to write TS
@CrazySalieri
@CrazySalieri 3 ай бұрын
Excellent points, people often don't use 10% of TS power in their projects. If you don't mind, what theme and font you're using? Looks amazing
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 ай бұрын
It's gruvbox
@codeme8016
@codeme8016 3 ай бұрын
Wonderful
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 ай бұрын
Thank you
@sergiogordon7877
@sergiogordon7877 3 ай бұрын
Thanks for share this video. I have a question. If is bad practice use optional in interface, can I use for example name: string | null; instead of name?: string; Is it a good practice? Thanks
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 ай бұрын
Optional is useful but you should not overuse it.
@programmingintrouble
@programmingintrouble 3 ай бұрын
@georgenonis5967
@georgenonis5967 2 ай бұрын
data ?? getData(data)
@MonsterlessonsAcademy
@MonsterlessonsAcademy 2 ай бұрын
Sure it's an if condition.
Infer is easier than you think
13:38
Matt Pocock
Рет қаралды 85 М.
Typescript Coding Interview Questions - Typescript Crash Course
53:34
Monsterlessons Academy
Рет қаралды 9 М.
The Noodle Picture Secret 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 29 МЛН
DELETE TOXICITY = 5 LEGENDARY STARR DROPS!
02:20
Brawl Stars
Рет қаралды 18 МЛН
Balloon Stepping Challenge: Barry Policeman Vs  Herobrine and His Friends
00:28
Angular 18 Features: A Game-Changing Evolution
7:35
Monsterlessons Academy
Рет қаралды 10 М.
TypeScript Generics are EASY once you know this
22:21
ByteGrad
Рет қаралды 124 М.
From Beginner to Pro: Demystifying Angular Change Detection in Depth
12:56
Monsterlessons Academy
Рет қаралды 2,9 М.
Design Twitter - System Design Interview
26:16
NeetCode
Рет қаралды 457 М.
ARRAYLIST VS LINKEDLIST
21:20
Core Dumped
Рет қаралды 50 М.
Build this JS calculator in 15 minutes! 🖩
15:20
Bro Code
Рет қаралды 380 М.
Django Channels & WebSockets Oversimplified
16:35
Dennis Ivy
Рет қаралды 124 М.
Front End Mock Technical Interview | JavaScript, CSS, React, and Algorithms
1:33:39
All You Need To Know About TypeScript
14:29
Clément Mihailescu
Рет қаралды 226 М.
The Noodle Picture Secret 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 29 МЛН