tests/cases/compiler/file2.ts(1,9): error TS2661: Cannot export 'NS1'. Only local declarations can be exported from a module.
tests/cases/compiler/file2.ts(1,14): error TS2661: Cannot export 'NS1'. Only local declarations can be exported from a module.
tests/cases/compiler/file2.ts(2,9): error TS2661: Cannot export 'NS2'. Only local declarations can be exported from a module.
tests/cases/compiler/file2.ts(2,14): error TS2661: Cannot export 'NS2'. Only local declarations can be exported from a module.
tests/cases/compiler/file2.ts(3,9): error TS2661: Cannot export 'NS1'. Only local declarations can be exported from a module.
tests/cases/compiler/file2.ts(4,9): error TS2661: Cannot export 'NS2'. Only local declarations can be exported from a module.


==== tests/cases/compiler/file1.d.ts (0 errors) ====
    declare namespace NS1 {
        export var foo: number;
    }
    
    declare namespace NS2 {
        export var foo: number;
    }
    
==== tests/cases/compiler/file2.ts (6 errors) ====
    export {NS1, NS1 as NNS1};
            ~~~
!!! error TS2661: Cannot export 'NS1'. Only local declarations can be exported from a module.
                 ~~~
!!! error TS2661: Cannot export 'NS1'. Only local declarations can be exported from a module.
    export {NS2, NS2 as NNS2};
            ~~~
!!! error TS2661: Cannot export 'NS2'. Only local declarations can be exported from a module.
                 ~~~
!!! error TS2661: Cannot export 'NS2'. Only local declarations can be exported from a module.
    export {NS1 as NNNS1};
            ~~~
!!! error TS2661: Cannot export 'NS1'. Only local declarations can be exported from a module.
    export {NS2 as NNNS2};
            ~~~
!!! error TS2661: Cannot export 'NS2'. Only local declarations can be exported from a module.