This is genius! Man, you're great! You always bring up something extraordinary! Keep it up!
@Typed-RocksКүн бұрын
Thanks for the kind words. I will try my best 🤘
@markcampbell2491Күн бұрын
On a par with Matt Pocock, quality content
@Typed-RocksКүн бұрын
Thank you. This is a huge honour to hear 🙏
@frstylolКүн бұрын
Okay, you teach me something new about typescript every single time.
@Typed-RocksКүн бұрын
Thank you, really glad to hear 🙏👍
@TheSP337Күн бұрын
Amazing work! I often find myself come to your videos to do something neat and advanced. I would love to see if you have any TS tips for React components, hooks, props - anything.
@Typed-RocksКүн бұрын
I‘m more of an Angular guy but I will look into it. 😁👍
@Md_sadiq_Md2 сағат бұрын
Disclaimer: It's unlikely u get this type of example in real life is highly unlikely
@Typed-RocksСағат бұрын
It was found in the node util package type declaration file so this looks like a „real world“ example 😁. And I think types like these, which are copied, exist quite often to be honest.
@Md_sadiq_MdСағат бұрын
@Typed-Rocks Uhh kinds agree Might look like I had seen it very few times
@CaldaronКүн бұрын
swiss matt pocock ftw!
@Typed-RocksКүн бұрын
Thanks 😁
@deatho0ne587Күн бұрын
Guessing each of colors has a CSS thing somewhere, so you would also still have to add `orange` roughly 4 times in CSS or maybe 1 time with some SCSS.
@Typed-RocksКүн бұрын
This is only used once as a type for the styleText in the utils. So in there you only need it once. But of course if you need it somewhere else, you would have to derive from it.
@eqprogКүн бұрын
That’s what SASS (etc) is for.
@deatho0ne587Күн бұрын
@@eqprog Which is why I clearly mentioned SCSS.
@CyanureNekoКүн бұрын
Is things like this that makes me love TS more and more every day, just found about it recently and used it to force the user to send limit the user input to use in some object sizes, use variables only (-- or var(--...)), while I couldn't do something as strict as this video is still such a good example
@Typed-RocksКүн бұрын
Great idea👍
@dave6012Күн бұрын
I was hoping you were going to do modifiers as well in a clever way, but I guess that’s an exercise left to the viewer 😄
@Typed-RocksКүн бұрын
Exactly 😜.
@virtualfi4 сағат бұрын
Great video, love the channel. For discussion sake here is an argument why NOT change it and leave it in more original form. Understanding original version takes me literally 0 seconds. I see what is going on. For second version I need to stop foe some time, analyze it, "Oh... nice clever i get it now, clever!" that is real con. If you need to stop to look at simple stuff you attention is driven away from essentials. In real life scenario especially on bigger project where a team of ppl is involved I would stick to simpler version as a rule of thumb.
@gilbes1139Күн бұрын
So the type named Bright contains no bright colors. uhh...
@Typed-RocksКүн бұрын
Naming things is the hardest part in programming 😜
@ValorHeartКүн бұрын
Nice!
@Typed-RocksКүн бұрын
Thanks! Really appreciate it🙏
@wvovaw305218 сағат бұрын
And keep in mind that the Typescript Language Server may go brr if your template type is too complex
@Typed-Rocks18 сағат бұрын
TypeScript will stop at a maximum recursive depth of 1000 so this is a safety net 😁. Of course you can make the ts server make sweat a bit, but it is really capable