TypeScript is a superset of JavaScript and has been advertised like this ever since. Choosing TypeScript does not give you a free card to ditch JavaScript and its erratic behavior. Understanding JavaScript is key to understanding TypeScript. A type annotation is a way to explicitly tell which types to expect. The opposite is type inference, where TypeScript tries to figure out the type for you.

9m read timeFrom fettblog.eu
Post cover image
Table of contents
Mistake 1: Ignore JavaScript #Mistake 2: Annotate everything #Mistake 3: Mistake types for values #Mistake 4: Going all-in in the beginning #Mistake 5: Learn the wrong TypeScript #
7 Comments

Sort: