• 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
17class MyClass01 {
18  static staticProperty01 = 1;
19
20  property02: string;
21
22  constructor(property02: string, public property03: number) {
23    this.property02 = property02;
24    this.property03 = 2;
25  }
26
27  myMethod01(): void{};
28
29  static myStaticMethod(): void{};
30
31  get myGetter(): string {
32    return this.property02;
33  }
34
35  set mySetter(value: string) {
36    this.property02 = value;
37  }
38}
39
40// @KeepAsConsumer
41export class MyClass02 {
42  static staticProperty01 = 1;
43
44  property03: string;
45}
46
47class MyClass03 {
48  // @KeepAsConsumer
49  constructor(){}
50}
51
52export class MyClass04 {
53  // @KeepAsConsumer
54  constructor(){}
55}
56
57class MyClass05 {
58  // @KeepAsConsumer
59  static staticProperty05_01 = 1;
60
61  // @KeepAsConsumer
62  property05_02: string;
63
64  // @KeepAsConsumer
65  constructor(property05_02: string, public property05_03: number) {
66    this.property05_02 = property05_02;
67    this.property05_03 = 2;
68  }
69
70  // @KeepAsConsumer
71  myMethod05_01(): void{};
72
73  // @KeepAsConsumer
74  static myStaticMethod05(): void{};
75
76  // @KeepAsConsumer
77  get myGetter05(): string {
78    return this.property05_02;
79  }
80
81  // @KeepAsConsumer
82  set mySetter05(value: string) {
83    this.property05_02 = value;
84  }
85}
86
87export class MyClass06 {
88  // @KeepAsConsumer
89  property06: string;
90}