Angular #32 - Interface

Опубликовано: 20 Февраль 2026
на канале: Let's Build With Code
57
2

Click to watch Angular Playlist :    • Angular  

An Interface is a TypeScript artifact, it is not part of ECMAScript. An interface is a way to define a contract on a function with respect to the arguments and their type. Along with functions, an interface can also be used with a Class as well to define custom types.


An interface is an abstract type, it does not contain any code as a class does. It only defines the 'signature' or shape of an API. During transpilation, an interface will not generate any code, it is only used by Typescript for type checking during development.