• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022-2024 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// declare const CustomMethod: PropertyDecorator;
16
17@Entry
18@Component
19struct ValidateDuplicateMethodHomeComponent {
20  build() {
21    Column() {}
22  }
23}
24@Builder
25@Builder
26function testFunction4() {
27  Text("testFunction1")
28}
29
30@CustomMethod
31@CustomMethod
32function testFunction5() {
33  console.log("testFunction2")
34}
35
36@Component
37struct TestComponent {
38
39  build() {}
40
41  @Builder
42  @Builder
43  testMethod() {
44    Text("testMethod")
45  }
46
47  @Styles
48  @Styles
49  testMethod2() {
50    .width(100)
51  }
52}
53
54@ComponentV2
55struct TestComponent1 {
56
57  build() {}
58
59  @Builder
60  @Builder
61  testMethod() {
62    Text("testMethod")
63  }
64
65  @Styles
66  @Styles
67  testMethod2() {
68    .width(100)
69  }
70
71  @Monitor("aa")
72  @Monitor("aa")
73  testMethod3() {
74    console.log("testMethod3")
75  }
76
77  @Computed
78  @Computed
79  get fullName() {
80    return "hello"
81  }
82}