TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
Object-Oriented: TypeScript is OOP-based, with classes, interfaces, and static typing, similar to languages like C# or Java.
Angular: The Angular 2.0 framework is written in TypeScript. TypeScript was developed by Microsoft and is open-source. React and React Native are developed by Meta.
JavaScript: Initially for client-side, JavaScript became a server-side technology with Node.js.
Compilation: TypeScript is a compiled language, strongly typed and supports OOP (since 2012).
JavaScript Compatibility: TypeScript is ultimately just JavaScript. All TypeScript code compiles to JavaScript.
Language Types
Strongly Typed / Statically Typed:
Examples: C, C#, Java, TypeScript
Syntax: int num = 10; (requires datatype declaration)
Loosely Typed / Weakly Typed:
Examples: JavaScript, PHP
TypeScript Layers
Language
TypeScript Compiler
TypeScript Language Services
Key Differences: TypeScript vs JavaScript
TypeScript is a strongly typed and OOP-supported language.
JavaScript is a scripting language with no static typing.
TypeScript Drawbacks
Compilation Time: TypeScript takes longer to compile.
Abstract Classes: TypeScript does not support abstract classes (in some cases).