No BS TS #5 - Optionals in Typescript

preview_player
Показать описание
Understanding optional parameters, fields and calls is critical to writing great Typescript. Let's dig in and have a look at all these flavors of optionals, plus optional chaining, the null coalescing operator, and the `!` operator.

00:00 Introduction
00:05 Starting coding
00:20 Optional parameters
02:36 Optional fields
04:53 Optional function calls
05:58 Outroduction

👉 What's my theme? Night Wolf [dark blue]
👉 What's that font? MonoLisa

💢 Watch our other videos:

Thank you for watching this video, click the "SUBSCRIBE" button to stay connected with this channel.

#typescript #NoBSTS
Рекомендации по теме
Комментарии
Автор

This is teaching me so much about not just Typescript but also JavaScript lol. Did not know about the optional chaining for functions, and a few episodes ago you taught me about the null coalescence operator. I'm being humbled by the minute here... there is so much to this language that I did not understand!

UnknownEntity
Автор

Hahah. Didnt know you could do the same for callbacks.
Thanks.

insanityrodax
Автор

I had no idea you could use optional chaining on function calls like that! 🤯

drewbird
Автор

Very good content. Clear and concise explanation. Underrated IMO

slatanek
Автор

I'm learning a lot of new things! 🙏 Thank you so much, Jack!

zckfytc
Автор

thumbs up for the ?. on the callback. Interesting stuff!

TiagoSalemaG
Автор

Thanks for these videos Jack "Principle Skinner" Herrington. These videos are really helping me in my job as I adjust to TS codebase 👍🏾

francis_n
Автор

really good video format, I learn a lot quickly from them

alex-desroches
Автор

didn't know about this callback optional operator. Thanks! :)

adampielach
Автор

Não conhecia o a chamada de função condicional muito 👏

SabrinaDias
Автор

Wow, the first of all Jack's videos where I knew something already. Oh wait, that was just the parameter option :(

ToddDunning
Автор

Awesome Tutorial! I now know when to use optional and their use cases. I was only wondering how would I run the callback function on the addWithCallback function?

techhguy
Автор

Amazing series, hope there’s a react one as well, with redux toolkit

codelul
Автор

It looks like this video is missing from the React/TypeScript playlist - do you think you can add it?

aaronherman
Автор

@4:34 Why did you use the question mark after user? Isn't user non-optional here.

jdratlif
Автор

Why the dot on the function optional?
Callback?.()

Why not just
Callback?()

DedicatedManagers
Автор

${extra ?? ""} is a bit cleaner

TheStruders
Автор

waaaait does the ?.() exist in vainilla JS? what about ?.[]
I don't need to sleep I need answers!

koi