Тёмный

Type Assertions & Type Casting | Typescript Tutorial for Beginners 

Dave Gray
Подписаться 346 тыс.
Просмотров 17 тыс.
50% 1

Опубликовано:

 

14 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 68   
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
In this tutorial, we'll learn about Typescript Type Assertions, Type Casting and how to use DOM types. If you have questions, please join my Discord server where I answer questions and you can chat with other web dev students: discord.gg/neKghyefqh
@re.liable
@re.liable Год назад
"strive for progress over perfection" this has gotten into my head. So simple but has a great effect. I'm only a few vids in but I'm already thankful. You're awesome.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Thank you!
@simonj9945
@simonj9945 Год назад
I can't begin to tell you how much that little ending motto has helped get through the learning curve! I love your work Dave thank you so much!
@evant4194
@evant4194 Год назад
I rarely have to rewind because the explanations are clear and concise from the start. Thanks man, the way you teach really sticks!
@oscardd411
@oscardd411 Год назад
Dave! I am waiting for a react typescript course/tutorial, maybe with avanced topics or a next js specialization too. You are the best!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Great suggestion! Thank you!
@j4yj4y123
@j4yj4y123 Год назад
Definitely need this! Dave truly is the best.
@Daviddd10
@Daviddd10 Год назад
@@DaveGrayTeachesCode this would be awesome!
@nguyenanh-vt4jv
@nguyenanh-vt4jv 6 месяцев назад
Is this really free???? Unbelievable!!!! You are godsend, thank you Dave
@jdk9108
@jdk9108 23 дня назад
Amazing content ! I dont know if you're planning to do a paid version going deeper in typescript with react / node one day, but ill be you first buyer ! Is The Complete Web Developer of the same quality as your videos?
@mohammadrezaakhshabi7587
@mohammadrezaakhshabi7587 Год назад
one of the best web developer teacher i have ever seen💙
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Thank you for the kind words!
@emmanueltech9705
@emmanueltech9705 Год назад
@@DaveGrayTeachesCode facts 💯
@kirillzlobin7135
@kirillzlobin7135 Год назад
The best content on Typescript on youtube
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Thank you!
@sandyGamer97
@sandyGamer97 Год назад
@Dave, my solution for above challenge const date: number = new Date().getFullYear(); const numberasString = (date as unknown) as string; const span = document.getElementById('year') as HTMLSpanElement; const text = document.createTextNode(numberasString); span.appendChild(text);
@davidho3628
@davidho3628 Год назад
You’re truly a life saver! The best web dev content creator !!!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Thank you, David!
@teetanrobotics5363
@teetanrobotics5363 Год назад
Waiting for Nextjs 13 course. Amazing content as always professor. Thank you for your efforts
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Thank you!
@kirillzlobin7135
@kirillzlobin7135 Год назад
alt + z => wraps code to the next line shift + alt + downArrow => copy selected code
@polopol7312
@polopol7312 Год назад
What a champ! Are you planning some Docker tutorials? Since, for me, it is really a tough concept to get a grasp on. Thank you for content of course!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Thank you! And yes, great request! That topic is on my short list.
@ScriptRaccoon
@ScriptRaccoon Год назад
Great tutorial, as always! Currently I need to watch them with subtitles (my ears don't work properly 🤨), I am glad that RU-vid creates them automatically and I can watch your videos. 🙂
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
I'm glad RU-vid helps with that! 💯
@Grishopping
@Grishopping Год назад
Gracias MAESTRO sigo aprendiendo..... Saludos desde Venezuela. Att. Jose Grillo
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Hola Venezuela! 👋 De nada mi amigo! 🙏
@k303k
@k303k 11 месяцев назад
Very great tutorial!
@mostafaentezami8951
@mostafaentezami8951 Год назад
thank you Mr Dave🔥
@flowerofash4439
@flowerofash4439 Год назад
amazing tutorial, btw i guess you don't have to explicitly say the const thisYear is string since the toString() is already called
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Thanks!
@TravinskiyVladislav
@TravinskiyVladislav Год назад
Awesome. Again thank you
@codie1372
@codie1372 Год назад
I might be wrong here but i think u can use angle brackets with react typescript for example i used it to define type of useState
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
You can. I am not covering React here but I do later in the series starting at lesson 12.
@sonamohialdin3376
@sonamohialdin3376 Год назад
Awesome tutorial thank you
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Glad you liked it!
@biLLie_wiLLie
@biLLie_wiLLie Год назад
thank you for teaching! Big thank from Russia
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
You're welcome!
@madhavjha844
@madhavjha844 Год назад
Remember to keep striving for progress over perfection, a little progress every day will go a very long way.
@joojoogamer
@joojoogamer Год назад
Great series. One question about type assertion (4.:48). I'm confused about how let c = a as Three. Why won't Typescript complain if I purposely initiate let a: One = "goodbye", since type Three has a literal type of "hello" which is different from variable a's value of "goodbye"? Thanks in advance.
@mhdfirassbarakat6587
@mhdfirassbarakat6587 Год назад
Dave, I have a piece of advice can you please provide a couple of challenges to test our understanding of what you do? I think it will be a useful great job and keep going
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Thanks! Keep going in this series - challenges ahead! 💯
@arsdali2049
@arsdali2049 Год назад
Sir , please take us zero to heigh level in typescript also please provide us some projects work so that we can understand entirely WITH HUMBLE REQUEST
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
I'll keep going and creating more content! 💯🚀
@skillkrio
@skillkrio Год назад
Help me out Dave . I keep on watching long duration video course on html,css, and javascript but i feel like i am not ready for building projects. Recently i saw you channel and again my mind goes like i need to complete dave's html,css and javascript becasue some of the topics which i don't know like regex on javascript and variable and naming convention from css like that and at the end my mind convincing me to through the entire playlist. Even if i successfully complete your playlist there is another long playlist showing up for me in suggestion. How can i break out of these problem. How long it took for you to master full stack. Do you often use documentation for learning or you will also watch other youtube for learning. Guide me how can i get out of this situation.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
I use documentation all the time! Videos are helpful, too. The following playlist has all of my full courses. HTML, CSS, and Javascript (the first 3) are required - from there you can specialize: ru-vid.com/group/PL0Zuz27SZ-6M1Uopt6_VL3gf3cpMnwavm
@skillkrio
@skillkrio Год назад
@@DaveGrayTeachesCode Dave i tried to go through docs such as node js. I couldn't understand it so many technical terms. Do you understand it in first read or you too faced difficulty while reading docs.
@polopol7312
@polopol7312 Год назад
​@@skillkrio You won't be able to understand docs at the first glance, the point of reading docs is to get a basic view of how given concept works and/or how it can be used later onto your projects. Best mix to get such knowledge is to mix docs with youtube tutorials such as Dave's, but you need to practice them as much as possible. The most important part is not to watch those tutorials brainlessly, watch about a new concept, read the docs and think about how you can use it later on. Consistency is the key. + if you are learning javascript do not bother yourself with node.js documentation, focus purerly on JavaScript and the best source for doing that is official Mozzila documentation.
@7doors847
@7doors847 Год назад
🔥! ✌️ Superb
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Thanks ✌️
@028-manikandan3
@028-manikandan3 Год назад
Hi sir please put the video in angular beginner to advanced level.please sir i don't know react.but in this situation i learning angular in 15 days. 🙏🙏🙏 Please put angular videos
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
I will continue Typescript but no plans for Angular here. AngularJS has discontinued long term support: blog.angular.io/discontinued-long-term-support-for-angularjs-cc066b82e65a
@andykud63
@andykud63 Год назад
16 - like! Type number
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
😆
@AstroSardaukar
@AstroSardaukar Год назад
I regret you don't have Typescript + Vue. I'll have to switch to another tutorial when you reach React.
@cradleofkaschenko2057
@cradleofkaschenko2057 Год назад
Yeah! First like!
@piuspolocha
@piuspolocha Год назад
Make a video building a website with admin and user dashboard using js and nodejs Thanks you are the best
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Thank you for the request!
@ahmad-murery
@ahmad-murery Год назад
I used to call it type casting, but I think it's better to stick to the official documentation. 13:50 getElementById('#img') although we can use the hash sign in ID attribute value but it may confuse the user and make him think we're using a css selector here. Thanks Dave 💯🚀
@ScriptRaccoon
@ScriptRaccoon Год назад
You're right, that actually should be document.getElementById("img"). Dave used document.querySelector("#img") before that, so the ID is actually "img" and not "#img".
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Oof! Tired eyes! 👀 I'm glad it did not change the concept I was talking about in anyway, but if I had truly been selecting from the DOM, this would not be what I wanted 😆... I agree on the documentation. It is definitely discussed / searched for / etc under both phrases, and I think that could add to confusion.
@ahmad-murery
@ahmad-murery Год назад
@@DaveGrayTeachesCode Thanks to your tired eyes I found something to comment on 😁
@jamshid5995
@jamshid5995 Год назад
👍💥💥💥
@maraujo1160
@maraujo1160 Год назад
// My solution const year = document.getElementById("year") as HTMLSpanElement const thisYear = new Date().getFullYear() year.setAttribute("datetime", (thisYear as unknown) as string) year.textContent = (thisYear as unknown) as string
@bobkazamakis5169
@bobkazamakis5169 Год назад
Amazing series, is the Next13 course gonna be out in November?
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Thank you! No set timeline. This series needs to complete and maybe a few single topic tutorials between.
@ugodesigns1076
@ugodesigns1076 Год назад
.....This is my variant..... const year = document.getElementById("year") as HTMLElement const thisYear = (new Date().getFullYear() as unknown) as string year.setAttribute("datetime", thisYear) year.textContent = thisYear
Далее
TypeScript Classes Tutorial | TS for Beginners Lesson
31:34
PUBG Mobile СТАЛ ПЛАТНЫМ! 😳
00:31
Просмотров 95 тыс.
React Typescript Tutorial for Beginners
28:24
Просмотров 79 тыс.
Typescript for Beginners - Starter Lesson
25:30
Просмотров 71 тыс.
TypeScript Generics are EASY once you know this
22:21
Просмотров 139 тыс.
Typescript Functions | Basics Tutorial for Beginners
32:12
Typescript Generics | Beginners Tutorial with Examples
24:43
Why use Type and not Interface in TypeScript
14:12
Просмотров 210 тыс.