Комментарии:
Love love love it ❤
ОтветитьReinvented the class
ОтветитьThat’s actually insanely cool
ОтветитьHow to get all these items in dropdown liat
ОтветитьClojureScript still wins
ОтветитьImagine if this existed in css, lot of libraries would see their last days
ОтветитьUseless
ОтветитьThere was only one time I really applied this feature, love typescript
ОтветитьWooooo
ОтветитьWhy?
Ответить👏👏👏👏
ОтветитьI dont really like the way they implemented template types.
It's not possible to make a hex color type (`#${"a" | "b" | ... | "z" | "A" | ... | "Z" | 0 | ... | 9}`), because it would be to many possible combinations. They either could have just checked, if the input matches the template instead of generating and saving every possible combination and so limitating the range of possiblities, or, what would be even better, implemented regex based template types.
Something that I also miss in ts, are conditional Interface fields.
To always use
type T = {
a: true;
b: number;
} | {
a: false;
}
really sucks.
I would really like something like this.
interface I {
a: boolean;
b[a]: number;
}
cool
ОтветитьLol, I just did this like 2 days ago except manually
ОтветитьSO MAGICAL 🤩
ОтветитьWow... Now that is a lovely type system! Gets me more interested in picking up Typescript for sure!
ОтветитьYou always make confused explaination
ОтветитьI'm creating a card game with different colors and values. This literally saves my life. 7 Lines of code result in 105 unique cards.
ОтветитьLiterally magic.
ОтветитьSo... they have limited your ability to use whatever whenever, but then have added a way around it? I've will never understand why TypeScript exists.
ОтветитьThis might be the most glorious thing I’ve witnessed all week
ОтветитьJesus JavaScript Is such a mess
ОтветитьI lost my last braincell trying to be a programmer now i dont know what 1 + 1 in math anymore
ОтветитьJS the world
ОтветитьWhy not just use an array?
ОтветитьReally useful 🤠
Ответить😳👍👍
ОтветитьYou did it, you implemented elm in ts
ОтветитьHow are you adding emoji?
ОтветитьMeanwhile in JS u don’t even need to worry about types, but thanks.
ОтветитьThose are like inline enums
ОтветитьInstead of arrogantly bragging about Template Haskell, I'm going to try implementing a similar process to what was shown to determine ease or difficulty
ОтветитьYou can't have a language called "TypeScript" without it involving a little type theory.
ОтветитьSo this is C++ Enum with emojis?
ОтветитьWhat the fuck is a type
ОтветитьNice, now I can make my code completely incomprehensible and ensure my continued employment. After all, no one they hire will be able to decipher the ultra-nested hell I use this feature to create in my codebase.
ОтветитьI don’t understand this sorry
ОтветитьCould you do a video about types and interfaces. And when to use what. The seem to partially be redundant.
ОтветитьWait till typescript devs learn what a struct is
ОтветитьTypeScript is actually unnecessary trash bloat tho, change my mind ¯\_(ツ)_/¯
ОтветитьDidn’t understand any of this, thanks
ОтветитьHow to derive an array of these 25 types. Or do I need to do it the hard way?
ОтветитьAre these equivalent to c# enums?
ОтветитьWow, almost looks like an algebraic data type. I have never seen anything like that, yet I see that again
ОтветитьThat looks very cool
ОтветитьHow do I save this
ОтветитьNo
ОтветитьI love ts
ОтветитьVery interesting
Ответить