error TS2468: Cannot find global value 'Promise'.
index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations.
index.ts(3,19): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor.  Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.


!!! error TS2468: Cannot find global value 'Promise'.
==== index.ts (3 errors) ====
    // esm format file
    import { Thing } from "inner/other";
                          ~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations.
    export const a = (await import("inner/index.js")).x();
                      ~~~~~
!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
                            ~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2712: A dynamic import call in ES5/ES3 requires the 'Promise' constructor.  Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
==== node_modules/inner/index.d.ts (0 errors) ====
    // esm format file
    export { x } from "./other.js";
==== node_modules/inner/other.d.ts (0 errors) ====
    // esm format file
    export interface Thing {}
    export const x: () => Thing;
==== package.json (0 errors) ====
    {
        "name": "package",
        "private": true,
        "type": "module",
        "exports": "./index.js"
    }
==== node_modules/inner/package.json (0 errors) ====
    {
        "name": "inner",
        "private": true,
        "type": "module",
        "exports": {
            "./": "./"
        }
    }