A class can `implements` an interface, promising to provide all its members. This is checked at compile time only — `implements` adds no runtime behaviour.
ts
interface Transferable {
transfer(to: string, amount: number): boolean;
}
class Token implements Transferable {
balances: Record<string, number> = {};
transfer(to: string, amount: number): boolean {
this.balances[to] = (this.balances[to] ?? 0) + amount;
return true;
}
}A class can implement multiple interfaces (`class X implements A, B`), and interfaces can extend other interfaces, letting you compose small, focused contracts (e.g. `Mintable`, `Burnable`, `Transferable`) into a richer one.