/a.d.ts(3,1): error TS2303: Circular definition of import alias 'N'. ==== /a.d.ts (1 errors) ==== declare global { namespace N {} } export = N; export as namespace N; ~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2303: Circular definition of import alias 'N'.