I am facing an issue with class inheritance in my code. I have a class A that extends class B, which in turn extends class C. Whenever I try to create a new instance of class A within a function, I encounter the following error message: Uncaught TypeError: Super expression must either be null or a function
For example:
A.ts
import {B} from "./B.ts";
export class A extends B {
}
B.ts
import {C} from "./C.ts";
export class B extends C {
}
C.ts
export class C {
}
In another part of my application
functions.ts
import {A} from "./A.ts";
export function doSomething(){
const a = new A(); // throws Uncaught TypeError: Super expression must either be null or a function
}
I have searched through resources like StackOverflow for solutions, but none of them seem to address my specific problem.