Interface
Definition
A TypeScript construct that defines the shape of an object — what properties and methods it must have. Interfaces support extension, optional properties, and readonly modifiers. They're erased at compile time.
Code Example
Typescript
Tip: Modify the code above and click “Run” to see the results
Learn More
Related Terms
TypeScript
A typed superset of JavaScript that adds static type checking at compile time. TypeScript catches type errors before runtime, provides better IDE support (autocompletion, refactoring), and compiles to plain JavaScript.
GenericA TypeScript feature that lets you write reusable code that works with multiple types. Generics use type parameters (like <T>) that are specified when the function or class is used.