The thing is I sometimes forget to write the keywords and VS Code and TypeScript are not willing to notify me that I cannot call an inherited method in class without 'super' and in some cases I should use 'await' with asynchronous function. Please, help me reduce the amount of the errors with your advice.
An example with 'super':
class Child{
printHey(){console.log('Hey')}
}
class Parent extends Child{
printHey(){
this.printHey() // the super required
}
}
new Parent().printHey()
An example with 'await':
class Echo {
async getEcho(echo: any){
return echo
}
async printEcho(){
var echo = 'Hey'
var message:any = this.getEcho(echo)
while(message !== echo) 'pass' // The loop got stuck
console.log(`Echo ${message}`)
}
}
new Echo().printEcho()