subtypingWithConstructSignaturesWithOptionalParameters.ts(19,11): error TS2430: Interface 'I3' incorrectly extends interface 'Base'.
  Types of property 'a' are incompatible.
    Type 'new (x: number) => number' is not assignable to type 'new () => number'.
      Target signature provides too few arguments. Expected 1 or more, but got 0.
subtypingWithConstructSignaturesWithOptionalParameters.ts(32,11): error TS2430: Interface 'I6' incorrectly extends interface 'Base'.
  Types of property 'a2' are incompatible.
    Type 'new (x: number) => number' is not assignable to type 'new (x?: number | undefined) => number'.
      Types of parameters 'x' and 'x' are incompatible.
        Type 'number | undefined' is not assignable to type 'number'.
          Type 'undefined' is not assignable to type 'number'.
subtypingWithConstructSignaturesWithOptionalParameters.ts(49,11): error TS2430: Interface 'I10' incorrectly extends interface 'Base'.
  Types of property 'a3' are incompatible.
    Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'.
      Target signature provides too few arguments. Expected 2 or more, but got 1.
subtypingWithConstructSignaturesWithOptionalParameters.ts(66,11): error TS2430: Interface 'I14' incorrectly extends interface 'Base'.
  Types of property 'a4' are incompatible.
    Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number, y?: number | undefined) => number'.
      Types of parameters 'y' and 'y' are incompatible.
        Type 'number | undefined' is not assignable to type 'number'.
          Type 'undefined' is not assignable to type 'number'.
subtypingWithConstructSignaturesWithOptionalParameters.ts(79,11): error TS2430: Interface 'I17' incorrectly extends interface 'Base'.
  Types of property 'a5' are incompatible.
    Type 'new (x: number) => number' is not assignable to type 'new (x?: number | undefined, y?: number | undefined) => number'.
      Types of parameters 'x' and 'x' are incompatible.
        Type 'number | undefined' is not assignable to type 'number'.
          Type 'undefined' is not assignable to type 'number'.
subtypingWithConstructSignaturesWithOptionalParameters.ts(83,11): error TS2430: Interface 'I18' incorrectly extends interface 'Base'.
  Types of property 'a5' are incompatible.
    Type 'new (x: number, y: number) => number' is not assignable to type 'new (x?: number | undefined, y?: number | undefined) => number'.
      Types of parameters 'x' and 'x' are incompatible.
        Type 'number | undefined' is not assignable to type 'number'.
          Type 'undefined' is not assignable to type 'number'.


==== subtypingWithConstructSignaturesWithOptionalParameters.ts (6 errors) ====
    // call signatures in derived types must have the same or fewer optional parameters as the base type
    
    interface Base { 
        a: new () => number;
        a2: new (x?: number) => number;
        a3: new (x: number) => number;
        a4: new (x: number, y?: number) => number;
        a5: new (x?: number, y?: number) => number;
    }
    
    interface I1 extends Base {
        a: new () => number; // ok, same number of required params
    }
    
    interface I2 extends Base {
        a: new (x?: number) => number; // ok, same number of required params
    }
    
    interface I3 extends Base {
              ~~
!!! error TS2430: Interface 'I3' incorrectly extends interface 'Base'.
!!! error TS2430:   Types of property 'a' are incompatible.
!!! error TS2430:     Type 'new (x: number) => number' is not assignable to type 'new () => number'.
!!! error TS2430:       Target signature provides too few arguments. Expected 1 or more, but got 0.
        a: new (x: number) => number; // error, too many required params
    }
    
    
    interface I4 extends Base {
        a2: new () => number; // ok, same number of required params
    }
    
    interface I5 extends Base {
        a2: new (x?: number) => number; // ok, same number of required params
    }
    
    interface I6 extends Base {
              ~~
!!! error TS2430: Interface 'I6' incorrectly extends interface 'Base'.
!!! error TS2430:   Types of property 'a2' are incompatible.
!!! error TS2430:     Type 'new (x: number) => number' is not assignable to type 'new (x?: number | undefined) => number'.
!!! error TS2430:       Types of parameters 'x' and 'x' are incompatible.
!!! error TS2430:         Type 'number | undefined' is not assignable to type 'number'.
!!! error TS2430:           Type 'undefined' is not assignable to type 'number'.
        a2: new (x: number) => number; // ok, same number of params
    }
    
    
    interface I7 extends Base {
        a3: new () => number; // ok, fewer required params
    }
    
    interface I8 extends Base {
        a3: new (x?: number) => number; // ok, fewer required params
    }
    
    interface I9 extends Base {
        a3: new (x: number) => number; // ok, same number of required params
    }
    
    interface I10 extends Base {
              ~~~
!!! error TS2430: Interface 'I10' incorrectly extends interface 'Base'.
!!! error TS2430:   Types of property 'a3' are incompatible.
!!! error TS2430:     Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'.
!!! error TS2430:       Target signature provides too few arguments. Expected 2 or more, but got 1.
        a3: new (x: number, y: number) => number;  // error, too many required params
    }
    
    
    interface I11 extends Base {
        a4: new () => number; // ok, fewer required params
    }
    
    interface I12 extends Base {
        a4: new (x?: number, y?: number) => number; // ok, fewer required params
    }
    
    interface I13 extends Base {
        a4: new (x: number) => number; // ok, same number of required params
    }
    
    interface I14 extends Base {
              ~~~
!!! error TS2430: Interface 'I14' incorrectly extends interface 'Base'.
!!! error TS2430:   Types of property 'a4' are incompatible.
!!! error TS2430:     Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number, y?: number | undefined) => number'.
!!! error TS2430:       Types of parameters 'y' and 'y' are incompatible.
!!! error TS2430:         Type 'number | undefined' is not assignable to type 'number'.
!!! error TS2430:           Type 'undefined' is not assignable to type 'number'.
        a4: new (x: number, y: number) => number;  // ok, same number of params
    }
    
    
    interface I15 extends Base {
        a5: new () => number; // ok, fewer required params
    }
    
    interface I16 extends Base {
        a5: new (x?: number, y?: number) => number; // ok, fewer required params
    }
    
    interface I17 extends Base {
              ~~~
!!! error TS2430: Interface 'I17' incorrectly extends interface 'Base'.
!!! error TS2430:   Types of property 'a5' are incompatible.
!!! error TS2430:     Type 'new (x: number) => number' is not assignable to type 'new (x?: number | undefined, y?: number | undefined) => number'.
!!! error TS2430:       Types of parameters 'x' and 'x' are incompatible.
!!! error TS2430:         Type 'number | undefined' is not assignable to type 'number'.
!!! error TS2430:           Type 'undefined' is not assignable to type 'number'.
        a5: new (x: number) => number; // ok, all present params match
    }
    
    interface I18 extends Base {
              ~~~
!!! error TS2430: Interface 'I18' incorrectly extends interface 'Base'.
!!! error TS2430:   Types of property 'a5' are incompatible.
!!! error TS2430:     Type 'new (x: number, y: number) => number' is not assignable to type 'new (x?: number | undefined, y?: number | undefined) => number'.
!!! error TS2430:       Types of parameters 'x' and 'x' are incompatible.
!!! error TS2430:         Type 'number | undefined' is not assignable to type 'number'.
!!! error TS2430:           Type 'undefined' is not assignable to type 'number'.
        a5: new (x: number, y: number) => number;  // ok, same number of params
    }