An interface is a contract that defines a type with a collection of property and method definitions without any implementation. Interfaces don't exist in JavaScript, so they are purely used by the TypeScript compiler to enforce the contract by type checking.
We create an interface with theinterfacekeyword, followed by its name, followed by the bits that make up the interface in curly braces: