TypeScript 5.2 new features review!

Поділитися
Вставка
  • Опубліковано 3 лип 2023
  • The TypeScript 5.2 beta was announced a few days ago, and there are some pretty banger new features coming up! Let's take a quick look at what we'll getting soon.
    My Links
    shaky.sh
    shaky.sh/tools
    / andrew8088
    mastodon.social/@andrew8088
    #typescript #coding #programming #javascript
  • Наука та технологія

КОМЕНТАРІ • 39

  • @gosnooky
    @gosnooky Рік тому +10

    Excited about the decorator stuff. I work a lot with NestJS, and this looks like it will replace reflect-metadata, and give a more idiomatic way to create custom decorators. Using looks interesting, too.

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

    Because 0:15 seconds into the video and my beloved friends #3.5 wants me to quote him *« TypeScript, as a superset of JavaScript, goes beyond just introducing type annotations. It actively incorporates new ECMAScript features by closely following the ECMAScript proposal process. By doing so, TypeScript ensures that developers can leverage the latest language enhancements even before they become widely supported. This approach provides a more productive and future-proof development experience, offering the benefits of static typing, advanced tooling, and the newest JavaScript capabilities. With TypeScript, developers can improve code quality, catch errors early, and enhance the maintainability of their JavaScript applications, all while enjoying the advantages of a superset that extends the language's capabilities. »* that one friend who knows about everything but was like… _giving up about learning stuff around September 2021 for some reasons 😅_

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

    I'm excited about some videos on the `using` keyword because I don't see how it's really useful yet

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

    When will the browsers support TS....

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

    1:33 As a C# dev, I see some heavy C#/Microsoft ideas usage in TypeScript, using is just one of the examples.

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

      TSC => (tokenization, AST, => converted to JavaScript) V8 => Assembly => CPU (stack or heap)

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

      Well, considering that C# and Typescript were both created by Anders Hejlsberg from Microsoft that's unsurprising

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

    I'd give my left arm to be able to use decorators on regular functions… They are so useful in Python!!

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

      You can use stable or experimental (context based) decorators on regular functions.

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

      @@BrockFredin any documentation on that? the ts docs only says: "A Decorator is a special kind of declaration that can be attached to a class declaration, method, accessor, property, or parameter."

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

    Not sure, if you can use using for object pools, unless the dispose function gets called even when the reference to the object is running our of scope. But I rather think the object itself needs to be garbage collected, which won't happen as long as an object is inside a pool.

    • @andrew-burgess
      @andrew-burgess  Рік тому

      Right! But you could use the dispose function to reset the internal state of the object.

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

      @@andrew-burgess Yes, but the object is dead to you anyway and not available to be pooled again after resetting the internal state. If it would be accessible afterwards, it hadn't been garbage collected in the first place because there is still a reference pointing to it. A little egg, hen situation here 🙂

    • @andrew-burgess
      @andrew-burgess  Рік тому

      Ooh, yeah, gotcha! So I think how it works is that dispose is called when the scope closes, not when the object is GC-ed. sorry for the confusion!

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

      @@andremichelle Good catch there! Didn't think about that.

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

    Good channel! Why is there music in this? 😛

    • @andrew-burgess
      @andrew-burgess  Рік тому

      Experimenting with ways to keep the video interesting! Too much?

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

      @@andrew-burgess For me? Too many great channels are forcing music into the sound-bed - like I'm there for that!

    • @andrew-burgess
      @andrew-burgess  Рік тому +1

      Fair feedback, I appreciate it! Thanks for taking the time to comment and let me know 👍

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

      @@andrew-burgess I actually like the music; I think it's a nice atmosphere.

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

    Dude typescript is becoming more and more like syntactic c#. But not actually c#, so smoke and mirrors of strong typing, reflection and many other features.

    • @andrew-burgess
      @andrew-burgess  Рік тому +1

      Good ol' Microsoft!

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

      ⁠@@andrew-burgess Developers! Developers! Developers! Developers! Developers! Developers! Developers! Developers! Developers! Developers! Developers! Developers! Developers! Developers! 💦💦💦 _(Yes ChatGPT knew it was 14 times and a lot of sweat)_ but it is not like it was back then because Steve Balmer is on the record saying that open source is a cancer… 😮😮😮😮

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

    I was skeptical of decorators until recently using the TSOA library, now I'm very excited about the potential of them in typescript.

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

    😅 I don’t know how much comments about your first 24 seconds you will have but you can just pretend that it is part of the overall plan to boost the engagement 😂😂😂😂❤

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

      O¹° perhaps I will be the only one person who is going to say how TypeScript is the best version of JavaScript (not just the type stuff but the TC39 level #3 stuff 🎉🎉🎉🎉

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

    minor correction at 1:38 you mention about garbage collection, which is not the case, it doe not need to be garbage collected inorder for dispose method to be called. This feature has been in c# for a very long time, good to know javascript copied it.

    • @andrew-burgess
      @andrew-burgess  Рік тому

      Yep, you're totally right. Realized after posting this that I meant that dispose is called when the variable goes out of scope. Thanks!

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

    another feature from C#. Not surprising since it's Microsoft

  • @buddy.abc123
    @buddy.abc123 Рік тому

    It's giving c#

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

    The using declaration is obviously the master piece but a programming language is not supposed to be adding a coma for me and doing that is such a nice gesture it is just magic and very appreciated… forget about the language services and the fact that VSCode is already just full of that magic already and then think of the old school programming language and then if you can show me that Fortran or COBOL or any other modern languages are so nice like that… it is like an actor doing a soliloquy and is braking the 4th wall just to talk with you about something like taking the job of the narrator 😂😂😂😂 it is definitely my favourite feature 😅😅😅😅

  • @theSUBVERSIVE
    @theSUBVERSIVE 10 місяців тому

    I wish I could properly understand this video... hahahahahaha...

  • @kevinbatdorf
    @kevinbatdorf Рік тому +5

    Sucks you need to make trash thumbnails like that to get your good content out there. I get it though.

    • @andrew-burgess
      @andrew-burgess  Рік тому +3

      Honestly, thumbnails are the hardest part of this whole thing. Let me know if you're aware of any channels in this space with decent thumbnails, been trying to learn how to do 'em better recently.

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

      @@andrew-burgess Anything but the stupid faces... please. They are honestly the worst thing about youtube and usually indicate low-quality content. I wouldn't even open a video like this if I wasn't already familiar with your content before. You should be setting trends instead of following the bad ones - like you already do with you videos.

    • @andrew-burgess
      @andrew-burgess  Рік тому

      Yeah, I get that. I feel the same way. But on the other hand, they do seem to get the views 🤷 dunno what to do.

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

      I like the new auto comma feature; you do not need them in type declarations but when your are creating a instance of that type. I always forget the latter.

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

    That `using` thing is so... strange. One word, easy to miss, and it does hidden code things. That's a nightmare waiting to happen. Code is supposed to be linear and visible. What a weird and unnecessary addition.

  • @dkazmer2
    @dkazmer2 7 місяців тому

    I hate stupid optimizations like that...just put the fkn comma in yourself! Jeez.
    "Declarations" or "decorators"?