How to fix Abstract property 'X' must be implemented in derived class in TypeScript

TypeScriptINTERMEDIATEMEDIUMUpdated Dec 8, 2025· 98 views

This error occurs when a derived class fails to implement all abstract properties declared in its abstract base class. TypeScript requires that any class extending an abstract class must provide concrete implementations for every abstract member. Fixing this involves adding the missing property implementations to your derived class.

Quick fix

Fixes Abstract property 'X' must be implemented in derived class

// Abstract base class
abstract class Animal {
  abstract name: string;    // Abstract property
  abstract age: number;     // Abstract property
  abstract makeSound(): void; // Abstract method
}

// WRONG - missing properties
class Dog extends Animal {
  makeSound() {
    console.log("Woof");
  }
  // ERROR: 'name' and 'age' not implemented
}
  1. Identify which abstract properties are missing from the derived class
  2. Add the missing abstract properties to the derived class
  3. Use the constructor to initialize abstract properties
  4. Match the type and access modifier of the abstract property
typescript — error
// Abstract base class
abstract class Animal {
abstract name: string; // Abstract property
abstract age: number; // Abstract property
abstract makeSound(): void; // Abstract method
}
// WRONG - missing properties
class Dog extends Animal {
makeSound() {
console.log("Woof");
}
// ERROR: 'name' and 'age' not implemented
}
Abstract property 'X' must be implemented in derived class

What this error means

In TypeScript, an abstract class can declare abstract properties that do not have an implementation. These serve as a contract that all classes inheriting from the abstract class must fulfill. When you create a derived class that extends an abstract class, you must provide implementations for all abstract properties. If you forget to implement even one abstract property, TypeScript will raise a compile-time error. This error prevents you from instantiating the derived class or running your code, forcing you to honor the contract defined by the abstract base class. The error message will specify which abstract property is missing an implementation and which class is responsible for implementing it.

Typical symptoms

  • TypeScript compiler error preventing compilation with message about unimplemented abstract property
  • IDEs like VS Code showing red squiggly underlines on the class name that extends the abstract class
  • Build process fails with error pointing to the derived class definition
  • Error mentions the specific abstract property name (e.g., "Abstract property 'id' must be implemented")
  • You can see the abstract property in the base class but not in the derived class
  • The error occurs even if you implement abstract methods but skip abstract properties

Common causes

  1. Forgetting to declare and implement a property in the derived class that is marked abstract in the base class
  2. Typo or naming mismatch between the abstract property and your attempted implementation
  3. Confusing abstract methods with abstract properties (forgetting that properties also need implementation)
  4. Adding the property with a different access modifier (private, protected) than the abstract declaration
  5. Not initializing the property with a value when it is declared as abstract
  6. Declaring the property as readonly in the base class but not respecting that constraint in the derived class
  7. Using a getter/setter in the base class but only implementing one in the derived class

How to fix "Abstract property 'X' must be implemented in derived class"

1Identify which abstract properties are missing from the derived class

Check the error message to see which property name is not implemented. Look at the abstract class definition to find all abstract properties (they are prefixed with the abstract keyword). Compare the list to what you have in the derived class.

typescript
// Abstract base class
abstract class Animal {
  abstract name: string;    // Abstract property
  abstract age: number;     // Abstract property
  abstract makeSound(): void; // Abstract method
}

// WRONG - missing properties
class Dog extends Animal {
  makeSound() {
    console.log("Woof");
  }
  // ERROR: 'name' and 'age' not implemented
}
2Add the missing abstract properties to the derived class

For each abstract property, declare it in the derived class with the same type. You can initialize it directly as a class property, or initialize it in the constructor. The type must match the abstract declaration.

typescript
class Dog extends Animal {
  name: string;
  age: number;

  constructor(name: string, age: number) {
    this.name = name;
    this.age = age;
  }

  makeSound() {
    console.log("Woof");
  }
}

// Now this works
const dog = new Dog("Buddy", 3);
3Use the constructor to initialize abstract properties

The most common approach is to initialize abstract properties in the constructor. This allows instances to have different values for the properties. Remember to call super() if the abstract class has a constructor.

