• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-2023 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 * declare ForEachAttribute
23 *
24 * @extends DynamicNode<ForEachAttribute>
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @crossplatform
27 * @form
28 * @atomicservice
29 * @since 12
30 */
31declare class ForEachAttribute extends DynamicNode<ForEachAttribute> {
32}
33
34/**
35 * looping function.
36 *
37 * @interface ForEachInterface
38 * @syscap SystemCapability.ArkUI.ArkUI.Full
39 * @since 7
40 */
41/**
42 * looping function.
43 *
44 * @interface ForEachInterface
45 * @syscap SystemCapability.ArkUI.ArkUI.Full
46 * @form
47 * @since 9
48 */
49/**
50 * looping function.
51 *
52 * @interface ForEachInterface
53 * @syscap SystemCapability.ArkUI.ArkUI.Full
54 * @crossplatform
55 * @form
56 * @since 10
57 */
58/**
59 * looping function.
60 *
61 * @interface ForEachInterface
62 * @syscap SystemCapability.ArkUI.ArkUI.Full
63 * @crossplatform
64 * @form
65 * @atomicservice
66 * @since 11
67 */
68interface ForEachInterface {
69  /**
70   * Set the value, array, and key.
71   *
72   * @param { Array<any> } arr
73   * @param { function } itemGenerator
74   * @param { function } keyGenerator
75   * @returns { ForEachInterface }
76   * @syscap SystemCapability.ArkUI.ArkUI.Full
77   * @since 7
78   */
79  /**
80   * Set the value, array, and key.
81   *
82   * @param { Array<any> } arr
83   * @param { function } itemGenerator
84   * @param { function } keyGenerator
85   * @returns { ForEachInterface }
86   * @syscap SystemCapability.ArkUI.ArkUI.Full
87   * @form
88   * @since 9
89   */
90  /**
91   * Set the value, array, and key.
92   *
93   * @param { Array<any> } arr
94   * @param { function } itemGenerator
95   * @param { function } keyGenerator
96   * @returns { ForEachInterface }
97   * @syscap SystemCapability.ArkUI.ArkUI.Full
98   * @crossplatform
99   * @form
100   * @since 10
101   */
102  /**
103   * Set the value, array, and key.
104   *
105   * @param { Array<any> } arr
106   * @param { function } itemGenerator
107   * @param { function } keyGenerator
108   * @returns { ForEachInterface }
109   * @syscap SystemCapability.ArkUI.ArkUI.Full
110   * @crossplatform
111   * @form
112   * @atomicservice
113   * @since 11
114   */
115  /**
116   * Set the value, array, and key.
117   *
118   * @param { Array<any> } arr
119   * @param { function } itemGenerator
120   * @param { function } keyGenerator
121   * @returns { ForEachAttribute }
122   * @syscap SystemCapability.ArkUI.ArkUI.Full
123   * @crossplatform
124   * @form
125   * @atomicservice
126   * @since 12
127   */
128  (
129    arr: Array<any>,
130    itemGenerator: (item: any, index: number) => void,
131    keyGenerator?: (item: any, index: number) => string,
132  ): ForEachAttribute;
133}
134
135/**
136 * Defines ForEach Component.
137 *
138 * @syscap SystemCapability.ArkUI.ArkUI.Full
139 * @since 7
140 */
141/**
142 * Defines ForEach Component.
143 *
144 * @syscap SystemCapability.ArkUI.ArkUI.Full
145 * @form
146 * @since 9
147 */
148/**
149 * Defines ForEach Component.
150 *
151 * @syscap SystemCapability.ArkUI.ArkUI.Full
152 * @crossplatform
153 * @form
154 * @since 10
155 */
156/**
157 * Defines ForEach Component.
158 *
159 * @syscap SystemCapability.ArkUI.ArkUI.Full
160 * @crossplatform
161 * @form
162 * @atomicservice
163 * @since 11
164 */
165declare const ForEach: ForEachInterface;
166