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
  • Фільми й анімація

КОМЕНТАРІ • 52

  • @ovuokeaghwotu2389
    @ovuokeaghwotu2389 Рік тому +6

    I just want to say the thumbnail for this crash course is beautiful! I clicked it as soon as I saw it.

    • @DesignedByIman
      @DesignedByIman Рік тому +1

      I think they’re AI generated

    • @mattpocockuk
      @mattpocockuk  Рік тому +8

      Nope! We work with a human illustrator, Michelle Holik

  • @expertdev
    @expertdev Рік тому +20

    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. 👍

  • @PraiseYeezus
    @PraiseYeezus Рік тому +1

    Love this. Will definitely be following this series even though I've been using Typescript for a while.

  • @JonBrookes
    @JonBrookes Рік тому +1

    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.

  • @loic.bertrand
    @loic.bertrand Рік тому +5

    I already know all of this, but I'm still watching because I like the way you explain things :)

  • @real23lions
    @real23lions Рік тому

    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.

  • @leopolon
    @leopolon Рік тому +2

    Can't wait for the awesome types done quick this year!

  • @je12emy
    @je12emy Рік тому +1

    Awesome speed run, thanks!

  • @bmehder
    @bmehder Рік тому +3

    More of this please. 🙂

  • @faizanahmed9304
    @faizanahmed9304 Рік тому +1

    Thank you Matt for this speed run, yeah one video on Generics as well.

  • @ota-ke
    @ota-ke Рік тому +1

    Awesome content! Keep bringing it to us

  • @makkapoya
    @makkapoya Рік тому

    Thank you, Matt! Really nice lessons on TypeScript

  • @rockNbrain
    @rockNbrain Рік тому

    Great job Matt, tks a lot ❤

  • @gentlemanjack4083
    @gentlemanjack4083 Рік тому

    Really really cool stuff !

  • @AbdullahTBukhari
    @AbdullahTBukhari 11 місяців тому +1

    how very innocent of matt to say "you silly goose" haha 😊😊

  • @oluAbiola
    @oluAbiola Рік тому

    Thank you Matt

  • @PROJECTJMUSIC
    @PROJECTJMUSIC Рік тому

    Just what I needed - thanks!

  • @jasonstewart7983
    @jasonstewart7983 Рік тому

    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.

  • @erlanggadewasakti
    @erlanggadewasakti Рік тому

    your videos and course is so awesome

  • @shafu_xyz
    @shafu_xyz Рік тому

    Awesome loved it!

  • @hsider
    @hsider Рік тому +1

    Your TS exercices git repo is amazing, I cloned it and strarted fixing them on by one , I've learned some tricks, thank you

  • @zombiefacesupreme
    @zombiefacesupreme Рік тому

    I'm still annoyed that UA-cam never suggested this to me! Please keep making long-form content like this!

  • @kasperaamodt
    @kasperaamodt Рік тому

    Great video!

  • @testaenzo620
    @testaenzo620 Рік тому

    "Of course I misspelled it, you silly goose". Made my day man again

  • @ColinRichardson
    @ColinRichardson Рік тому +1

    I do love a big exciting video

  • @maksym7279
    @maksym7279 Рік тому

    Nice! Thanks!

  • @johnpeterson8493
    @johnpeterson8493 Рік тому

    awesome thanks!

  • @arjunyonzan8557
    @arjunyonzan8557 Рік тому

    Thanks. Good times.

  • @berkaygurcan141
    @berkaygurcan141 Рік тому +4

    Beginner is a nice content that is a reminder and explains its logic as a level for me . Please do part 2 :)

  • @RobertoDuransh
    @RobertoDuransh Рік тому

    love it thanks for this one(you won a new susriber )
    waiting for the generics speedrun ;)

  • @vladko9623
    @vladko9623 Рік тому +1

    Thank you from Ukraine , for this speedrun. You have amazing skill to explain smth. )

  • @romanachis
    @romanachis Рік тому +2

    Just what I wanted 😬

  • @lukasmolcic5143
    @lukasmolcic5143 Рік тому

    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

  • @toastrecon
    @toastrecon Рік тому +1

    Just installed the Error Translator!

  • @jeffnikelson5824
    @jeffnikelson5824 Рік тому

    Hey Matt, think you can add the link to the other video now at 16:05

  • @TimothyBrake
    @TimothyBrake Рік тому

    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.

  • @MrNovado
    @MrNovado Рік тому

    @Matt Pocock, forgot to add the ts-error translator into description. Otherwise, cool tutorial!

  • @GustavoDiaz93
    @GustavoDiaz93 Рік тому

    Your British accent make your videos sound polite from my point of view hahaha.

  • @norude
    @norude Рік тому

    So Typescript is basically a compiler, that compiles down to js. Why not compile down to wasm to get performance and compatibility benefits?

  • @aArcziMetin2
    @aArcziMetin2 Рік тому

    Are you planning to make some paid course in the future, I really can't find a lot of good advanced Ts topics.

    • @mattpocockuk
      @mattpocockuk  Рік тому

      It's here right now! totaltypescript.com

  • @EricAndre615
    @EricAndre615 Рік тому

    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.

    • @mattpocockuk
      @mattpocockuk  Рік тому

      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.

    • @EricAndre615
      @EricAndre615 Рік тому

      @@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.

    • @mattpocockuk
      @mattpocockuk  Рік тому

      @@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.

  • @ShaharHarshuv
    @ShaharHarshuv Рік тому

    You generated the thumbnail with midjourney right? 😂

  • @86_magical30
    @86_magical30 Рік тому

    At least you weren't running in this tut 😅😅😅😅

  • @tiagoagm
    @tiagoagm Рік тому

    Nice video Matt.