TypeScript · Classes and modules

implements

Checks that a class satisfies an interface without inheriting an implementation.

Syntax
class User implements Entity

Example

Example
interface Entity { id: string }
class User implements Entity {
  constructor(public id: string) {}
}

More in this group

abstract class Access modifiers Class Declaration file Namespace import readonly field Type-only import

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course