/a.js(2,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.
/f.cts(1,1): error TS1286: ECMAScript imports and exports cannot be written in a CommonJS file under 'verbatimModuleSyntax'.
/main1.ts(1,13): error TS2305: Module '"./a"' has no exported member 'y'.
/main1.ts(3,12): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.
/main1.ts(19,4): error TS2339: Property 'default' does not exist on type '() => void'.
/main1.ts(23,8): error TS1192: Module '"/e"' has no default export.
/main2.mts(1,13): error TS2305: Module '"./a"' has no exported member 'y'.
/main2.mts(4,4): error TS2339: Property 'default' does not exist on type 'typeof import("/a")'.
/main2.mts(5,12): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.
/main2.mts(14,8): error TS1192: Module '"/e"' has no default export.
/main3.cjs(1,10): error TS1293: ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'.
/main3.cjs(1,13): error TS2305: Module '"./a"' has no exported member 'y'.
/main3.cjs(2,1): error TS8002: 'import ... =' can only be used in TypeScript files.
/main3.cjs(5,8): error TS1293: ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'.
/main3.cjs(8,8): error TS1293: ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'.
/main3.cjs(10,8): error TS1293: ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'.
/main3.cjs(12,8): error TS1293: ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'.
/main3.cjs(14,8): error TS1293: ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'.
/main3.cjs(17,8): error TS1293: ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'.


==== /a.js (1 errors) ====
    export const x = 0;
    module.exports.y = 0; // Error
    ~~~~~~
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.
    
==== /b.ts (0 errors) ====
    export default 0;
    
==== /c.ts (0 errors) ====
    export = {
      default: function() {}
    };
    
==== /d.ts (0 errors) ====
    export = function() {};
    
==== /e.mts (0 errors) ====
    export = 0;
    
==== /f.cts (1 errors) ====
    export default 0;
    ~~~~~~~~~~~~~~~~~
!!! error TS1286: ECMAScript imports and exports cannot be written in a CommonJS file under 'verbatimModuleSyntax'.
    
==== /g.js (0 errors) ====
    exports.default = 0;
    
==== /main1.ts (4 errors) ====
    import { x, y } from "./a"; // No y
                ~
!!! error TS2305: Module '"./a"' has no exported member 'y'.
    import a1 = require("./a"); // { x: 0 }
    const a2 = require("./a"); // Error in TS
               ~~~~~~~
!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.
    const a3 = await import("./a"); // { x: 0 }
    a3.x;
    
    import b1 from "./b"; // 0
    import b2 = require("./b"); // { default: 0 }
    b2.default;
    const b3 = await import("./b"); // { default: 0 }
    b3.default;
    
    import c1 from "./c"; // { default: [Function: default] }
    import c2 = require("./c"); // { default: [Function: default] }
    c2.default;
    import d1 from "./d"; // [Function: default]
    import d2 = require("./d"); // [Function: default]
    d2();
    d2.default(); // Error
       ~~~~~~~
!!! error TS2339: Property 'default' does not exist on type '() => void'.
    const d3 = await import("./d"); // { default: [Function: default] }
    d3.default();
    
    import e1 from "./e.mjs"; // 0
           ~~
!!! error TS1192: Module '"/e"' has no default export.
    import e2 = require("./e.mjs"); // 0
    import f1 from "./f.cjs"; // 0
    import f2 = require("./f.cjs"); // { default: 0 }
    f2.default;
    
    import g1 from "./g"; // { default: 0 }
    g1.default;
    import g2 = require("./g"); // { default: 0 }
    g2.default;
    
==== /main2.mts (4 errors) ====
    import { x, y } from "./a"; // No y
                ~
!!! error TS2305: Module '"./a"' has no exported member 'y'.
    import a1 = require("./a"); // { x: 0 }
    a1.x;
    a1.default.x; // Arguably should exist but doesn't
       ~~~~~~~
!!! error TS2339: Property 'default' does not exist on type 'typeof import("/a")'.
    const a2 = require("./a"); // Error in TS
               ~~~~~~~
!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.
    
    import b1 from "./b"; // 0
    import b2 = require("./b"); // { default: 0 }
    
    import c1 from "./c"; // { default: [Function: default] }
    import c2 = require("./c"); // { default: [Function: default] }
    import d1 from "./d"; // [Function: default]
    import d2 = require("./d"); // [Function: default]
    import e1 from "./e.mjs"; // 0
           ~~
!!! error TS1192: Module '"/e"' has no default export.
    import e2 = require("./e.mjs"); // 0
    import f1 from "./f.cjs"; // 0
    import f2 = require("./f.cjs"); // { default: 0 }
    
    import g1 from "./g"; // { default: 0 }
    import g2 = require("./g"); // { default: 0 }
    
==== /main3.cjs (9 errors) ====
    import { x, y } from "./a"; // No y
             ~
!!! error TS1293: ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'.
                ~
!!! error TS2305: Module '"./a"' has no exported member 'y'.
    import a1 = require("./a"); // Error in JS
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS8002: 'import ... =' can only be used in TypeScript files.
    const a2 = require("./a"); // { x: 0 }
    
    import b1 from "./b"; // 0
           ~~
!!! error TS1293: ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'.
    const b2 = require("./b"); // { default: 0 }
    
    import c1 from "./c"; // { default: [Function: default] }
           ~~
!!! error TS1293: ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'.
    const c2 = require("./c"); // { default: [Function: default] }
    import d1 from "./d"; // [Function: default]
           ~~
!!! error TS1293: ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'.
    const d2 = require("./d"); // [Function: default]
    import e1 from "./e.mjs"; // 0
           ~~
!!! error TS1293: ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'.
    const e2 = require("./e.mjs"); // 0
    import f1 from "./f.cjs"; // 0
           ~~
!!! error TS1293: ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'.
    const f2 = require("./f.cjs"); // { default: 0 }
    
    import g1 from "./g"; // { default: 0 }
           ~~
!!! error TS1293: ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'.
    const g2 = require("./g"); // { default: 0 }
    
==== /main4.cjs (0 errors) ====
    exports.x = require("./g");
    
==== /dummy.ts (0 errors) ====
    export {}; // Silly test harness
    