The side-by-side, before-after demo is fire! A natural instructor.
@codinginflow4 ай бұрын
The filter part is amazing!
@stuartallen20014 ай бұрын
If you're subscribed to web dev simplified i recommend you subscribe to @codinginflow too. Thank you both for cool tutorials 🙏
@sourandbitter30624 ай бұрын
No need to add the return type "x is number" anymore. Good stuff.
@seppo75314 ай бұрын
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[]`
@FilipeAguiarCarvalho4 ай бұрын
That filter feature would help me a lot last month in a project for my master's degree.
@klirmio214 ай бұрын
Thank you Kyle I’m a developer thanks to you
@orelben4 ай бұрын
Good, I was waiting for the set methods thanks
@josuedelossantos94424 ай бұрын
Thank you, this is good to know!
@ShadowVipers4 ай бұрын
In TS 5.4 you had to use type predicates to change the array type with filter.
@maciejzettt4 ай бұрын
That's exactly what he presented 😅
@Whelp_Studios_Official4 ай бұрын
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.
@miskaknapek4 ай бұрын
thank you very much for a concise and very informative video!
@playyourway2963Ай бұрын
thank you !
@krtirtho4 ай бұрын
Ecma Script adding Set in Javascript but not adding Set Operations until now is the most Brendan Eich thing to do
@evalaviniabucur17894 ай бұрын
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 :))
@WebDevSimplified4 ай бұрын
Yes. TS does not depend on the version of your Next.js app so you should be just fine using it with Next.js.
@evalaviniabucur17894 ай бұрын
@@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.
@seppo75314 ай бұрын
const filtered = array.filter((x): x is YourType => x !== null) would've done the trick
@normanneal354 ай бұрын
Most of them look like "bugfixes" rather than "features" 😄
@deucebigs98604 ай бұрын
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.
@WebDevSimplified4 ай бұрын
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.
@deucebigs98604 ай бұрын
@@WebDevSimplified Awesome! I'll take a look at it when I get a chance.
@BonaventureOnuorah4 ай бұрын
Typescript is an advanced linter
@MrJloa4 ай бұрын
Cool, but im still looking forward to proposal-type-annotations and get rid of ts abstraction
@MikeKaipis4 ай бұрын
three!
@mhdhasantadmori13464 ай бұрын
one ! ♥
@waqasrahman15544 ай бұрын
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
@erin15694 ай бұрын
Not sponsored by regex101 I see 4:29
@DMC8884 ай бұрын
Adding code to fix these typescript errors is like letting the tail wag the dog. 🐕
@user-fed-yum4 ай бұрын
3:34 why are there semicolons at the start of each line?
@potatoho4 ай бұрын
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.
@juxuanu4 ай бұрын
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.
@ezwtwrziehag17364 ай бұрын
why are you shaking ur head all the time lol
@aryansabetnejad38864 ай бұрын
He tries to show that JS is so obvious & logical by shaking his head but it's already failed.
@bundiderp51094 ай бұрын
Bobblehead Kyle
@blossomcherrypink4 ай бұрын
So you comment on it and boost his weighting in the KZbin algorithm.
@user-888azim-974 ай бұрын
😁
@user-888azim-974 ай бұрын
love this shaking ))
@DiviskaAI4 ай бұрын
Two
@signalsensei4 ай бұрын
four
@Takatou__Yogiri4 ай бұрын
Im absolute TS hater 👀.
@JamesJansson4 ай бұрын
Using != and not !== when talking about types is hilarious.
@WebDevSimplified4 ай бұрын
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.
@JamesJansson4 ай бұрын
@@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'
@WebDevSimplified4 ай бұрын
If you want my full opinion on when I use == and === I have a video talking about it. kzbin.info/www/bejne/eWa9h3Zqfa2af8k
@josipX4 ай бұрын
the head shaking is so alpha
@flexairz4 ай бұрын
5
@gerkim624 ай бұрын
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
@unknownguywholovespizza4 ай бұрын
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
@webshipon19414 ай бұрын
Hi three 😂😂
@ImTheDot4 ай бұрын
.
@paulmurphy11444 ай бұрын
So filtering in TS now allows code that would also have just worked in JS years ago 😂
@katemc5164 ай бұрын
Wait, people still use JavaScript? 😅
@Wentris714 ай бұрын
@@katemc516yeah) ant type code with JS docs 😂
@PanicAtProduction4 ай бұрын
These kind of logic checks make typescript extremely slower in large repos.
@kalvikaring13044 ай бұрын
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