TypeScript at Slack

An excellent subhead by Felix Rieseberg: How I Learned to Stop Worrying & Trust the Compiler.

I'd wager that some of the popularity of SCSS was due to that fact that any valid CSS was valid SCSS, so you could baby step into SCSS on an existing codebase fairly easily. The same is true with TypeScript:

Modern JavaScript is valid TypeScript, meaning that one can use TypeScript without changing a single line of code. This allowed us to use "gradual typing" by enabling the compiler and the static analysis early, without suspending work on critical bug fixes or new features.

And, also like SCSS, you get immediate benefit from the baby stepping. You'll find bugs right away:

... the more lines of code a human writes, the more inevitable it becomes to misspell a property, assume the parent of a nested object to always exist, or to use a non-standard error object.

What appeals to me the most though, is what TypeScript does to your IDE:

TypeScript understands which properties and methods are available on certain objects, enabling your editor to do the same. An autocomplete system that only uses words in the current document feels barbaric afterward.

Direct Link →