1/* 2 * Copyright (c) 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 16/** 17 * @file 18 * @kit ArkUI 19 */ 20 21/** 22 * Define Content type 23 * 24 * @typedef {import('../api/@ohos.arkui.node').Content} Content 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @crossplatform 27 * @atomicservice 28 * @since 12 29 */ 30declare type Content = import('../api/@ohos.arkui.node').Content; 31 32/** 33 * Define ContentSlot attribute, to prevent improper recursive usage of ContentSlot 34 * 35 * @syscap SystemCapability.ArkUI.ArkUI.Full 36 * @crossplatform 37 * @atomicservice 38 * @since 12 39 */ 40declare class ContentSlotAttribute { 41} 42 43/** 44 * Placeholder component for NodeContent and ComponentContent 45 * 46 * @interface ContentSlotInterface 47 * @syscap SystemCapability.ArkUI.ArkUI.Full 48 * @crossplatform 49 * @atomicservice 50 * @since 12 51 */ 52interface ContentSlotInterface { 53 /** 54 * Called when the content is added to the placeholder component 55 * 56 * @param { Content } content - Indicates the class object of ComponentContent or NodeContent 57 * @returns { ContentSlotAttribute } 58 * @syscap SystemCapability.ArkUI.ArkUI.Full 59 * @crossplatform 60 * @atomicservice 61 * @since 12 62 */ 63 (content: Content): ContentSlotAttribute; 64} 65 66/** 67 * Defines the ContentSlot Component 68 * 69 * @syscap SystemCapability.ArkUI.ArkUI.Full 70 * @crossplatform 71 * @atomicservice 72 * @since 12 73 */ 74declare const ContentSlot: ContentSlotInterface;