TypeScript
- Authors
- Name
- Paul Bonnette
TypeScript is JavaScript, as it should have been.
TypeScript Features
- Superset of ES6 - Supports anonymous functions (fat arrow functions) +
- Transpiles/Compiles into JavaScript - Check and catch errors before runtime for improved reliability.
- Cross-Platform - Produces JavaScript which runs on any platform.
- Object-Oriented - Supports classes, interfaces, etc.
- Strongly Typed - Because JavaScript wasn't!
- Static-Type Checking - Detect type errors at transpile time.
- Optional Static Typing - Only if you want to
- DOM Manipulation - Understands the DOM API types
- Pre-Defined Types - Boolean, Number, String, Void, Undefined, Null
- Plays well with ... - React.js, Next.js, Three.js, etc.
- Enums - Supports a set of named constants.
- Interfaces - reusabled definitions of the "shape" of data structures which explain the code better.
My Experience
I've been using TypeScript to build React applications for a number of years now. I love it's ability to find JavaScript errors at compile time.
Runtime errors are difficult to figure out, however. It often takes pure experience and intuition to figure out what went wrong, but it can done.
I highly recommend getting into TypeScript. Coming from a PHP/JavaScript perspective it has a log of advantages.