implements
A class keyword that asks the compiler to check the class has everything an interface requires.
In more detail
class InMemoryRepo implements Repository<T, ID> fails to compile if save or findById is missing. It checks only; it does not add anything to the class.
Related terms
- class — A blueprint in code that bundles data and the functions that work on it, from which objects are made.
- interface (TypeScript) — In TypeScript, a named description of an object's shape: which properties it has and their types.
Taught in
- Generic Interfaces, Classes And Type Aliases — Production TypeScript