==== tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts (2 errors) ==== class D { } export = D; declare module "ext" { ~~~~~ !!! Ambient external modules cannot be nested in other modules. export class C { } } // Cannot resolve this ext module reference import ext = require("ext"); ~~~~~ !!! Cannot find external module 'ext'. var x = ext;