tests/cases/compiler/exportSpecifierReferencingOuterDeclaration1.ts(3,14): error TS2661: Cannot export 'X'. Only local declarations can be exported from a module.


==== tests/cases/compiler/exportSpecifierReferencingOuterDeclaration1.ts (1 errors) ====
    declare module X { export interface bar { } }
    declare module "m" {
        export { X };
                 ~
!!! error TS2661: Cannot export 'X'. Only local declarations can be exported from a module.
        export function foo(): X.bar;
    }