google/closure-compiler
在 GitHub 查看es6 classes should copy parent class constructor signature
Open
#2,583 建立於 2017年7月28日
P3help wanted
倉庫指標
- Star
- (7,176 star)
- PR 合併指標
- (平均合併 3天 4小時) (30 天內合併 1 個 PR)
描述
class Parent {
/** @param {string} value */
constructor(value) {}
}
class Child1 extends Parent {}
class Child2 extends Parent {
/** @override */
constructor(...args) {
super(...args);
}
}
class Child3 extends Parent {
/** @param {string} value */
constructor(value) {
super(value);
}
}
new Parent(1); // OK
new Child1(1); // NO WARNING
new Child2(2); // NO WARNING
new Child3(2); // OK