TypeScript 5.2 new features review!

  Рет қаралды 8,385

Andrew Burgess

Andrew Burgess

Күн бұрын

Пікірлер: 39
@gosnooky
@gosnooky Жыл бұрын
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.
@greendsnow
@greendsnow Жыл бұрын
When will the browsers support TS....
@Luxcium
@Luxcium Жыл бұрын
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
@milutinke
@milutinke Жыл бұрын
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
@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.
@hugodsa89
@hugodsa89 Жыл бұрын
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 Жыл бұрын
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… 😮😮😮😮
@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!
@feldinho
@feldinho Жыл бұрын
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."
@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 Жыл бұрын
@@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 Жыл бұрын
Fair feedback, I appreciate it! Thanks for taking the time to comment and let me know 👍
@ja31ya
@ja31ya Жыл бұрын
@@andrew-burgess I actually like the music; I think it's a nice atmosphere.
@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 🎉🎉🎉🎉
@treyquattro
@treyquattro Жыл бұрын
another feature from C#. Not surprising since it's Microsoft
@siya.abc123
@siya.abc123 Жыл бұрын
It's giving c#
@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 Жыл бұрын
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 Жыл бұрын
I wish I could properly understand this video... hahahahahaha...
@kevinbatdorf
@kevinbatdorf Жыл бұрын
Sucks you need to make trash thumbnails like that to get your good content out there. I get it though.
@andrew-burgess
@andrew-burgess Жыл бұрын
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 Жыл бұрын
@@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 Жыл бұрын
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 Жыл бұрын
I hate stupid optimizations like that...just put the fkn comma in yourself! Jeez. "Declarations" or "decorators"?
how TypeScript 5.5 makes safer types in fewer keystrokes
7:48
Andrew Burgess
Рет қаралды 4,5 М.
as const: the most underrated TypeScript feature
5:38
Matt Pocock
Рет қаралды 129 М.
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
5 Signs of an Inexperienced Self-Taught Developer (and how to fix)
8:40
Next Generation TypeScript | Prime Reacts
24:45
ThePrimeTime
Рет қаралды 105 М.
Zig For the Uninitiated: Zig Interfaces
11:56
Tyler Calder
Рет қаралды 4,6 М.
5 Tips for Classier TypeScript
9:01
Andrew Burgess
Рет қаралды 5 М.
how to get better at typescript (feat. kysely)
16:57
Andrew Burgess
Рет қаралды 8 М.
TypeScript 5.3 Beta | Prime Reacts
16:35
ThePrimeTime
Рет қаралды 49 М.
Infer is easier than you think
13:38
Matt Pocock
Рет қаралды 96 М.
Interfaces vs Type Aliases: what's the difference?
10:20
Andrew Burgess
Рет қаралды 23 М.
5 deadly Rust anti-patterns to avoid
13:25
Let's Get Rusty
Рет қаралды 40 М.
TypeScript 5.4 - NoInfer, groupBy и улучшения
9:43
PurpleSchool | Anton Larichev
Рет қаралды 6 М.