tests/cases/conformance/jsdoc/functions.js(65,14): error TS2345: Argument of type 'typeof E' is not assignable to parameter of type 'new (arg1: number) => { length: number; }'.
  Property 'length' is missing in type 'E' but required in type '{ length: number; }'.


==== tests/cases/conformance/jsdoc/functions.js (1 errors) ====
    /**
     * @param {function(this: string, number): number} c is just passing on through
     * @return {function(this: string, number): number}
     */
    function id1(c) {
        return c
    }
    
    var x = id1(function (n) { return this.length + n });
    
    /**
     * @param {function(new: { length: number }, number): number} c is just passing on through
     * @return {function(new: { length: number }, number): number}
     */
    function id2(c) {
        return c
    }
    
    class C {
        /** @param {number} n */
        constructor(n) {
            this.length = n;
        }
    }
    
    var y = id2(C);
    var z = new y(12);
    z.length;
    
    /** @type {function ("a" | "b", 1 | 2): 3 | 4} */
    var f = function (ab, onetwo) { return ab === "a" ? 3 : 4;  }
    
    
    /** 
     * @constructor
     * @param {number} n
     */
    function D(n) {
      this.length = n;
    }
    
    var y2 = id2(D);
    var z2 = new y2(33);
    z2.length;
    
    
    /** 
     * @param {function(new: D, number)} dref
     * @return {D}
     */
    var construct = function(dref) { return new dref(33); }
    var z3 = construct(D);
    z3.length;
    
    
    /** 
     * @constructor
     * @param {number} n
     */
    var E = function(n) {
      this.not_length_on_purpose = n;
    };
    
    
    var y3 = id2(E);
                 ~
!!! error TS2345: Argument of type 'typeof E' is not assignable to parameter of type 'new (arg1: number) => { length: number; }'.
!!! error TS2345:   Property 'length' is missing in type 'E' but required in type '{ length: number; }'.
!!! related TS2728 tests/cases/conformance/jsdoc/functions.js:12:28: 'length' is declared here.
    
    // Repro from #39229
    
    /**
     * @type {(...args: [string, string] | [number, string, string]) => void}
     */
    function foo(...args) {
      args;
    }
    
    foo('abc', 'def');
    foo(42, 'abc', 'def');
    