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 */ 15declare const CustomMethod: PropertyDecorator; 16 17@Entry 18@Component 19struct ValidateDifferentMethodHomeComponent { 20 build() { 21 Column() {} 22 } 23} 24@Builder 25@Styles 26function testFunction() { 27 Text("testFunction") 28} 29 30@Builder 31@CustomMethod 32function testFunction1() { 33 Text("testFunction1") 34} 35 36@Builder 37function testFunction2() { 38 Text("testFunction2") 39} 40 41@Styles 42function testFunction3() { 43 .width(100) 44} 45 46@Component 47struct ValidateDifferentMethodTestComponent { 48 build() { 49 50 } 51 52 @Builder 53 @Styles 54 testMethod() { 55 56 } 57 58 @Builder 59 @CustomMethod 60 testMethod1() { 61 62 } 63} 64 65@ComponentV2 66struct ValidateDifferentMethodTestComponent1 { 67 build() { 68 69 } 70 71 @Builder 72 @Monitor("aa") 73 testMethod2() { 74 75 } 76 77 @Builder 78 @Computed 79 testMethod3() { 80 81 } 82 83 @Builder 84 @Styles 85 testMethod5() { 86 87 } 88}