Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

I like TypeScript for what is probably a different reason than most people. I have started using TypeScript as a great languge for book examples. The language is so easy to read and understand, and it is so quick to install the compiler and runtime. Right now I am using it for many of the examples for a book Introduction to Cognitive Science that I am writing. TypeScript is a great universal language for thinking about code and algorithms.


view as:

Ahem... TypeScript is 100% Javascript, they only add optional type annotations. The "to-ES5" compilation serves a different issue - that's just a different version of Javascript.

But I use the surface TypeScript syntax for the book examples. It is a clear and concise notation, which is why I like it for this use case.

I have no idea what you mean by

    > surface TypeScript syntax
TypeScript syntax is... Javascript (ES 2015 or above) - plus the optional type annotations and some few minor additions like "enum" or decorators. Things like "interface" don't compile to actual code, they only serve the compile-time type checks.

Legal | privacy