google/closure-compiler

es6 classes should copy parent class constructor signature

オープン

#2,583 opened on 2017/07/28

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)Java (1,197 件のフォーク)batch import
P3help wanted

Repository metrics

Stars
 (7,176 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド