Today I went through the TypeScript 5 minute starter guide. @swyx says TypeScript is all the rage now and he knows his shit.
Here's what I found 👇#200wordsTIL
TypeScript uses the same syntax type annotations as Adobe's Flex did back in the dark ages 👉 variable: type
Most languages do it the other way around. Is this better? Does it have a technical reason? I'd love to know. Who can we ask?
Maybe people working on Flex at Adobe moved to Microsoft to invent TypeScript? 🤔
Interfaces let you define object shapes. No more wondering whether you're passing correct-looking blobs of properties. TypeScript can verify it for you. You can nest that stuff too.
This is great. Biggest source of bugs in my code 👌
Interfaces alone make TS worth it.
Prefix class constructor arguments with "public" and the compiler turns them into properties. Nice gimmick but meh.
TypeScript provides editor- and compile-time checks only.