google/closure-compiler

es6 classes should copy parent class constructor signature

开放

#2,583 创建于 2017年7月28日

 (3 条评论) (0 个反应) (0 位负责人)Java (1,197 个派生)batch import
P3help wanted

仓库指标

星标
 (7,176 个星标)
PR 合并指标
 (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

贡献者指南