• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2025 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// @KeepAsConsumer
17namespace MyNamespace01 {
18  export const nsConstValue01 = 1;
19  export function nsFunction01(): void {};
20  export class nsClass01 {
21    classProp01 = 1;
22  };
23  export interface nsInterface01 {
24    interfaceProp01: string;
25  };
26  export enum nsEnum01 {
27    RED01
28  }
29  export namespace InnerNamespace01 {
30    export const innerConstValue01 = 1;
31  }
32  export type nsType01 = "A";
33  const noExportedValue01 = 1;
34}
35
36namespace MyNamespace02 {
37  // @KeepAsConsumer
38  export const nsConstValue02 = 1;
39  // @KeepAsConsumer
40  export function nsFunction02(): void {};
41  // @KeepAsConsumer
42  export class nsClass02 {
43    classProp02 = 1;
44  };
45  export class nsClass02_01 {
46    classProp02_01 = 1;
47    // @KeepAsConsumer
48    constructor(para: number) {
49      this.classProp02_01 = para;
50    }
51  };
52  export class nsClass02_02 {
53    // @KeepAsConsumer
54    classProp02_02 = 1;
55    constructor(para: number) {
56      this.classProp02_02 = para;
57    }
58  };
59  // @KeepAsConsumer
60  export interface nsInterface02 {
61    interfaceProp02: string;
62  };
63  export interface nsInterface02_01 {
64    // @KeepAsConsumer
65    interfaceProp02_01: string;
66  };
67  // @KeepAsConsumer
68  export enum nsEnum02 {
69    RED02
70  }
71  export enum nsEnum02_01 {
72    // @KeepAsConsumer
73    RED02_01
74  }
75  // @KeepAsConsumer
76  export namespace InnerNamespace02 {
77    export const innerConstValue02 = 1;
78  }
79  // @KeepAsConsumer
80  export type nsType02 = "A";
81  const noExportedValue02 = 1;
82}
83
84namespace MyNamespace03 {
85  // @KeepAsConsumer
86  const nsConstValue03 = 1;
87  // @KeepAsConsumer
88  function nsFunction03(): void {};
89  // @KeepAsConsumer
90  class nsClass03 {
91    classProp03 = 1;
92  };
93  class nsClass03_01 {
94    classProp03_01 = 1;
95    // @KeepAsConsumer
96    constructor(para: number) {
97      this.classProp03_01 = para;
98    }
99  };
100  class nsClass03_02 {
101    // @KeepAsConsumer
102    classProp03_02 = 1;
103    constructor(para: number) {
104      this.classProp03_02 = para;
105    }
106  };
107  // @KeepAsConsumer
108  interface nsInterface03 {
109    interfaceProp03: string;
110  };
111  interface nsInterface03_01 {
112    // @KeepAsConsumer
113    interfaceProp03_01: string;
114  };
115  // @KeepAsConsumer
116  enum nsEnum03 {
117    RED03
118  }
119  enum nsEnum03_01 {
120    // @KeepAsConsumer
121    RED03_01
122  }
123  // @KeepAsConsumer
124  namespace InnerNamespace03 {
125    const innerConstValue03 = 1;
126  }
127  // @KeepAsConsumer
128  type nsType03 = "A";
129  const noExportedValue03 = 1;
130}
131
132// @KeepAsConsumer
133export namespace MyNamespace04 {
134  export namespace MyNamespace05 {
135    export namespace MyNamespace06 {
136      namespace MyNamespace07 {
137        export class MyNamespace07Class {}
138      }
139      // @KeepAsConsumer
140      namespace MyNamespace08 {
141        export class MyNamespace08Class {}
142      }
143      export namespace MyNamespace09 {
144        export class MyNamespace09Class {}
145      }
146    }
147  }
148}