tests/cases/compiler/x.ts(7,9): error TS2665: Module augmentation cannot introduce new names in the top level scope.
tests/cases/compiler/x.ts(8,9): error TS2665: Module augmentation cannot introduce new names in the top level scope.
tests/cases/compiler/x.ts(9,11): error TS2665: Module augmentation cannot introduce new names in the top level scope.
tests/cases/compiler/x.ts(10,10): error TS2665: Module augmentation cannot introduce new names in the top level scope.
tests/cases/compiler/x.ts(10,14): error TS2665: Module augmentation cannot introduce new names in the top level scope.
tests/cases/compiler/x.ts(10,23): error TS2665: Module augmentation cannot introduce new names in the top level scope.
tests/cases/compiler/x.ts(10,38): error TS2665: Module augmentation cannot introduce new names in the top level scope.
tests/cases/compiler/x.ts(10,43): error TS2665: Module augmentation cannot introduce new names in the top level scope.
tests/cases/compiler/x.ts(10,48): error TS2665: Module augmentation cannot introduce new names in the top level scope.
tests/cases/compiler/x.ts(11,15): error TS2665: Module augmentation cannot introduce new names in the top level scope.
tests/cases/compiler/x.ts(12,15): error TS2665: Module augmentation cannot introduce new names in the top level scope.
tests/cases/compiler/x.ts(15,11): error TS2665: Module augmentation cannot introduce new names in the top level scope.
tests/cases/compiler/x.ts(16,14): error TS2665: Module augmentation cannot introduce new names in the top level scope.
tests/cases/compiler/x.ts(17,10): error TS2665: Module augmentation cannot introduce new names in the top level scope.
tests/cases/compiler/x.ts(18,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
tests/cases/compiler/x.ts(18,26): error TS2307: Cannot find module './x0'.
tests/cases/compiler/x.ts(19,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
tests/cases/compiler/x.ts(19,21): error TS2307: Cannot find module './x0'.
tests/cases/compiler/x.ts(20,5): error TS2666: Exports and export assignments are not permitted in module augmentations.
tests/cases/compiler/x.ts(20,19): error TS2307: Cannot find module './x0'.
tests/cases/compiler/x.ts(21,5): error TS2666: Exports and export assignments are not permitted in module augmentations.
tests/cases/compiler/x.ts(21,21): error TS2307: Cannot find module './x0'.
tests/cases/compiler/x.ts(25,5): error TS2666: Exports and export assignments are not permitted in module augmentations.


==== tests/cases/compiler/x0.ts (0 errors) ====
    
    export let a = 1;
    
==== tests/cases/compiler/x.ts (23 errors) ====
    
    namespace N1 {
        export let x = 1;
    }
    
    declare module "./observable" {
        var x: number;
            ~
!!! error TS2665: Module augmentation cannot introduce new names in the top level scope.
        let y: number;
            ~
!!! error TS2665: Module augmentation cannot introduce new names in the top level scope.
        const z: number;
              ~
!!! error TS2665: Module augmentation cannot introduce new names in the top level scope.
        let {x1, y1, z0: {n}, z1: {arr: [el1, el2, el3]}}: {x1: number, y1: string, z0: {n: number}, z1: {arr: number[]} }
             ~~
!!! error TS2665: Module augmentation cannot introduce new names in the top level scope.
                 ~~
!!! error TS2665: Module augmentation cannot introduce new names in the top level scope.
                          ~
!!! error TS2665: Module augmentation cannot introduce new names in the top level scope.
                                         ~~~
!!! error TS2665: Module augmentation cannot introduce new names in the top level scope.
                                              ~~~
!!! error TS2665: Module augmentation cannot introduce new names in the top level scope.
                                                   ~~~
!!! error TS2665: Module augmentation cannot introduce new names in the top level scope.
        interface A { x }
                  ~
!!! error TS2665: Module augmentation cannot introduce new names in the top level scope.
        namespace N {
                  ~
!!! error TS2665: Module augmentation cannot introduce new names in the top level scope.
            export class C {}
        }
        class Cls {}
              ~~~
!!! error TS2665: Module augmentation cannot introduce new names in the top level scope.
        function foo(): number;
                 ~~~
!!! error TS2665: Module augmentation cannot introduce new names in the top level scope.
        type T = number;
             ~
!!! error TS2665: Module augmentation cannot introduce new names in the top level scope.
        import * as all from "./x0";
        ~~~~~~
!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
                             ~~~~~~
!!! error TS2307: Cannot find module './x0'.
        import {a} from "./x0";
        ~~~~~~
!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
                        ~~~~~~
!!! error TS2307: Cannot find module './x0'.
        export * from "./x0";
        ~~~~~~
!!! error TS2666: Exports and export assignments are not permitted in module augmentations.
                      ~~~~~~
!!! error TS2307: Cannot find module './x0'.
        export {a} from "./x0";
        ~~~~~~
!!! error TS2666: Exports and export assignments are not permitted in module augmentations.
                        ~~~~~~
!!! error TS2307: Cannot find module './x0'.
    }
    
    declare module "./test" {
        export = N1;
        ~~~~~~
!!! error TS2666: Exports and export assignments are not permitted in module augmentations.
    }
    export {}
    
==== tests/cases/compiler/observable.ts (0 errors) ====
    export declare class Observable<T> {
        filter(pred: (e:T) => boolean): Observable<T>;
    }
    export var x = 1;
    
==== tests/cases/compiler/test.ts (0 errors) ====
    export let b = 1;
    
==== tests/cases/compiler/main.ts (0 errors) ====
    import { Observable } from "./observable"
    import "./x";
    