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
"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.
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?
@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);
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. 🙂
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.
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
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
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.
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
@@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.
@@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.
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
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
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 💯🚀
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".
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.
// 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
.....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