Комментарии:
I love ts
ОтветитьNo
ОтветитьHow do I save this
ОтветитьThat looks very cool
ОтветитьWow, almost looks like an algebraic data type. I have never seen anything like that, yet I see that again
ОтветитьAre these equivalent to c# enums?
ОтветитьHow to derive an array of these 25 types. Or do I need to do it the hard way?
ОтветитьDidn’t understand any of this, thanks
ОтветитьTypeScript is actually unnecessary trash bloat tho, change my mind ¯\_(ツ)_/¯
ОтветитьWait till typescript devs learn what a struct is
ОтветитьCould you do a video about types and interfaces. And when to use what. The seem to partially be redundant.
ОтветитьI don’t understand this sorry
Ответить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.
ОтветитьWhat the fuck is a type
ОтветитьSo this is C++ Enum with emojis?
ОтветитьYou can't have a language called "TypeScript" without it involving a little type theory.
Ответить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
ОтветитьThose are like inline enums
ОтветитьMeanwhile in JS u don’t even need to worry about types, but thanks.
ОтветитьHow are you adding emoji?
Ответить😳👍👍
ОтветитьReally useful 🤠
ОтветитьWhy not just use an array?
ОтветитьJS the world
ОтветитьI lost my last braincell trying to be a programmer now i dont know what 1 + 1 in math anymore
ОтветитьJesus JavaScript Is such a mess
ОтветитьThis might be the most glorious thing I’ve witnessed all week
Ответить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.
ОтветитьLiterally magic.
Ответить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.
ОтветитьYou always make confused explaination
ОтветитьWow... Now that is a lovely type system! Gets me more interested in picking up Typescript for sure!
ОтветитьSO MAGICAL 🤩
Ответитьcool
Ответить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;
}
👏👏👏👏
ОтветитьWhy?
ОтветитьWooooo
ОтветитьThere was only one time I really applied this feature, love typescript
ОтветитьUseless
ОтветитьImagine if this existed in css, lot of libraries would see their last days
ОтветитьClojureScript still wins
ОтветитьHow to get all these items in dropdown liat
ОтветитьThat’s actually insanely cool
ОтветитьReinvented the class
ОтветитьLove love love it ❤
ОтветитьIf they keep doing this Typescript wont die for sure.
ОтветитьWhat practical benefits would this have? Trying to point to a single variable using multiple formulas or something? I'm new at coding, please be kind 😢. Interdependent yet independent?
Anyone use this in real world scenarios?
groaning noises
Ответить