Skip to content

strict function type does not handle spread arguments #20645

@beckend

Description

@beckend

TypeScript Version: 2.7.0-dev.20171212 and 2.6.2

Code

class TargetComponent {

  public one: any;
  public two: any;

  constructor(one: any, two: any) {
    this.one = one;
    this.two = two;
  }

}

class ComponentExt extends TargetComponent {

  constructor(...args: any[]) {
    // Expected 2 arguments, but got 0 or more.
    super(...args);
  }

}

Expected behavior:
No errors.

Actual behavior:
at Super => Expected 2 arguments, but got 0 or more.

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions