Skip to content

TypeScript

TypeScript is a type system bolted onto a language that never wanted one.

That sounds like a complaint. It is not.

The constraint is what makes it interesting: the types have to describe JavaScript as it is actually written, not as a type theorist would prefer it. So the answers are rarely the textbook ones.

These are notes on the parts that took me a while to get right.

For the long version, see The TypeScript Blackbook.