Тёмный

The Hardest Part Of TypeScript 

Colt Steele
Подписаться 269 тыс.
Просмотров 7 тыс.
50% 1

Let's talk TypeScript Generics! Coupon for my new TypeScript course: www.udemy.com/course/learn-ty...

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

 

8 июл 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 35   
@RodrigoDAgostino
@RodrigoDAgostino Год назад
I finished your TypeScript course a couple of weeks ago, and I must say it is pretty solid, I enjoyed it quite a lot. I wish there was a Colt Steele’s course for every single thing I wanna learn :)
@Donkle365
@Donkle365 Год назад
I would love that for sure, the value of his courses is phenomenal (that is, if you want to learn the topic)
@diegosepulveda8691
@diegosepulveda8691 Год назад
Colt is awesome, he knows what every student struggle and explain it like no other
@andrecoetzer7032
@andrecoetzer7032 Год назад
Colt just wanted to say thank you again. I recently enrolled in a part time university and I can't tell you enough how incredible your web dev on udemy is compared to what they teaching at this university. I'm basically just there for the qualification. If it wasn't for you my dream of being a dev would not be viable. Thank you
@johnm8358
@johnm8358 Год назад
Thought I escaped generics when I stopped java programming
@kresimircosic3753
@kresimircosic3753 Год назад
Just think of them as variables for types. You are telling your editor that this here is gonna be of my type named User. The editor can then assume that everything inside the code that references that variable that was of type is now User, and it knows it's an object that has certain properties, methods etc...
@mentoriii3475
@mentoriii3475 Год назад
for anyone wondering we can have multiple generic types in the same function for example: sample(arr:T[], num:V, str:Y) also we can have generic interface properties
@leonardocitton4627
@leonardocitton4627 Год назад
great tutorial, thanks!
@davidgentilli7944
@davidgentilli7944 Год назад
Great explanation!
@himbary
@himbary Год назад
I used to watch your web development courses as a beginner and now I work full time employed with typescript. Thank you 🙏 Generics are the one thing I always struggle with. Would love to see more TS content.
@bez1196
@bez1196 Год назад
Are you self taught?
@himbary
@himbary Год назад
@@bez1196 yes
@bez1196
@bez1196 Год назад
@@himbary how long did you study before you felt ready to start applying? Did you make your portfolio projects in vanilla JS?
@DruSerkes
@DruSerkes Год назад
Yeah I’m gonna have to get this course now
@Mitsunee_
@Mitsunee_ Год назад
as a fun challenge for generics try to type a reimplementation of the map and reduce methods Arrays have. Just had to do that today for my List class (based on the doubly linked list from your JS Algorithms course that I really need to go continue at some point) and it was really amazing when I got it to work the way I wanted it to where the type is automatically inferred based on the callback return types :)
@logvnjs
@logvnjs Год назад
Awesome video! keep them coming! You are probably my favorite teacher!
@petecapecod
@petecapecod Год назад
Thanks Colt, that was just what I needed! 🙌🏻 Also love that the VS Code TS wheel is spinning the whole time 🤣
@OfficialFendre
@OfficialFendre Год назад
Thanks it was very helpful!
@MailsonWei
@MailsonWei Год назад
great video thanks
@jellyfish1772
@jellyfish1772 11 месяцев назад
Thank you sir
@ziyadkader6767
@ziyadkader6767 Год назад
thanks, great video ! please do a video on the infer keyword and the type keyword and complex types
@sobeyyy
@sobeyyy Год назад
Great video!
@paulclarke4099
@paulclarke4099 Год назад
Excellent, would love to see you cover a minimalistic set of basic TypeScript that offers the biggest ROI for the minimum investment in TypeScript. I think a full on implementation of TypeScript is overkill for the average JS developer but the basic concepts like typed variables and parameters to functions, enums and basic generics as you have shown here certainly offer a big ROI for just a small effort. Thanks Colt 😀👍
@SK74102
@SK74102 Год назад
Thanks. I was just struggling to understand generics. I'm also not sure when I should use interfaces over types or vice versa. I recall reading somewhere that some use the former for behavior and the latter for data.
@cogwheelLearning
@cogwheelLearning Год назад
pretty cool🏆
@jellyfish1772
@jellyfish1772 11 месяцев назад
well dire scared me
@t.roll21
@t.roll21 Год назад
3rd
@mattiarasulo9934
@mattiarasulo9934 Год назад
Why using this super-complex syntax when js does everything for you? 🤔
@dasten123
@dasten123 Год назад
No, this is not the hardest part of TypeScript. This is the hardest part of TypeScript: interface Bogus) | Parameters & (Length extends 0 | 1) ? F : (arg_0: typeof E => R>: (type: T extends { 0: infer U } ? [U] : T extends { 0?: infer U } ? [U?] : never;
@gidmanone
@gidmanone Год назад
exactly. I dont blame Colt Steele. the man probably doesn't use Typescript as a developer. He is a teacher don't forget .
@wasd3108
@wasd3108 Год назад
"complex enough" what? xD pretty sure this can be seen as basics
@Thorax232
@Thorax232 Год назад
Generics are scary for first-time programmers. So, it's on the complex side of the basics. But you're right, still in that category.
@gidmanone
@gidmanone Год назад
I don't think generics per se is what trips people up. What trips people up is Conditional Types. Those Type challenges and gymnastics that are entirely done in "Type land". Here is what I'm talking about 👇 👇 type ParseQueryString = S extends '' ? {} : Tokenize extends infer Q ? { [K in (Q & [string, unknown][])[number][0]]: Normalize } : never
@Thorax232
@Thorax232 Год назад
I wish the course got more into this. I feel like anyone ready to learn TS could have picked up all that information very quickly from docs and trial/error. Or just any course that uses typescript could cover its topics "inline" without confusing much. TypeScripts type system is (allegedly) Turing complete. This allows for some pretty crazy-looking types like this. I wish he would have gone as in-depth with TS as he did for the Git bootcamp.
@gidmanone
@gidmanone Год назад
@@Thorax232 Thank you for this input. There are literally no course out there that goes deep into the actual Type System and it's super frustrating. I thought I was going to find that in this course.
Далее
JS Arrow Functions: Everything You Need to Know
20:23
Learn TypeScript Generics In 13 Minutes
12:52
Просмотров 234 тыс.
Git Rebase Vs. Merge
19:59
Просмотров 106 тыс.
Generics: The most intimidating TypeScript feature
18:19
JavaScript Getters and Setters Explained
9:11
Просмотров 20 тыс.
Enums considered harmful
9:23
Просмотров 197 тыс.
Master JavaScript Array Reduce Method In 10 Minutes
10:51
8 Design Patterns | Prime Reacts
22:10
Просмотров 390 тыс.
TypeScript - The Basics
12:01
Просмотров 1,5 млн
GPT-4 API Crash Course - Get Coding In 10 Minutes
11:49