A beginners guide to Typescript | Collective Literal Types, Widening and Narrowing Types

  Рет қаралды 6,091

developedbyed

developedbyed

Күн бұрын

Check out my Web Development Courses 🔥
developedbyed.com/
🛴 Follow me on:
Twitch: / developedbyed
Twitter: / developedbyed
Instagram: / developedbyed
Github: github.com/developedbyed/
🔥Dope Tracks
Mac Kay - Shade chll.to/00509844
Boukas - Melvin chll.to/10d340df
less.people - Lamp Glow chll.to/51b47e4a
Enough Cereals - Suave chll.to/3ce6c324

Пікірлер: 13
@developedbyed
@developedbyed Ай бұрын
Hope you enjoy this series, leave anything you want me to discuss that's typescript related here, so I can talk about them in the next episode 👍 Fullstack course is halfway filmed as well, it's gonna be huge
@IOSALive
@IOSALive Ай бұрын
developedbyed, This video is fantastic! I liked it a lot!
@developedbyed
@developedbyed Ай бұрын
Thank you very much!
@TiriasCZ
@TiriasCZ Ай бұрын
8:15 So are we supposed to use only instanceof instead of typeof or are there any cases where we should use typeof?
@developedbyed
@developedbyed Ай бұрын
Hope this makes it clear typeof expression is the operator that lets you determine the type of expression. typeof evaluates to one of the values: 'string', 'number', 'boolean', 'symbol', 'undefined', 'object', 'function'. typeof null evaluates to 'object', thus the correct way to use typeof to detect an object is typeof object === 'object' && object !== null. instanceof operator let's identify the instance's constructor. object instanceof Constructor evaluates to true if object is an instance of Constructor.
@developedbyed
@developedbyed Ай бұрын
Usually use typeof for primitives, cause when you pass it an object, array, null or ehatever it will just give you back “object” Whereas with instanceof you can check if you pass an array for ex unction isArray(value) { return value instanceof Array; } isArray([1, 2, 3]); // => true isArray({ prop: 'Val' }); // => false
@billynasir3146
@billynasir3146 Ай бұрын
I would like to buy your Next JS course but is it getting updated?
@developedbyed
@developedbyed Ай бұрын
Update out in about 2 weeks!
@encilaj1444
@encilaj1444 Ай бұрын
Sheesshhh.
@johnlayda3299
@johnlayda3299 Ай бұрын
Shesh
@egbaogheneakon4266
@egbaogheneakon4266 Ай бұрын
Firstttttttt
@developedbyed
@developedbyed Ай бұрын
you are first and managed to edit your comment, gg
@tevfik7
@tevfik7 Ай бұрын
Why all my fave youtube devs use tsx for react courses? Jsx pls, I barely learned js and now everything is in ts 😂🤦🏻‍♂️
Top 10 Tips and Tricks with Tailwind CSS
23:45
developedbyed
Рет қаралды 83 М.
A beginners guide to Typescript | Why use it?
10:39
developedbyed
Рет қаралды 18 М.
I Need Your Help..
00:33
Stokes Twins
Рет қаралды 100 МЛН
TypeScript Generics are EASY once you know this
22:21
ByteGrad
Рет қаралды 120 М.
Is Data Science Dying in 2024? || AI and Automation
11:44
Jacob Maz
Рет қаралды 9 М.
Avoid these 5 beginner CSS mistakes
21:38
Kevin Powell
Рет қаралды 47 М.
Why I Still Use React Query with Next 14
11:28
developedbyed
Рет қаралды 49 М.
React Hooks Crash Course (useMemo, useCallback and more).
31:49
developedbyed
Рет қаралды 79 М.
7 Awesome TypeScript Types You Should Know
8:57
Josh tried coding
Рет қаралды 75 М.
Learn Typescript with React | Quick Crash Course
16:59
developedbyed
Рет қаралды 88 М.
A Guide To ARIA and HTML
7:32
developedbyed
Рет қаралды 14 М.
This Library Is Amazing | Awwwards Type Animation Tutorial
18:17
developedbyed
Рет қаралды 18 М.
How charged your battery?
0:14
V.A. show / Магика
Рет қаралды 2 МЛН
Как я сделал домашний кинотеатр
0:41
RICARDO
Рет қаралды 1,5 МЛН
Обманет ли МЕНЯ компьютерный мастер?
20:48
Харчевников
Рет қаралды 188 М.
ПК с Авито за 3000р
0:58
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 1,3 МЛН