Closed JacopoSciampi closed 2 years ago
Hi, first of all thank you for this amazing library.
I was wondering if would be possible to extend an abstract class (along with some others) that needs a T. For example:
export abstract class MyAbstractClass<T> { ... }
and then in the main component :
export class MyComponent extends Mixin(MyAbstractClass<string>, foo, bar, ...) { ... }
Maybe I'm missing something but I can't figure how to do it.
The error given is:
Value of type 'typeof MyAbstractClass' is not callable. Did you mean to include 'new'?
Hi @JacopoSciampi,
I think you're looking for this section of the README: https://github.com/tannerntannern/ts-mixer#mixing-generic-classes
🙂
Hi, first of all thank you for this amazing library.
I was wondering if would be possible to extend an abstract class (along with some others) that needs a T. For example:
export abstract class MyAbstractClass<T> { ... }
and then in the main component :
export class MyComponent extends Mixin(MyAbstractClass<string>, foo, bar, ...) { ... }
Maybe I'm missing something but I can't figure how to do it.
The error given is:
Value of type 'typeof MyAbstractClass' is not callable. Did you mean to include 'new'?