Avoid These Typescript Mistakes

Поделиться
HTML-код
  • Опубликовано: 11 сен 2023
  • 💖 Show your support by checking out my courses!
    developedbyed.com
    -------------------------------------------------------------------------------------------------
    Wohoo typescript! Let's talk about how typescript and it's typechecking. What happens at runtime and some common pitfalls devs might run into.
    -------------------------------------------------------------------------------------------------
    👨‍💻Connect with me
    Twitter: / developedbyed
    Instagram: / developedbyed
    Github: github.com/developedbyed/
    -------------------------------------------------------------------------------------------------
    🎶 Dope music
    C Y G N - Bikini Palm-trees chll.to/d0798a7f
    C Y G N - Emotions chll.to/bfeb2b66
    C Y G N - Let it go chll.to/41ba6c49
    #programming #javascript #typescript
  • НаукаНаука

Комментарии • 35

  • @developedbyed
    @developedbyed  9 месяцев назад +53

    More Typescript? 👀

    • @mrinaltewary
      @mrinaltewary 9 месяцев назад

      Yeah more

    • @JohnRod
      @JohnRod 9 месяцев назад

      I would be so super happy if you use one of my covers as your bg music while teaching us of more typescript.

    • @Dazeyy
      @Dazeyy 9 месяцев назад

      I want much more.

    • @holiqibrahim
      @holiqibrahim 9 месяцев назад

      Yeah bro, I need it more

    • @phaneendra777
      @phaneendra777 9 месяцев назад

      Sure agre Ed😁

  • @serpercody5347
    @serpercody5347 8 месяцев назад

    Great video as always Ed. Honestly you could make a video just talking about anything and I would still watch it, can't wait for more typescript from you.

  • @dotpenji
    @dotpenji 8 месяцев назад +1

    Great job explaining TypeScript concepts! How do you recommend handling API response type inconsistencies to avoid runtime issues?

  • @Se7en7upp
    @Se7en7upp 9 месяцев назад

    hey ed, do you have a typescript course ? a video about it ? Thanks for your amazing work !

  • @anonymoussloth6687
    @anonymoussloth6687 9 месяцев назад +1

    But why does that first error not get resolved with instanceof? Doesn't typescript have type narrowing?

    • @mantas9827
      @mantas9827 8 месяцев назад +3

      Because enemy is an interface not a class. TypeScript interfaces only exist during compile-time for type checking, and they are not present in the resulting JavaScript code after compilation. In the compiled JavaScript, Enemy is not defined, so the instanceof check fails. So to put simply enemy is not a real thing when the code runs, it's just a helpful idea while writing code and therefore the runtime check fails, while in the 'power' in stranger example it's a valid runtime check so everything works.

  • @vatsalyasinghi438
    @vatsalyasinghi438 9 месяцев назад

    Hi, video series on Bun ??

  • @sparshtiwari5485
    @sparshtiwari5485 9 месяцев назад

    Isn't Svelte and more frameworks switching back to Vanilla JS just because of the complexity that TS has????

    • @firen777
      @firen777 9 месяцев назад

      Svelte ditches typescript because they don't want the extra compilation and build step. However, they have plenty of JSDoc typing, which contains most of the Typescript linting/type checking benefits, as well as allowing Typescript use to keep using the framework with no issues.
      Turbo 8 did it because the author think being a contrarian is a sign of smartness and flipping off contributors is based.

  • @yajirushik2871
    @yajirushik2871 9 месяцев назад

    copyScript, the world's most advanced programming language which is included in every single of created and already will be with any created in future.

  • @thiscris_
    @thiscris_ 9 месяцев назад

    Font and theme, please?

    • @AleksanderGjinollari
      @AleksanderGjinollari 9 месяцев назад

      i think the theme is "community material theme ocean high contrast"

  • @manishsawlani363
    @manishsawlani363 9 месяцев назад +1

    Which theme is that?

    • @AleksanderGjinollari
      @AleksanderGjinollari 9 месяцев назад

      I think it's "community material theme ocean high contrast"

  • @alasassi5889
    @alasassi5889 9 месяцев назад

    Do you think AI will replace developers.(be honest 🙂)

  • @MrKasoa
    @MrKasoa 9 месяцев назад

    Current trend : just avoid TypeScript 😂😂

  • @okosunfamily1081
    @okosunfamily1081 9 месяцев назад

    I'm the first dev

  • @MyDpop
    @MyDpop 9 месяцев назад

    I miss the magic trick 🪄 you used to do 🧙‍♂