TypeScript

Interface in TypeScript

The Interface in TypeScript defines the Shape of an object. i.e. it specifies what properties & methods a given object can have and their corresponding value types. TypeScript interfaces are abstract types. They do not contain any code. An object, function, or class that implements the interface must implement all the properties specified in the interface. They are similar to type alias. Both allow us to name a type and use it elsewhere in the code.

Interface in TypeScript Read More »

Scroll to Top