This error means a class declared it would adhere to an interface’s contract, but it failed to implement one or more of the required members.

The most common culprit is a missing method or property. The TypeScript compiler checks that every member declared in the interface is present on the class. For example, if your interface has greet(): void;, your class must have a greet() method.

Another frequent cause is a mismatch in the member’s signature. This includes differences in parameter types, return types, or optionality. For instance, if the interface specifies process(data: string): number;, a class implementing it with process(data: string): void; will fail because the return types don’t match.

Sometimes, the issue arises from incorrectly declared optional members. If an interface has optionalProp?: string;, the implementing class can either include optionalProp or omit it. However, if the class includes it but declares it as required (e.g., optionalProp: string;), TypeScript will flag it as an error.

Accessibility modifiers can also be a source of this error. If an interface member is public (which is the default), the implementing class must provide a public implementation. A private or protected implementation will not satisfy the interface contract. For example, an interface member id: number; requires a public id: number; on the class, not private id: number;.

Inheritance can complicate things. If a class extends another class that already implements an interface, and the parent class’s implementation is flawed, the child class will also inherit the error. You need to ensure the entire inheritance chain correctly satisfies the interface.

A subtle but common mistake is failing to implement all members of a composite interface. If an interface A extends B and C, a class implementing A must implement members from both B and C. It’s not enough to just implement what’s directly in A.

Finally, check for typos in method or property names. A simple misspelling like getUsers() in the interface and getUser() in the class will trigger this error, as TypeScript sees getUser as an entirely different member.

The next error you’ll likely hit after fixing this is ensuring that the implemented members have the correct types, not just the correct names.

Want structured learning?

Take the full Typescript course →