TypeScript Interfaces

  • Interfaces define properties, methods and events, which are the members of the interface.
  • Interfaces restricted to only the declaration of all the members.
  • The deriving class will have the defining and implementation of the members.

Syntax

Example code:

above example, employee is the interface, and  employeeObj  object is type of Employee.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top