【发布时间】:2021-11-21 21:20:27
【问题描述】:
** 问题:如果孩子不调用父亲的 override 函数,TypeScript 会抛出 Error 怎么办?**
class aaa {
create() { }
}
class bb extends aaa {
create() {
// if not call the father's funtion, there will throw Error.
// super.create()
}
}
【问题讨论】:
-
就像Android中的@Callsuper
标签: typescript extends