Understanding TypeScript
In this lesson, we learn what TypeScript is and start to understand the benefits it brings to a React app. We also learn how mature and popular TypeScript is.
What is TypeScript? #
TypeScript is built and maintained by Microsoft. Microsoft’s tagline for TypeScript is “JavaScript that scales,” as it helps you write large JavaScript based programs.
TypeScript is a superset of JavaScript which means that any feature in JavaScript is available in TypeScript. TypeScript adds a powerful type system to the JavaScript we already know and love that enables code editors to provide code refactoring and navigation features along with type checking.
TypeScript doesn’t directly execute in the browser. Like JSX, it needs to be converted to JavaScript first. TypeScript has a compiler that can do this after type checking the code. The Babel compiler can also convert TypeScript code to JavaScript as well.
TypeScript is not limited to browser-based apps; it can be used on the backend to write nodejs based apps.
Get hands-on with 1400+ tech skills courses.