I'm experiencing a minor issue with my TypeScript code. Here's the situation:
class Component {
assertBoolean(): boolean {
return true;
}
}
class DummyComponent extends Component() {
}
const components: Component[] = [DummyComponent];
Upon running this code, I encountered the following TypeScript error message:
error TS2322: Type 'typeof DummyComopnent' is not assignable to type 'Component'. Property 'assertBoolean' is missing in type 'typeof DummyComponent'.
I'm a bit confused as to what went wrong here, it seems like a basic object-oriented programming concept.