Тёмный

TypeScript Classes Tutorial | TS for Beginners Lesson 

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

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

 

14 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 71   
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
In this tutorial, we'll learn about Typescript Classes, implementing interfaces and much more. 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
@Leothebests
@Leothebests Год назад
I wanted to take a moment to express my heartfelt gratitude for the incredible work you do on your RU-vid channel. Your dedication to sharing valuable information and insights with the community is truly remarkable. Your videos have been an invaluable resource for me and countless others. Your clear explanations, practical tips, and willingness to share your knowledge for free have made a significant impact on our learning journeys. Your passion for what you do shines through in every video, and it's evident that you genuinely care about helping others succeed. Your generosity in sharing your expertise has not gone unnoticed, and I can't thank you enough for the time and effort you invest in creating such high-quality content. Please know that your work is deeply appreciated, and it has made a positive difference in my life. I look forward to every new video you release, knowing that I will continue to learn and grow thanks to your guidance. Keep up the fantastic work, and please know that you have a community of grateful learners supporting you every step of the way.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Thank you!
@Yarkaha
@Yarkaha Год назад
guy you're killing me with these typescript series!! Thank you. 🤟
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
You're welcome!
@hosamgnaba3205
@hosamgnaba3205 Год назад
keep striving for progress over perfection ... and I think it is the only thing we should do in web dev, thank you
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Yes, this is my daily reminder 💯🚀
@4444-c4s
@4444-c4s Год назад
Absolutely brilliant Teaching with Perfect Examples...No need to look up for 1000 videos...Just watching this and feeling Proud.😄
@faris.abuali
@faris.abuali Год назад
I love your way of explanation! Thank you a million, Mr. Dave!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Glad you liked it!
@oussemabouyahia474
@oussemabouyahia474 9 месяцев назад
really I would like to think you for the incredible efforts you made , it has been a while since my last revision to classes , and in addition to typescript you did great work to review class , inheritance and difference between private , protected and static ... impressive and thank you very much
@ronaldram9493
@ronaldram9493 3 месяца назад
Good tutorial. Clear and to the point. Please use semi-colons to close code, so new users are not learning bad coding habits.
@DaveGrayTeachesCode
@DaveGrayTeachesCode 3 месяца назад
Thanks! Semi-colons are a preference - not a bad habit in my opinion, but everyone has their own opinion on it for sure.
@MOJICA7257
@MOJICA7257 Год назад
Thanks Dave! Have a nice day!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Welcome! You, too!
@qazimtahir
@qazimtahir 7 месяцев назад
This is a superb tutorial. Thank you dear, Mr. Dave.
@mohammedsaeed3035
@mohammedsaeed3035 Год назад
Thanks Mr. Gray
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Welcome!
@ahmad-murery
@ahmad-murery Год назад
according to TypeScript docs / Parameter Properties Unless we want to do something with the params there is no need to re-assign them to the properties in the constructor body. Thanks Dave and have a nice day/evening
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
I'd like to reference this part of the docs. I feel like I am missing something but I don't think you are saying my examples are incorrect. Thanks Ahmad!
@ahmad-murery
@ahmad-murery Год назад
@@DaveGrayTeachesCode Hello Dave, I have tried to include the reference more than once but YT keeps deleting my comment, this is my last attempt and I hope that the algorithm is stupid enough to let it go this time 😁 in the official website there is a link to the Handbook, under the classes sections, please find the Parameter Properties heading, Thanks youtube for understanding 😁
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Thanks Ahmad! Yes, having more difficulty discussing here in the YT comments and preferring Discord more and more. Sorry to hear YT made it difficult to share. Thanks for pointing to the subheading I needed. I see their // No body necessary comment which they didn't really highlight in their paragraph above but it does appear to be optional. 😀 Always good notes my friend!
@ahmad-murery
@ahmad-murery Год назад
@@DaveGrayTeachesCode Sorry, I totally forgot about Discord 🤦‍♂ You're most welcome my friend 💯👍
@ahmedtakeshy
@ahmedtakeshy Год назад
Hey, Dave, I don't know if you will see this comment or not but I really hope that you will see it one day, I'm grateful to you for this masterpiece playlist, I was planning to leave a comment for you at the end of the playlist of Typescript but I couldn't wait because you really made OOP piece of cake and with your explanation and simple notice such as super() should come before assigning anything else, it's so simple to notice but you even mentioned it and these simple notes really make difference between some just make a video and some wanna deliver a message and teach somebody real thing, and for the record, I left a comment on next course that I wish if it was with JS so I decided to give Typescript a shot and it was the right call. I thank you again from my heart for this tremendous effort and wish you all luck with this excellent channel. ♥♥
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Thank you and good job for working on TypeScript! 🚀
@ahmedtakeshy
@ahmedtakeshy Год назад
@@DaveGrayTeachesCode Thank you for this great effort
@Ninnja34
@Ninnja34 9 месяцев назад
Amazing explanation ever, thank you so much for such quality work- tutorials!
@abdulrahmanagboolaosho3582
@abdulrahmanagboolaosho3582 Год назад
Thanks man I will be sure to watch this after I perfect react
@dhavalvanjara572
@dhavalvanjara572 Год назад
Always strive to learn from your content. Tonnes of thank you. Love from India. 🙏
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Thank you and hello to India! 👋
@k303k
@k303k 11 месяцев назад
I've learned a lot Thanks a million Dave!
@Jerry-xy1cg
@Jerry-xy1cg Год назад
Dave's videos are the best! Thanks, Dave.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Glad you like them!
@TravinskiyVladislav
@TravinskiyVladislav Год назад
Thank you, Dave
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Welcome!
@shehwar-ahmad
@shehwar-ahmad Год назад
Thankyouuuuu. Great tutorials man. keep it up!!!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
You're welcome!
@case6339
@case6339 Год назад
It would be beneficial to differentiate that public/protected/private keywords are TypeScript constructs (even though modern js has proper #private members now) while static keyword is a js construct for the uninitiated.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
I do not compare/contrast JS with TS most of the time. I do suggest my JavaScript for Beginners course as a pre-requisite for this series in lesson 1 and in the description. #private classes and static are covered there.
@sonamohialdin3376
@sonamohialdin3376 Год назад
Awesome tutorial thank you
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
You're welcome!
@omarakki705
@omarakki705 Год назад
Thank you so much dave can you please do a small MERN with type script
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
I will do more with TS in the future. Are there "small" MERN projects? 😀
@omarakki705
@omarakki705 Год назад
@@DaveGrayTeachesCodeI think 😁 thanks dave
@1conscience0dimension
@1conscience0dimension Год назад
thanks
@dzhaniivanov5837
@dzhaniivanov5837 Год назад
good explanations, keep going to share knowledge
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Thank you! 💯
@ScriptRaccoon
@ScriptRaccoon Год назад
Great tutorial as always! I was also wondering about the code repetition as for the class properties. The workaround you mentioned seems only to work when the constructor takes in these properties, not when I create them independently in the constructor body. So it seems that in many cases we cannot get rid of this code repetition. :/
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Thank you! True - it cannot always be avoided unless you want to pass in parameters. Good observation that I may not have clearly stated.
@alexbachynskyi4429
@alexbachynskyi4429 Год назад
Nice tutorial!!!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Thank you!
@abdulrahmanagboolaosho3582
@abdulrahmanagboolaosho3582 Год назад
congrats on 90k
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Thank you so much 😀
@adilnurkaliyev5328
@adilnurkaliyev5328 Год назад
Hi there, Dave could you explain why you put `return` on line 112. It looks extra to me because if `if` condition is true `else` condition will not execute even without `return`.
@Sylar7773
@Sylar7773 Год назад
Top!!! Thank YOU 😊
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Welcome!
@tusharbarman1924
@tusharbarman1924 Месяц назад
Are member functions by default public?
@wilsonibekason
@wilsonibekason Год назад
Wonderful video
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Thank you!
@alessandromatta6046
@alessandromatta6046 Год назад
I have a question: "member visibility"," Parameter Properties" and also "Typescript Constructor Shorthand" are the same thing???
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
Good question! No, they are not the same thing. You can use visibility modifiers in your constructor parameters as I show in the tutorial with public, private, protected, etc. Visibility modifiers set the member visibility. Parameter properties are created by prefixing a constructor argument with one of the visibility modifiers. (Reference: www.typescriptlang.org/docs/handbook/2/classes.html#parameter-properties) While "Typescript Constructor Shorthand" is not referenced in the docs, I do believe it refers to the Parameter Properties as they do in this article: dev.to/satansdeer/typescript-constructor-shorthand-3ibd
@justahumanwithamask4089
@justahumanwithamask4089 Месяц назад
This might actually make me consider learning java.
@sannoah3492
@sannoah3492 Год назад
hi, how do you get those different font color? do you use any extensions from vs code? thx for your video.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
A quick short about my VS Code theme choice: ru-vid.comdp4u1NNFhtE
@7doors847
@7doors847 Год назад
🔥Rock On!!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
🎸🎸🎸
@Nagimulia
@Nagimulia Год назад
Led Zeppelin it is cool!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Год назад
🎸🤘🎸🤘
@Sheshadri_Chamarty
@Sheshadri_Chamarty 9 месяцев назад
can someone explain me why should we always use this.name why not super.name
@flowerofash4439
@flowerofash4439 Год назад
basically an object to write an object for an object lol
@HyperionX-w5d
@HyperionX-w5d 6 месяцев назад
Really helped
Далее
Typescript Generics | Beginners Tutorial with Examples
24:43
Это было очень близко...
00:10
Просмотров 1 млн
РЫБКА С ПИВОМ
00:39
Просмотров 377 тыс.
10 React Antipatterns to Avoid - Code This, Not That!
8:55
STOP Using Classes In JavaScript | Prime Reacts
14:02
Просмотров 242 тыс.
JavaScript Promises  -- Tutorial for Beginners
37:05
Просмотров 126 тыс.
Typescript Functions | Basics Tutorial for Beginners
32:12
Generics: The most intimidating TypeScript feature
18:19