/*
 * 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 temp1 = require('fs');
export import temp2 = require('fs');
module X {
    export module o {
        export interface p {
            a: number;
        }
    }
    export interface o {
        b: string;
    }
}
let a: X.o.p = { a: 1 };
assert(a.a === 1);
let b: X.o = { b: "1" };
assert(b.b === "1");
module A {
    export module B {
        export class m {
            c: boolean = true;
        }
    }
}
var c: A.B.m = new A.B.m();
assert(c.c === true);
module M {
    export namespace j {
        export module k {
            export interface l {
                d: number;
            }
        }
    }
}
let d: M.j.k.l = { d: 2 };
assert(d.d === 2);
type A = number;
declare const Q1: number;
declare namespace Q2 {
    export { A };
}
let e: Q2.A = 3;
assert(e === 3);
namespace ns1 {
    namespace f {
        export var i: string = "test-importEqualsDeclaration";
    }
    import g = f.i;
    export import h = f.i;
    assert(g === "test-importEqualsDeclaration");
    assert(h === "test-importEqualsDeclaration");
}
namespace ns1 {
    assert(h === "test-importEqualsDeclaration");
}
assert(ns1.h === "test-importEqualsDeclaration");
export {};
