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 * @file 17 * @kit ArkUI 18 * @arkts 1.2 19 */ 20 21import { memo, ComponentBuilder, __memo_context_type, __memo_id_type } from "../stateManagement/runtime"; 22 23/** 24 * Defines Builder Annotation. 25 * 26 * @syscap SystemCapability.ArkUI.ArkUI.Full 27 * @crossplatform 28 * @form 29 * @atomicservice 30 * @since 20 31 */ 32@Retention({policy: "SOURCE"}) 33export declare @interface Builder {} 34 35/** 36 * Defines BuilderParam Annotation. 37 * 38 * @syscap SystemCapability.ArkUI.ArkUI.Full 39 * @crossplatform 40 * @form 41 * @atomicservice 42 * @since 20 43 */ 44@Retention({policy: "SOURCE"}) 45export declare @interface BuilderParam {} 46 47/** 48 * Defines the CustomBuilder Type. 49 * 50 * @typedef { @Builder (() => void) } CustomBuilder 51 * @syscap SystemCapability.ArkUI.ArkUI.Full 52 * @crossplatform 53 * @form 54 * @atomicservice 55 * @since 20 56 */ 57export type CustomBuilder = @Builder (() => void); 58 59/** 60 * Defines the CustomBuilder Type. 61 * 62 * @typedef { @Builder ((t:T) => void) } CustomBuilderT 63 * @syscap SystemCapability.ArkUI.ArkUI.Full 64 * @crossplatform 65 * @form 66 * @atomicservice 67 * @since 20 68 */ 69export type CustomBuilderT<T> = @Builder ((t: T) => void); 70 71/** 72 * Defines the PageMapBuilder Type. 73 * 74 * @typedef { @Builder ((name: string, param: Object | null | undefined) => void) } PageMapBuilder 75 * @syscap SystemCapability.ArkUI.ArkUI.Full 76 * @crossplatform 77 * @form 78 * @atomicservice 79 * @since 20 80 */ 81export type PageMapBuilder = @Builder ((name: string, param: Object | null | undefined) => void) 82 83/** 84 * Defining wrapBuilder function. 85 * @param { function } builder 86 * @returns { WrappedBuilder<T> } 87 * @syscap SystemCapability.ArkUI.ArkUI.Full 88 * @since 20 89 */ 90export declare function wrapBuilder<T>(builder: T): WrappedBuilder<T>; 91 92/** 93 * Defines the WrappedBuilder class. 94 * @syscap SystemCapability.ArkUI.ArkUI.Full 95 * @since 20 96 */ 97export declare class WrappedBuilder<T> { 98 99 /** 100 * @type { function } 101 * @syscap SystemCapability.ArkUI.ArkUI.Full 102 * @since 20 103 */ 104 @Builder public builder: T; 105 106 /** 107 * @param { function } builder 108 * @syscap SystemCapability.ArkUI.ArkUI.Full 109 * @since 20 110 */ 111 public constructor(builder: T); 112} 113