4 NEW TypeScript 5.5 Features!

  Рет қаралды 44,793

Web Dev Simplified

Web Dev Simplified

Күн бұрын

Пікірлер: 77
@RicoKareem
@RicoKareem 4 ай бұрын
The side-by-side, before-after demo is fire! A natural instructor.
@codinginflow
@codinginflow 4 ай бұрын
The filter part is amazing!
@stuartallen2001
@stuartallen2001 4 ай бұрын
If you're subscribed to web dev simplified i recommend you subscribe to @codinginflow too. Thank you both for cool tutorials 🙏
@sourandbitter3062
@sourandbitter3062 4 ай бұрын
No need to add the return type "x is number" anymore. Good stuff.
@seppo7531
@seppo7531 4 ай бұрын
in TS 5.4 and earlier there is a `(x: unknown): x is type` syntax, so you could do const filtered = array.filter((x): x is number => x !== null) And TS would understand the filtered would be `number[]`
@FilipeAguiarCarvalho
@FilipeAguiarCarvalho 4 ай бұрын
That filter feature would help me a lot last month in a project for my master's degree.
@klirmio21
@klirmio21 4 ай бұрын
Thank you Kyle I’m a developer thanks to you
@orelben
@orelben 4 ай бұрын
Good, I was waiting for the set methods thanks
@josuedelossantos9442
@josuedelossantos9442 4 ай бұрын
Thank you, this is good to know!
@ShadowVipers
@ShadowVipers 4 ай бұрын
In TS 5.4 you had to use type predicates to change the array type with filter.
@maciejzettt
@maciejzettt 4 ай бұрын
That's exactly what he presented 😅
@Whelp_Studios_Official
@Whelp_Studios_Official 4 ай бұрын
Hello Mr. Kyle, thank you for the videos you always post,most especially on Javascript ,react and react native alongside roadmaps I hope this comment reaches you cos I need guidance. I'm an aircraft engineer with embedded systems and electronics experience and them being my passion, the one thing I wish to be experienced on is web and mobile app development but all these years, I barely get anywhere in my learning, more like tutorial hell. I do hope you can guide me so I can turn my ideas into reality even if they already exist, I would love to make websites,web apps and mobile apps that are fully in my control.
@miskaknapek
@miskaknapek 4 ай бұрын
thank you very much for a concise and very informative video!
@playyourway2963
@playyourway2963 Ай бұрын
thank you !
@krtirtho
@krtirtho 4 ай бұрын
Ecma Script adding Set in Javascript but not adding Set Operations until now is the most Brendan Eich thing to do
@evalaviniabucur1789
@evalaviniabucur1789 4 ай бұрын
Can typescript 5.5 be used with Nextjs 14? No earlier than today I was struggling with some records from my database which I was trying to filter down to get rid of some null things and I ran into this problem :))
@WebDevSimplified
@WebDevSimplified 4 ай бұрын
Yes. TS does not depend on the version of your Next.js app so you should be just fine using it with Next.js.
@evalaviniabucur1789
@evalaviniabucur1789 4 ай бұрын
@@WebDevSimplified thank you! Yes, I know it's not dependent, but the reason I asked this question is because I work with Vercel and I was wondering if perhaps they use their own version of typescript or the version specified in my project's package.json. I didn't want to encounter build errors because of (eventually) their version.
@seppo7531
@seppo7531 4 ай бұрын
const filtered = array.filter((x): x is YourType => x !== null) would've done the trick
@normanneal35
@normanneal35 4 ай бұрын
Most of them look like "bugfixes" rather than "features" 😄
@deucebigs9860
@deucebigs9860 4 ай бұрын
Is your typescript simplified course completely free of Next.js and React? I like the theory behind Svelte so much more and am trying to learn that, which makes me realize I should get a better foundation in TS first so I don't want any react or next BS in it while I'm learning, but you seem to prefer react and next.
@WebDevSimplified
@WebDevSimplified 4 ай бұрын
My TS course is entirely focused on just TS. I do have a bonus module on React included for free in the course, but it is not a part of the main course and is purely just a bonus. All the main content in the course is focused entirely on plain TS with no other library or framework.
@deucebigs9860
@deucebigs9860 4 ай бұрын
@@WebDevSimplified Awesome! I'll take a look at it when I get a chance.
@BonaventureOnuorah
@BonaventureOnuorah 4 ай бұрын
Typescript is an advanced linter
@MrJloa
@MrJloa 4 ай бұрын
Cool, but im still looking forward to proposal-type-annotations and get rid of ts abstraction
@MikeKaipis
@MikeKaipis 4 ай бұрын
three!
@mhdhasantadmori1346
@mhdhasantadmori1346 4 ай бұрын
one ! ♥
@waqasrahman1554
@waqasrahman1554 4 ай бұрын
I am on 5.3.3 and it is giving me no errors and type is showing number[]...even of the array is also number[] on hover
@erin1569
@erin1569 4 ай бұрын
Not sponsored by regex101 I see 4:29
@DMC888
@DMC888 4 ай бұрын
Adding code to fix these typescript errors is like letting the tail wag the dog. 🐕
@user-fed-yum
@user-fed-yum 4 ай бұрын
3:34 why are there semicolons at the start of each line?
@potatoho
@potatoho 4 ай бұрын
Without choosing one side or the other I'll just say.. it somehow became a flex for ES developers to memorize automatic semicolon insertion rules rather than putting them at the end of lines.
@juxuanu
@juxuanu 4 ай бұрын
1. You could already filter by simply adding: [1,2].filter((elem): elem is number => !!elem); 3. People using Jetbrains editors already had regex linting. I wonder if tsc should really check regex. Kiss.
@ezwtwrziehag1736
@ezwtwrziehag1736 4 ай бұрын
why are you shaking ur head all the time lol
@aryansabetnejad3886
@aryansabetnejad3886 4 ай бұрын
He tries to show that JS is so obvious & logical by shaking his head but it's already failed.
@bundiderp5109
@bundiderp5109 4 ай бұрын
Bobblehead Kyle
@blossomcherrypink
@blossomcherrypink 4 ай бұрын
So you comment on it and boost his weighting in the KZbin algorithm.
@user-888azim-97
@user-888azim-97 4 ай бұрын
😁
@user-888azim-97
@user-888azim-97 4 ай бұрын
love this shaking ))
@DiviskaAI
@DiviskaAI 4 ай бұрын
Two
@signalsensei
@signalsensei 4 ай бұрын
four
@Takatou__Yogiri
@Takatou__Yogiri 4 ай бұрын
Im absolute TS hater 👀.
@JamesJansson
@JamesJansson 4 ай бұрын
Using != and not !== when talking about types is hilarious.
@WebDevSimplified
@WebDevSimplified 4 ай бұрын
I almost always use != when checking for null or undefined. This is because null == undefined which means I can check for both null and undefined values at the same time. I almost never want to just check for null and not undefined.
@JamesJansson
@JamesJansson 4 ай бұрын
@@WebDevSimplified While I get your point, this would show up as an error in Prettier because it is confusing as to whether you actually meant it. You should either be explicit about both types, or do typeof elem === 'number'
@WebDevSimplified
@WebDevSimplified 4 ай бұрын
If you want my full opinion on when I use == and === I have a video talking about it. kzbin.info/www/bejne/eWa9h3Zqfa2af8k
@josipX
@josipX 4 ай бұрын
the head shaking is so alpha
@flexairz
@flexairz 4 ай бұрын
5
@gerkim62
@gerkim62 4 ай бұрын
at 1:35 instead of typing the type of value as any why don't you type it as unknown, it seems more logical to me
@unknownguywholovespizza
@unknownguywholovespizza 4 ай бұрын
Yes my thoughts exactly. This is a simple function so it's not an issue. But in production, I would use it to prevent using the value in an unintentional way
@webshipon1941
@webshipon1941 4 ай бұрын
Hi three 😂😂
@ImTheDot
@ImTheDot 4 ай бұрын
.
@paulmurphy1144
@paulmurphy1144 4 ай бұрын
So filtering in TS now allows code that would also have just worked in JS years ago 😂
@katemc516
@katemc516 4 ай бұрын
Wait, people still use JavaScript? 😅
@Wentris71
@Wentris71 4 ай бұрын
@@katemc516yeah) ant type code with JS docs 😂
@PanicAtProduction
@PanicAtProduction 4 ай бұрын
These kind of logic checks make typescript extremely slower in large repos.
@kalvikaring1304
@kalvikaring1304 4 ай бұрын
sorry, but i have to say, you have smart talk but your your head shaking is pretty annoying, if you can do videos without head shakes when i can watch them too without getting nervous. thank you
I'm Ditching Try/Catch for Good!
10:29
Web Dev Simplified
Рет қаралды 179 М.
Why Signals Are Better Than React Hooks
16:30
Web Dev Simplified
Рет қаралды 488 М.
МЕНЯ УКУСИЛ ПАУК #shorts
00:23
Паша Осадчий
Рет қаралды 5 МЛН
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 110 МЛН
How to Fight a Gross Man 😡
00:19
Alan Chikin Chow
Рет қаралды 15 МЛН
Generics: The most intimidating TypeScript feature
18:19
Matt Pocock
Рет қаралды 183 М.
Learn Closures In 13 Minutes
13:22
Web Dev Simplified
Рет қаралды 70 М.
Why use Type and not Interface in TypeScript
14:12
ByteGrad
Рет қаралды 215 М.
Only The Best Developers Understand How This Works
18:32
Web Dev Simplified
Рет қаралды 113 М.
Learn TypeScript Generics In 13 Minutes
12:52
Web Dev Simplified
Рет қаралды 283 М.
@property Is One Of The Coolest New CSS Features
10:41
Web Dev Simplified
Рет қаралды 43 М.
TypeScript Generics are EASY once you know this
22:21
ByteGrad
Рет қаралды 143 М.
This Folder Structure Makes Me 100% More Productive
24:36
Web Dev Simplified
Рет қаралды 95 М.
I Cannot Believe TypeScript Recommends You Do This!
7:45
Web Dev Simplified
Рет қаралды 177 М.