1/* 2 * Copyright (c) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 17namespace a { 18 let a; 19 20 interface B { 21 a: (a: number, b: string) => boolean, 22 b(): number 23 } 24} 25 26namespace a { 27 let a; 28 29 function b() { } 30} 31 32module a.b.c { 33 let a; 34 35 function t() { } 36} 37 38 39module a.b.c { 40 let a; 41 42 function t() { } 43} 44 45declare namespace k.z { 46 47} 48 49declare global { 50 51} 52 53declare module "foo"; 54 55export var c; 56 57module module1 { 58 export declare var a; 59 declare var b; 60 var c; 61} 62 63export module module2 { 64 export declare var a; 65 declare var b; 66 var c; 67} 68 69declare module module3 { 70 var b; 71} 72 73export declare module module4 { 74 var b; 75} 76 77declare module "foo" { 78 export import a = require("bar"); 79 import b = require("bar"); 80 import c = require; 81} 82