3 ms·
Exactly. This is _not_ Javascript. It's Typescript, which compiles into Javascript, but adds in guarantees that, for instance, what I'm getting _is_ a dog.
by AndrewDucker 14y ago
Exactly. This is _not_ Javascript. It's Typescript, which compiles into Javascript, but adds in guarantees that, for instance, what I'm getting _is_ a dog.
- SideburnsOfDoom 14y agoTypescript is not JavaScript, but all JavaScript is TypeScript, including JavaScript that works as discussed above. It's just a bit funny that in Typescript are both a language that benefits from having generics and a language that doesn't need them.