I have the following typescript class
export default class BaselineCtrl {
constructor() {}
async foo() {
this.bar();
}
async bar() {}
}
When I call the method via
baselineCtrl = new BaselineCtrl();
this.baselineCtrl.foo();
Im getting the error
TypeError: Cannot read properties of undefined (reading 'bar')
What am I doing wrong?