/*
 * Copyright (c) 2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import assert from 'assert';
// Only use for testing importEqualsDeclaration in toplevel
import g = require('fs');
export import temp2 = require('fs');
module h {
    export module Y {
        export interface Z {
            a: number;
        }
    }
    export interface Y {
        b: string;
    }
}
let a: h.Y.Z = { a: 1 };
assert(a.a === 1);
let b: h.Y = { b: "1" };
assert(b.b === "1");
module A {
    export module B {
        export class C {
            c: boolean = true;
        }
    }
}
var c: A.B.C = new A.B.C();
assert(c.c === true);
module i {
    export namespace N {
        export module M2 {
            export interface I {
                d: number;
            }
        }
    }
}
let d: i.N.M2.I = { d: 2 };
assert(d.d === 2);
type A = number;
declare const j: number;
declare namespace k {
    export { A };
}
let e: k.A = 3;
assert(e === 3);
namespace l {
    namespace m {
        export var temp3: string = "test-importEqualsDeclaration";
    }
    import n = m.temp3;
    export import temp5 = m.temp3;
    assert(n === "test-importEqualsDeclaration");
    assert(temp5 === "test-importEqualsDeclaration");
}
namespace l {
    assert(temp5 === "test-importEqualsDeclaration");
}
assert(l.temp5 === "test-importEqualsDeclaration");
export {};
