This is the most absurd TS video of all time and I love it.
@matthewvaccaro88772 күн бұрын
Would you consider Drizzles object interface a fluent interface? Instead of .method chaining its one object. Great video btw!
@matthewvaccaro88772 күн бұрын
Seriously this was fucking awesome! Very curious to see you take things another layer deeper!
@DASPRiD7 күн бұрын
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.
@gbkEmilgbk10 күн бұрын
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?
@CodingEnjoyer11 күн бұрын
just use zod
@trunglevan86011 күн бұрын
Hi, I hope you have a good date 🎉. You can share code in video on your github yet 😊
@EmilDainese12 күн бұрын
Top
@wilk8513 күн бұрын
why didn't you used ${branches[*]} for array? and then for loop?
@kashmirtechtv294819 күн бұрын
Not making the mental model still.. Video is very good at the start
@kashmirtechtv294820 күн бұрын
Aren't we making the things harder unnecessarily?
@buscandolaverdad829520 күн бұрын
Really cool explanation. Thank you
@latakantsharma313425 күн бұрын
Could you please make 1 new 9n this fresh
@MohammadLsk27 күн бұрын
Awesome video. At 4:52, i think using git diff <commit hash> will show the differences against the working tree not the head
@jakorev_racing29 күн бұрын
my ts compiler cannot see that method
@gilsonconceicao5201Ай бұрын
Nice tips. Thanks.
@jawngeeАй бұрын
ok now do the async version
@solomanterАй бұрын
like it, very helpful. Thanks!
@GiangNguyen-gt3qkАй бұрын
Great content! Thanks for your concise and complete explanation.
@zakir.nuriievАй бұрын
Thanks for such a good explanation!
@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Ай бұрын
I'm more impressed by how good you are at pronouncing "iterator" back to back lol great vid btw
@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Ай бұрын
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Ай бұрын
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Ай бұрын
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Ай бұрын
You're THE G🔥🔥
@jackharles2366Ай бұрын
Which font are you using ?
@andrew-burgessАй бұрын
Mono Lisa
@adampattersonАй бұрын
Did I detect a bit of a Canadian / Ontario accent?
@andrew-burgessАй бұрын
Ha! Spot on!
@adampattersonАй бұрын
@@andrew-burgess I suspected when you said mouse. 😂
@maximus1172Ай бұрын
finally got the right intuition regarding this !! thanks a ton !!
@FullflexnoАй бұрын
Thank you for a super video. Press keeps posting! You have been missed👌
@meyou118Ай бұрын
fantastic info! thx for sharing
@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Ай бұрын
really great video about generators. thank you
@dimitro.cardelliniАй бұрын
pretty nice )
@ionelCristianLupu_Ай бұрын
love the content. Nice job. Keep it up
@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Ай бұрын
Why wouldn't it be backwards compatible?
@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Ай бұрын
and right off the bat you jump into an already existing toml file and don't explain where you got it.
@KoaxjoАй бұрын
Do you have the link to thé plugin shellscript or neovim ?
@MortyCJАй бұрын
2 years old and TS still hasn’t fixed these “issues”. Love the video!
@yutsacarm8021Ай бұрын
damn it is a very good video
@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Ай бұрын
Iterators & generators. Keep them coming. Waiting for it.
@RomanDawydkinАй бұрын
Another use of "never" is the return type for functions that always throw an error.
@coder_one2 ай бұрын
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....
@jrnxf2 ай бұрын
best yt thumbnail in a long time lmao
@jeetchheda89162 ай бұрын
but i was able to directly set a regex as the type for my variable.🙂 It worked for me
@abrahambamidele78102 ай бұрын
You got yourself one more subscriber . With this video You just saved me from a problem I have been facing for four days
@sanyamjain70582 ай бұрын
nice explanation and i would like know about "for await...of", async generator, async iterator and async iterable protocols, it confuses me alot..
@andrew-burgess2 ай бұрын
Thanks! I'm planning to talk about the async versions soon!