Is TypeScript a Framework?

Alex Rivers

TypeScript or TS is a strongly typed programming language that builds on JavaScript. It is open source and considered object-oriented. Microsoft developed it in 2012, and the main reason for establishing it was to fill the void that JavaScript could not. Some of the code became complex over time; thus, TypeScript came into the picture. In short, TypeScript is JavaScript with syntax for types.

Can we call TypeScript a Framework?

Technically, TS is not a framework. It is a strongly typed programming language. There are frameworks that you can use with TypeScript, such as Angular 2. You can now use Angular 9 with the latest version of TypeScript. Angular originated from TS. NestJS

Here are the reasons why it is not a framework:

  • TS is a superset of JS- whatever is written in TS starts and ends with JS, with a choice of adding additional components.
  • TS supports class-based objects, inheritance, and modifiers, making it object-oriented.
  • Since it is a multiparadigm programming language, it follows classes, encapsulation, inheritance, polymorphism and data abstraction.
  • TS has syntax and semantics.

Does it have frameworks?

In short –Yes, TS has many frameworks.

Here is a list of the frameworks:

  1. Angular
  2. NestJS
  3. FeathersJS
  4. LoopbackJS

1. Angular

According to the official website, the definition is- “Angular is a platform and framework for building single-page client applications using HTML and TypeScript. Angular is written in TypeScript and implements core and optional functionality as a set of TypeScript libraries that you import into your applications.”

You can use it with JavaScript also, as TS and JS can work together. TS is an extension of JS, making it its superset.

2. NestJS

NestJS is a Node.js framework used with TypeScript to build smooth and scalable server-side applications. It depends on string HTTP frameworks, such as Fastify. NestJS also rectifies the faults of previous versions of Node.js, and it is believed to be better than ExpressJS.

3. FeathersJS

FeathersJS is a real-time Node.js framework. It is used for creating microservices. It also enables the developers to manage the data with the help of RESTful resources and can even integrate FeathersJS with JavaScript frameworks and building tools.

4. LoopbackJS

LoopbackJS is a TS framework for building microservices and APIs. It has first-class support for TS. It is beneficial for both – frontend development and backend development.

Conclusion

TypeScript is not a framework but a proper functional programming language. But many frameworks fall under TypeScript, and one can even integrate it with JavaScript. On the other hand, Angular, FeathersJS, LoopbackJS, etc., are frameworks compatible with TS.

Leave a Comment