file3.ts(1,20): error TS2307: Cannot find module 'file1' or its corresponding type declarations.
file3.ts(2,8): error TS2882: Cannot find module or type declarations for side-effect import of 'file2'.


==== file3.ts (2 errors) ====
    import x = require("file1");
                       ~~~~~~~
!!! error TS2307: Cannot find module 'file1' or its corresponding type declarations.
    import "file2";
           ~~~~~~~
!!! error TS2882: Cannot find module or type declarations for side-effect import of 'file2'.
    let a: x.A; // should not work
==== file1.d.ts (0 errors) ====
    declare module "file1" {
        function foo(): void;
        export = foo;
    }
    
==== file2.ts (0 errors) ====
    /// <reference path="file1.d.ts"/> 
    import x = require("file1"); 
    
    // should error since './file1' does not have namespace meaning
    declare module "file1" {
        interface A { a }
    }
    