typescript
abstract class Vehicle {
  abstract brand: string;
  abstract wheels: number;

  abstract drive(): void;
}

class Car extends Vehicle {
  brand: string;
  wheels: number = 4; // Can set default

  constructor(brand: string) {
    super();
    this.brand = brand;
  }

  drive() {
    console.log(`${this.brand} car is driving`);
  }
}

const myCar = new Car("Toyota");
console.log(myCar.wheels); // 4
4Match the type and access modifier of the abstract property

The property in the derived class must have the same type as the abstract declaration. If the abstract property is readonly, the derived property should also be readonly. The access modifier (public, protected, private) must be compatible.

typescript
abstract class BaseClass {
  abstract readonly id: string;
  abstract status: "active" | "inactive";
}

class DerivedClass extends BaseClass {
  readonly id: string; // Must match: readonly and string type
  status: "active" | "inactive"; // Must match: same union type

  constructor(id: string) {
    this.id = id;
    this.status = "active";
  }
}
5Use getters and setters if the abstract class defines them

If the abstract class defines an abstract property with getters/setters, implement the same pattern in the derived class. Use get and set accessors to wrap the property.

typescript
abstract class User {
  abstract name: string;
  abstract get email(): string;
  abstract set email(value: string);
}

class Customer extends User {
  name: string;
  private _email: string;

  constructor(name: string, email: string) {
    this.name = name;
    this._email = email;
  }

  get email(): string {
    return this._email;
  }

  set email(value: string) {
    this._email = value;
  }
}
6Verify the implementation by creating an instance

After implementing all abstract properties, try to create an instance of the derived class. If the implementation is correct, this should work without errors. If you still get errors, check that all abstract properties from all levels of inheritance are implemented.

typescript
// Test that the implementation works
const dog = new Dog("Max", 2);
console.log(dog.name);      // "Max"
console.log(dog.age);       // 2
console.log(dog.makeSound()); // "Woof"

// TypeScript now confirms all abstract properties are satisfied
7Check for multiple inheritance or intermediate abstract classes

If you have a chain of inheritance (abstract class A → abstract class B → concrete class C), make sure you implement all abstract properties from both A and B. Sometimes the error is in an intermediate class that also needs to implement properties.

typescript
abstract class Base {
  abstract id: string;
}

abstract class Middle extends Base {
  abstract name: string;
}

class Concrete extends Middle {
  id: string = "1";      // From Base
  name: string = "Test"; // From Middle
  // Now both are implemented
}

Advanced notes

Abstract properties are a form of interface enforcement at the class level. Unlike interfaces, abstract classes can have implementations for some methods and properties while enforcing contracts on others. This provides more flexibility for shared behavior. When debugging missing abstract property errors, note that TypeScript performs strict checking at compile time, so all abstract members must be satisfied before the code runs. You can view the compiled JavaScript to see that abstract keywords are removed—they exist only for type checking. If you have a complex inheritance hierarchy, consider using interfaces alongside abstract classes for clearer contracts. Some developers prefer interfaces for pure contracts and abstract classes for shared implementations, though TypeScript allows both approaches.

Frequently asked questions

What does "Abstract property 'X' must be implemented in derived class" mean?
In TypeScript, an abstract class can declare abstract properties that do not have an implementation. These serve as a contract that all classes inheriting from the abstract class must fulfill. When you create a derived class that extends an abstract class, you must provide implementations for all abstract properties.
How do I fix "Abstract property 'X' must be implemented in derived class"?
This error occurs when a derived class fails to implement all abstract properties declared in its abstract base class. TypeScript requires that any class extending an abstract class must provide concrete implementations for every abstract member. Fixing this involves adding the missing property implementations to your derived class.
What causes "Abstract property 'X' must be implemented in derived class"?
Forgetting to declare and implement a property in the derived class that is marked abstract in the base class Typo or naming mismatch between the abstract property and your attempted implementation Confusing abstract methods with abstract properties (forgetting that properties also need implementation)
Is the "Abstract property 'X' must be implemented in derived class" error serious?
It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading