TypeScript is a statically typed, object-oriented, and compiled programming language developed by Microsoft. It is essentially a superset of JavaScript, meaning it has all the features of JavaScript, plus additional typing features.
TypeScript code is first compiled into plain JavaScript. This JavaScript code can then run on any JavaScript runtime, such as Node.js, Deno, or in a browser.
Compile-time errors can be caught – problems are caught before they occur at runtime.
Static typing – types can be assigned to variables, functions, etc.
Interfaces and type aliases – data structures can be clearly defined.
It is easier to write scalable and maintainable code in large projects.
Improved auto-completion and IDE support – such as VS Code providing help and suggestions based on type.
Where is it used?
TypeScript is used with almost all major frontend and backend technologies these days:
React, Angular, Vue
Node.js, Express
Next.js, NestJS
GraphQL, Prisma, and many other libraries/frameworks
Top comments (0)