Can I do this in TypeScript?
export interface IMyInterface {
doSomething(): void;
}
export class MyBaseClass {
myBaseClassHasProperty: string;
constructor(){
this.myBaseClassHasProperty = 'some value';
}
myBaseClassHasMethods(): void {
console.log(this.myBaseClassHasProperty);
}
}
export class MyClass extends MyBaseClass implements IMyInterface {
constructor() {
super();
}
doSomething(): void {
this.myBaseClassHasMethods();
}
}
In runtime it throws:
Uncaught ReferenceError: MyBaseClass is not defined