New TypeScript 5.6 Checks
6:11
2 ай бұрын
3 typescript tips from my own code
12:11
Advent of Code ... in Types Only!
9:34
5 Tips for Classier TypeScript
9:01
The Power of TypeScript Generics
6:42
Пікірлер
@matthewvaccaro8877
@matthewvaccaro8877 2 күн бұрын
This is the most absurd TS video of all time and I love it.
@matthewvaccaro8877
@matthewvaccaro8877 2 күн бұрын
Would you consider Drizzles object interface a fluent interface? Instead of .method chaining its one object. Great video btw!
@matthewvaccaro8877
@matthewvaccaro8877 2 күн бұрын
Seriously this was fucking awesome! Very curious to see you take things another layer deeper!
@DASPRiD
@DASPRiD 7 күн бұрын
If you work with objects and need branded types, there's a better approach though: Use custom symbols as a branding keys, that way you avoid any kind of possible collision.
@gbkEmilgbk
@gbkEmilgbk 10 күн бұрын
Question to pipes 4:56: why use pipes when you can create a function that does it directly: - ? const stringToDateAndTime = (n: string) => { let d= new Date(n); let s = d.toISOSTring(); let a = s.split("T"); return {date:a[0], time: a[1]}; } Your pipe example has more code and the code is more nested (less redable). So what are the benefits of using pipes?
@CodingEnjoyer
@CodingEnjoyer 11 күн бұрын
just use zod
@trunglevan860
@trunglevan860 11 күн бұрын
Hi, I hope you have a good date 🎉. You can share code in video on your github yet 😊
@EmilDainese
@EmilDainese 12 күн бұрын
Top
@wilk85
@wilk85 13 күн бұрын
why didn't you used ${branches[*]} for array? and then for loop?
@kashmirtechtv2948
@kashmirtechtv2948 19 күн бұрын
Not making the mental model still.. Video is very good at the start
@kashmirtechtv2948
@kashmirtechtv2948 20 күн бұрын
Aren't we making the things harder unnecessarily?
@buscandolaverdad8295
@buscandolaverdad8295 20 күн бұрын
Really cool explanation. Thank you
@latakantsharma3134
@latakantsharma3134 25 күн бұрын
Could you please make 1 new 9n this fresh
@MohammadLsk
@MohammadLsk 27 күн бұрын
Awesome video. At 4:52, i think using git diff <commit hash> will show the differences against the working tree not the head
@jakorev_racing
@jakorev_racing 29 күн бұрын
my ts compiler cannot see that method
@gilsonconceicao5201
@gilsonconceicao5201 Ай бұрын
Nice tips. Thanks.
@jawngee
@jawngee Ай бұрын
ok now do the async version
@solomanter
@solomanter Ай бұрын
like it, very helpful. Thanks!
@GiangNguyen-gt3qk
@GiangNguyen-gt3qk Ай бұрын
Great content! Thanks for your concise and complete explanation.
@zakir.nuriiev
@zakir.nuriiev Ай бұрын
Thanks for such a good explanation!
@tichopad
@tichopad Ай бұрын
Damn you have a way of explaining stuff that's just crystal clear. Very nice! And thanks for diving into these more advanced aspects of the language!
@smash3689
@smash3689 Ай бұрын
I'm more impressed by how good you are at pronouncing "iterator" back to back lol great vid btw
@JuicyBenji
@JuicyBenji Ай бұрын
This came in my recommended at just the right time. I was reading documentation on a framework I love that uses this pattern in an example and this was the first time I’ve encountered a generator. Great video, great explanation. Thank you
@follantic
@follantic Ай бұрын
So nice for interacting with a database without using a ton of memory. fs.readFile(string, "utf8") returns a string btw. Without "utf8" you'll get a Buffer.
@Luxcium
@Luxcium Ай бұрын
Apparently I have watched the video and even dropped a like and I just realize that I have no idea when but this was released 3 days ago i would love to been taught about how normal generators can yield promises and the benefit of of such exotic thing when compared to the more normal asyncGenerator that people use normally when they have promises
@Luxcium
@Luxcium Ай бұрын
i would love to been taught about how normal generators can yield promises and the benefit of of such exotic thing when compared to the more normal asyncGenerator that people use normally when they have promises
@frstylol
@frstylol Ай бұрын
You're THE G🔥🔥
@jackharles2366
@jackharles2366 Ай бұрын
Which font are you using ?
@andrew-burgess
@andrew-burgess Ай бұрын
Mono Lisa
@adampatterson
@adampatterson Ай бұрын
Did I detect a bit of a Canadian / Ontario accent?
@andrew-burgess
@andrew-burgess Ай бұрын
Ha! Spot on!
@adampatterson
@adampatterson Ай бұрын
@@andrew-burgess I suspected when you said mouse. 😂
@maximus1172
@maximus1172 Ай бұрын
finally got the right intuition regarding this !! thanks a ton !!
@Fullflexno
@Fullflexno Ай бұрын
Thank you for a super video. Press keeps posting! You have been missed👌
@meyou118
@meyou118 Ай бұрын
fantastic info! thx for sharing
@parlor3115
@parlor3115 Ай бұрын
Async iterators like regular iterators are best used when you have a situation where you want to write a function that loops over a collection and executes some generic code, but also needs to offer the possibility to run custom code as well. The solution is having that custom code be a callback and passing it to said function. Iterators (async or not) make it possible to achieve the same purpose without the callback by allowing access to the yielded values using a for-loop after the generic code is executed. The result is a linear and cleaner code!
@devKev34
@devKev34 Ай бұрын
really great video about generators. thank you
@dimitro.cardellini
@dimitro.cardellini Ай бұрын
pretty nice )
@ionelCristianLupu_
@ionelCristianLupu_ Ай бұрын
love the content. Nice job. Keep it up
@mahadevovnl
@mahadevovnl Ай бұрын
It would be nice if you could explain to the viewer why the people behind ES/JS decided to go with the sneaky asterisk for generators. Because: async function* bla() { ... } Should have been: async generator bla() { ... } Or even: async generator function bla() { ... } Or even better: any function would become a generator when you use `yield` and you don't have to mark a function as being a generator. The powers that be decided that JS has to be backwards compatible or something, and that's why it wouldn't work. One solution would've been to make JS files "versioned" in a sense (like writing /* ES6 */ on top of your file or something-a feature toggle), but they decided against that, too. I think it pollutes the ES/JS language by having weird nonsense like this, and doesn't help its already suffering reputation as a weird language.
@omermarom6592
@omermarom6592 Ай бұрын
Why wouldn't it be backwards compatible?
@mahadevovnl
@mahadevovnl Ай бұрын
@@omermarom6592 Old code might have variables named "generator" for example and that would cause syntax panic clashes. By using `function*`, JS could introduce generators without touching existing identifiers, keeping compatibility intact and avoiding unexpected errors. So it kinda makes sense, but I would still have preferred it if they simply added an ES version flag to JS files.
@nizexlizzy
@nizexlizzy Ай бұрын
and right off the bat you jump into an already existing toml file and don't explain where you got it.
@Koaxjo
@Koaxjo Ай бұрын
Do you have the link to thé plugin shellscript or neovim ?
@MortyCJ
@MortyCJ Ай бұрын
2 years old and TS still hasn’t fixed these “issues”. Love the video!
@yutsacarm8021
@yutsacarm8021 Ай бұрын
damn it is a very good video
@akam9919
@akam9919 Ай бұрын
I wish I saw this waaaaaaaay earlier. BTW, for the table function in the last example, you can actually use it with just "return this as QueryBuilder<Tables & { [X in N]: T }>". This however will not work for versions less than 5.1.6. Library authors seeking to support older TS versions or projects stuck on such codebases will have to create a new object unfortunately.
@the_street_coder4433
@the_street_coder4433 Ай бұрын
Iterators & generators. Keep them coming. Waiting for it.
@RomanDawydkin
@RomanDawydkin Ай бұрын
Another use of "never" is the return type for functions that always throw an error.
@coder_one
@coder_one 2 ай бұрын
Great video. We learned what Generators and Iterators are and how to use them in the least useful case in life - writing a function that generates fibbonacci numbers. I completely do not understand why such materials are created....
@jrnxf
@jrnxf 2 ай бұрын
best yt thumbnail in a long time lmao
@jeetchheda8916
@jeetchheda8916 2 ай бұрын
but i was able to directly set a regex as the type for my variable.🙂 It worked for me
@abrahambamidele7810
@abrahambamidele7810 2 ай бұрын
You got yourself one more subscriber . With this video You just saved me from a problem I have been facing for four days
@sanyamjain7058
@sanyamjain7058 2 ай бұрын
nice explanation and i would like know about "for await...of", async generator, async iterator and async iterable protocols, it confuses me alot..
@andrew-burgess
@andrew-burgess 2 ай бұрын
Thanks! I'm planning to talk about the async versions soon!