TypeScript FINALLY fixed this...

Поділитися
Вставка
  • Опубліковано 7 січ 2025

КОМЕНТАРІ • 46

  • @JollyCoding
    @JollyCoding  8 місяців тому +6

    Have you run into one of these issues before? Excited for 5.5?

  • @everyumclust7985
    @everyumclust7985 8 місяців тому +21

    1:17 that accidental asterisk terrified the shit out of me

    • @JollyCoding
      @JollyCoding  8 місяців тому +4

      haha new syntax just dropped

    • @sparx_super
      @sparx_super 8 місяців тому

      YIELD YIELD

    • @guruware8612
      @guruware8612 8 місяців тому

      Why is asterix so scarry ?

    • @overoad
      @overoad 8 місяців тому +2

      @@guruware8612 fuckin' pointers!

    • @2006Pk
      @2006Pk 8 місяців тому

      @@overoad INTERNAL POINTER VARIABLE

  • @IkraamDev
    @IkraamDev 8 місяців тому +7

    Good fixes and a great showcase. Thank you.

  • @wardxela
    @wardxela 8 місяців тому +1

    That array.filter was so frustrating at the moment. So glad they finally fixed that.

  • @HtotheG
    @HtotheG 8 місяців тому +4

    Filter type inferences I have been wanting for as long as i have used typescript, especially with JSDoc where you can't directly say Object is Type, I am going to be updating so quickly when this comes out I can't wait

    • @taragnor
      @taragnor 8 місяців тому

      Yeah filter type inference is a gamechanger.

    • @guai9632
      @guai9632 8 місяців тому

      couldn't one just make an extension himself?

  • @virtual5754
    @virtual5754 8 місяців тому +4

    It is why I learnt reduce method. Always bothered me that I had to filter array, then map it, and then add type checks again because it forgets which type it should be.

  • @jesteriruka
    @jesteriruka 8 місяців тому +5

    The dumb filter intellisense always annoy me, this is the greatest change in a while.

  • @evanrosz
    @evanrosz 8 місяців тому

    Damn, that's so sick. I always wished for this, but wasn't holding my breath- what a nice surprise.

  • @antonarbus
    @antonarbus 8 місяців тому

    finally filter works as expected, thanks for the video 👍

  • @FernandoMumbach
    @FernandoMumbach 8 місяців тому

    I'm so happy to know I won't need `.filter((data): data is Exclude => !!data)` anymore!

  • @ilonachan
    @ilonachan 8 місяців тому

    For the constant index accesses, it seems very helpful, but will that really be okay? Sure the regular indexing won't cause any side effects, but proxies exist! It'd be severe abuse of notation, but theoretically `proxy[key]` needn't return the same value, or even the same type of value both times, right? Will TypeScript be able to understand this, or will we be able to tell it that explicitly somehow? Or is this just broken with no fix?

  • @guai9632
    @guai9632 8 місяців тому

    what if obj[key] return another object the next time you call it after the check?

  • @realbigsquid
    @realbigsquid 8 місяців тому

    Holy 🐄 I've been figuring these issues a lot lately

  • @jinushaun
    @jinushaun 8 місяців тому

    Nice. I hit this problem all the time.

  • @yaroslavromanov8357
    @yaroslavromanov8357 8 місяців тому

    I have this filter issue ALL the time

  • @Caldaron
    @Caldaron 8 місяців тому

    fuck yeah, digestible typescript news, let's go ;-)

  • @darksinge
    @darksinge 8 місяців тому

    Finally, this feature was way overdue.

  • @prashlovessamosa
    @prashlovessamosa 8 місяців тому

    thanks for sharing.

  • @guruware8612
    @guruware8612 8 місяців тому

    So it got a string instead of a "schtring" - great.
    And more awesome, typescript finally recognizes types !!
    Then i bailed out.

  • @reubenporter9907
    @reubenporter9907 8 місяців тому

    Great explanation mate!

  • @aram5642
    @aram5642 6 місяців тому

    But don't get too optimistic with predicates, things like `.filter(Boolean)` or `.filter(item => !!item)` won't do. You can't be too lazy with your predicates.

  • @zeteya
    @zeteya 8 місяців тому

    Hope it doesn't make typescript slower than it already is.

  • @imornar
    @imornar 8 місяців тому

    Nice showcase ty! Sidenote: you should really put some effort to learn how to properly touch type, its painful to watch

    • @JollyCoding
      @JollyCoding  8 місяців тому +1

      I actually can, but my current setup uses a wave arm mic which goes right across the centre of my keyboard…
      Need to get an overhead mic arm!

  • @mnzrk
    @mnzrk 8 місяців тому

    wow a programmer who doesn’t know blind typing? first time for everything, I guess
    good content though, even if a bit too lengthy

    • @JollyCoding
      @JollyCoding  8 місяців тому

      Someone else mentioned this, it’s more that my mic arm is low profile and goes across the centre of my keyboard so my hands hit it when typing. Need to get an overhead one

  • @nerdchannel5866
    @nerdchannel5866 8 місяців тому +2

    Do people actually use TypeScript?...

    • @JollyCoding
      @JollyCoding  8 місяців тому +6

      If you want less headaches from production bugs yeah!

    • @dharylovey
      @dharylovey 8 місяців тому +8

      Yes we do

    • @jessequartey
      @jessequartey 8 місяців тому +2

      I can't build a production app without typescript these days. When I think of the future. But we have to do a complete rewrite after a few years

    • @ExileEditing
      @ExileEditing 8 місяців тому +4

      If you want to build fast and don't care about types then I guess you just go with js but I originally started with C# and enjoy types so I only use typescript.

    • @gerkim62
      @gerkim62 8 місяців тому +1

      is this a joke @nerd

  • @mzerone-g6m
    @mzerone-g6m 8 місяців тому +1

    Please this no DX inhancement that what typescript needs to make from version 1 even php have types better than typescript

    • @dave-7117
      @dave-7117 8 місяців тому +3

      The Typenscript type system is one of the best existing ones. The limitation here is just JS

    • @mzerone-g6m
      @mzerone-g6m 8 місяців тому +1

      @@dave-7117 i think you just making joke here the typescript type system one of the worst i worked with typescript before be the cool thing todo from angular 2 days and i will tell you even php have better type system maybe it does not have all fancy feature and does not support generic but we need to admit that it catches more bugs and does not be on your way please try do thing in laravel, better compiler and error messages and stack-trace for me is better than type-system

    • @Dom-zy1qy
      @Dom-zy1qy 8 місяців тому

      ​@@mzerone-g6mI think typescript typesystem is pretty nice to work with... wouldn't say it's bad at all

    • @mnzrk
      @mnzrk 8 місяців тому

      @@mzerone-g6m stop trolling for attention dude, you’ve gotta be better than this