Effect CommunityEC
Effect Community3y ago
4 replies
Fabian

Extending a Class that Extends from `Data.Class`

Is there a way to extend a class that extends from Data.Class? The reason is to have a base class like:

class Base extends Data.Class<{id: string}> {
  myMethod() {
    return true
  }
}


And then to be ble to extend it further with additional fields:

class MyClass extends Base.extend<{otherValue: string}> {
  ...
}
Was this page helpful?