• 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 * looping function.
18 *
19 * @interface ForEachInterface
20 * @syscap SystemCapability.ArkUI.ArkUI.Full
21 * @since 7
22 */
23/**
24 * looping function.
25 *
26 * @interface ForEachInterface
27 * @syscap SystemCapability.ArkUI.ArkUI.Full
28 * @since 9
29 * @form
30 */
31/**
32 * looping function.
33 *
34 * @interface ForEachInterface
35 * @syscap SystemCapability.ArkUI.ArkUI.Full
36 * @crossplatform
37 * @since 10
38 * @form
39 */
40interface ForEachInterface {
41  /**
42   * Set the value, array, and key.
43   *
44   * @param { Array<any> } arr
45   * @param { function } itemGenerator
46   * @param { function } keyGenerator
47   * @returns { ForEachInterface }
48   * @syscap SystemCapability.ArkUI.ArkUI.Full
49   * @since 7
50   */
51  /**
52   * Set the value, array, and key.
53   *
54   * @param { Array<any> } arr
55   * @param { function } itemGenerator
56   * @param { function } keyGenerator
57   * @returns { ForEachInterface }
58   * @syscap SystemCapability.ArkUI.ArkUI.Full
59   * @since 9
60   * @form
61   */
62  /**
63   * Set the value, array, and key.
64   *
65   * @param { Array<any> } arr
66   * @param { function } itemGenerator
67   * @param { function } keyGenerator
68   * @returns { ForEachInterface }
69   * @syscap SystemCapability.ArkUI.ArkUI.Full
70   * @crossplatform
71   * @since 10
72   * @form
73   */
74  (
75    arr: Array<any>,
76    itemGenerator: (item: any, index: number) => void,
77    keyGenerator?: (item: any, index: number) => string,
78  ): ForEachInterface;
79}
80
81/**
82 * Defines ForEach Component.
83 *
84 * @syscap SystemCapability.ArkUI.ArkUI.Full
85 * @since 7
86 */
87/**
88 * Defines ForEach Component.
89 *
90 * @syscap SystemCapability.ArkUI.ArkUI.Full
91 * @since 9
92 * @form
93 */
94/**
95 * Defines ForEach Component.
96 *
97 * @syscap SystemCapability.ArkUI.ArkUI.Full
98 * @crossplatform
99 * @since 10
100 * @form
101 */
102declare const ForEach: ForEachInterface;
103