TypeScript Speedrun: Crash Course for Beginners
Вставка
- Опубліковано 31 лип 2024
- The ultimate TypeScript tutorial is the TypeScript docs. In this video, I take you on a crash course of the TypeScript handbook, focusing on the beginners section.
To continue your journey, take Matt's beginner's course. It's free, interactive, and fast-paced.
www.totaltypescript.com/tutor...
Follow me on Twitter: / mattpocockuk
TypeScript Error Translator: mattpocock.com/vscode
00:00 Intro
00:37 TypeScript for JavaScript Programmers
03:16 TypeScript Handbook
03:26 Runtime errors
03:44 Error Messages
05:26 3rd-party libraries
06:08 Installing TypeScript
06:27 Running tsc
07:23 TypeScript on CI
08:11 Strictness
09:39 Should you be strict?
10:35 string, number, boolean
10:56 Arrays
11:50 Arrays vs Tuples
12:16 any
13:41 Typing variables
14:11 Typing functions
15:02 Object types
16:05 Optional object properties
16:45 Union types
18:05 Type and Interface
18:59 Type assertions
20:06 as any
20:42 Literal types
22:26 null and undefined
22:56 Outro - Фільми й анімація
I just want to say the thumbnail for this crash course is beautiful! I clicked it as soon as I saw it.
I think they’re AI generated
Nope! We work with a human illustrator, Michelle Holik
Hey Matt, you're an awesome tutor, the way you structure your videos and how you express it in magnificient manner makes you a pionner of Typescript and any other advanced topic. I really enjoy your tutorials, thanks for share your talent and knowledge with all of us. 👍
Love this. Will definitely be following this series even though I've been using Typescript for a while.
Like the missing 'notes on' or 'study guide' like you got when reading Shakespear or Chaucer but for the Typscript documentation. A much needed and trusted roadmap for going to the right notes and necessarily in the right order. Thanks for publishing this walkthrough. The timestamps are also very usefull for use as reference in future re-views of the same.
I already know all of this, but I'm still watching because I like the way you explain things :)
Love this. I'm new to coding and JS. I got stuck on what was a simple problem for a week because I didn't understand the error messages. Going through your videos are very helpful.
Can't wait for the awesome types done quick this year!
Awesome speed run, thanks!
More of this please. 🙂
Thank you Matt for this speed run, yeah one video on Generics as well.
Awesome content! Keep bringing it to us
Thank you, Matt! Really nice lessons on TypeScript
Great job Matt, tks a lot ❤
Really really cool stuff !
how very innocent of matt to say "you silly goose" haha 😊😊
Thank you Matt
Just what I needed - thanks!
nice one, Matt. I wish I had discovered your error plugin 6 months ago! Better late I guess. I'm really glad that you're dissecting the handbook and highlighting the key takehomes. Showing "obj as undefined as Type2" is super helpful - it took me months to figure that out on my own. And warning about "any" is great.
your videos and course is so awesome
Awesome loved it!
Your TS exercices git repo is amazing, I cloned it and strarted fixing them on by one , I've learned some tricks, thank you
I'm still annoyed that UA-cam never suggested this to me! Please keep making long-form content like this!
Great video!
"Of course I misspelled it, you silly goose". Made my day man again
I do love a big exciting video
Nice! Thanks!
awesome thanks!
Thanks. Good times.
Beginner is a nice content that is a reminder and explains its logic as a level for me . Please do part 2 :)
love it thanks for this one(you won a new susriber )
waiting for the generics speedrun ;)
Thank you from Ukraine , for this speedrun. You have amazing skill to explain smth. )
Just what I wanted 😬
when you mentioned that the ts errors are famous for not being super readable, the thought came to my mind, hey I bet an extension could easily fix that, paused your video went on google to search does something like that exist and landed back on another video of yours XD
Just installed the Error Translator!
me too
Hey Matt, think you can add the link to the other video now at 16:05
Great summary 👍 Typescript is what JavaScript should have been years ago but somehow less intelligent people took control and a big mess was created that now more intelligent people are fixing. Union types are dirty feature though and exposes a missing Typescript features: overloading of methods.
@Matt Pocock, forgot to add the ts-error translator into description. Otherwise, cool tutorial!
Your British accent make your videos sound polite from my point of view hahaha.
So Typescript is basically a compiler, that compiles down to js. Why not compile down to wasm to get performance and compatibility benefits?
See AssemblyScript
Are you planning to make some paid course in the future, I really can't find a lot of good advanced Ts topics.
It's here right now! totaltypescript.com
You mention to avoid `any`, but say there are times when you may need it ("advanced usecases"). I argue this is incorrect and `any` should never be used. Instead use the typesafe version `unknown` that does the same thing as `any`, but is typesafe and forces you to deal with it when the value typed as `unknown` is used. I'm currently working on a very large Typescript code base and I found no use case for `any` where `unknown` is not the better option.
There are several advanced use cases, such as improving perf in OSS libs. I've been interviewing maintainers for TT and they find 'as any' very useful.
@@mattpocockuk Okay, and I guess at this point we would have to look at specific examples. However, I'm unsure of what you mean by "several advanced use cases, such as improving perf in OSS libs" improving the performance at build time? I don't think there's any way to improve performance of something at runtime with types. But, I could be wrong and I'm always eager to bite my tongue and learn something new.
@@EricAndre615 I mean improving type checking perf. any is a way to reduce the number of instantiations the type checker makes, improving the speed of TypeScript for users.
This makes a big difference - it's the difference between the red lines in your IDE appearing instantly, or taking 5-10 seconds.
You generated the thumbnail with midjourney right? 😂
At least you weren't running in this tut 😅😅😅😅
Nice video Matt.