use.js(5,1): error TS2454: Variable 'c' is used before being assigned.
use.js(10,1): error TS2454: Variable 'd' is used before being assigned.


==== use.js (2 errors) ====
    /// <reference path='./types.d.ts'/>
    /** @typedef {import("./mod1")} C
     * @type {C} */
    var c;
    c.chunk;
    ~
!!! error TS2454: Variable 'c' is used before being assigned.
    
    const D = require("./mod1");
    /** @type {D} */
    var d;
    d.chunk;
    ~
!!! error TS2454: Variable 'd' is used before being assigned.
    
==== types.d.ts (0 errors) ====
    declare function require(name: string): any;
    declare var exports: any;
    declare var module: { exports: any };
==== mod1.js (0 errors) ====
    /// <reference path='./types.d.ts'/>
    class Chunk {
        constructor() {
            this.chunk = 1;
        }
    }
    module.exports = Chunk;
    