• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-2022 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 ArkTS
19 */
20
21/**
22 * PlainArray stores key-value (KV) pairs. Each key must be unique, be of the number type, and have only one value.
23 * PlainArray is based on generics and uses a lightweight structure.
24 *
25 * @syscap SystemCapability.Utils.Lang
26 * @since 8
27 */
28/**
29 * PlainArray stores key-value (KV) pairs. Each key must be unique, be of the number type, and have only one value.
30 * PlainArray is based on generics and uses a lightweight structure.
31 *
32 * @syscap SystemCapability.Utils.Lang
33 * @crossplatform
34 * @since 10
35 */
36/**
37 * PlainArray stores key-value (KV) pairs. Each key must be unique, be of the number type, and have only one value.
38 * PlainArray is based on generics and uses a lightweight structure.
39 *
40 * @syscap SystemCapability.Utils.Lang
41 * @crossplatform
42 * @atomicservice
43 * @since 12
44 */
45declare class PlainArray<T> {
46  /**
47   * A constructor used to create a PlainArray object.
48   *
49   * @throws { BusinessError } 10200012 - The PlainArray's constructor cannot be directly invoked.
50   * @syscap SystemCapability.Utils.Lang
51   * @since 8
52   */
53  /**
54   * A constructor used to create a PlainArray object.
55   *
56   * @throws { BusinessError } 10200012 - The PlainArray's constructor cannot be directly invoked.
57   * @syscap SystemCapability.Utils.Lang
58   * @crossplatform
59   * @since 10
60   */
61  /**
62   * A constructor used to create a PlainArray object.
63   *
64   * @throws { BusinessError } 10200012 - The PlainArray's constructor cannot be directly invoked.
65   * @syscap SystemCapability.Utils.Lang
66   * @crossplatform
67   * @atomicservice
68   * @since 12
69   */
70  constructor();
71  /**
72   * Gets the element number of the PlainArray.
73   *
74   * @syscap SystemCapability.Utils.Lang
75   * @since 8
76   */
77  /**
78   * Gets the element number of the PlainArray.
79   *
80   * @syscap SystemCapability.Utils.Lang
81   * @crossplatform
82   * @since 10
83   */
84  /**
85   * Gets the element number of the PlainArray.
86   *
87   * @syscap SystemCapability.Utils.Lang
88   * @crossplatform
89   * @atomicservice
90   * @since 12
91   */
92  length: number;
93  /**
94   * Appends a key-value pair to PlainArray
95   *
96   * @param { number } key - key key Added the key of key-value
97   * @param { T } value - value value Added the value of key-value
98   * @throws { BusinessError } 10200011 - The add method cannot be bound.
99   * @throws { BusinessError } 401 - Parameter error. Possible causes:
100   * 1.Mandatory parameters are left unspecified;
101   * 2.Incorrect parameter types.
102   * @syscap SystemCapability.Utils.Lang
103   * @since 8
104   */
105  /**
106   * Appends a key-value pair to PlainArray
107   *
108   * @param { number } key - key key Added the key of key-value
109   * @param { T } value - value value Added the value of key-value
110   * @throws { BusinessError } 10200011 - The add method cannot be bound.
111   * @throws { BusinessError } 401 - Parameter error. Possible causes:
112   * 1.Mandatory parameters are left unspecified;
113   * 2.Incorrect parameter types.
114   * @syscap SystemCapability.Utils.Lang
115   * @crossplatform
116   * @since 10
117   */
118  /**
119   * Appends a key-value pair to PlainArray
120   *
121   * @param { number } key - key key Added the key of key-value
122   * @param { T } value - value value Added the value of key-value
123   * @throws { BusinessError } 10200011 - The add method cannot be bound.
124   * @throws { BusinessError } 401 - Parameter error. Possible causes:
125   * 1.Mandatory parameters are left unspecified;
126   * 2.Incorrect parameter types.
127   * @syscap SystemCapability.Utils.Lang
128   * @crossplatform
129   * @atomicservice
130   * @since 12
131   */
132  add(key: number, value: T): void;
133  /**
134   * Clears the current PlainArray object
135   *
136   * @throws { BusinessError } 10200011 - The clear method cannot be bound.
137   * @syscap SystemCapability.Utils.Lang
138   * @since 8
139   */
140  /**
141   * Clears the current PlainArray object
142   *
143   * @throws { BusinessError } 10200011 - The clear method cannot be bound.
144   * @syscap SystemCapability.Utils.Lang
145   * @crossplatform
146   * @since 10
147   */
148  /**
149   * Clears the current PlainArray object
150   *
151   * @throws { BusinessError } 10200011 - The clear method cannot be bound.
152   * @syscap SystemCapability.Utils.Lang
153   * @crossplatform
154   * @atomicservice
155   * @since 12
156   */
157  clear(): void;
158  /**
159   * Obtains a clone of the current PlainArray object
160   *
161   * @returns { PlainArray<T> }
162   * @throws { BusinessError } 10200011 - The clone method cannot be bound.
163   * @syscap SystemCapability.Utils.Lang
164   * @since 8
165   */
166  /**
167   * Obtains a clone of the current PlainArray object
168   *
169   * @returns { PlainArray<T> }
170   * @throws { BusinessError } 10200011 - The clone method cannot be bound.
171   * @syscap SystemCapability.Utils.Lang
172   * @crossplatform
173   * @since 10
174   */
175  /**
176   * Obtains a clone of the current PlainArray object
177   *
178   * @returns { PlainArray<T> }
179   * @throws { BusinessError } 10200011 - The clone method cannot be bound.
180   * @syscap SystemCapability.Utils.Lang
181   * @crossplatform
182   * @atomicservice
183   * @since 12
184   */
185  clone(): PlainArray<T>;
186  /**
187   * Checks whether the current PlainArray object contains the specified key
188   *
189   * @param { number } key - key key need to determine whether to include the key
190   * @returns { boolean } the boolean type
191   * @throws { BusinessError } 10200011 - The has method cannot be bound.
192   * @throws { BusinessError } 401 - Parameter error. Possible causes:
193   * 1.Mandatory parameters are left unspecified;
194   * 2.Incorrect parameter types.
195   * @syscap SystemCapability.Utils.Lang
196   * @since 8
197   */
198  /**
199   * Checks whether the current PlainArray object contains the specified key
200   *
201   * @param { number } key - key key need to determine whether to include the key
202   * @returns { boolean } the boolean type
203   * @throws { BusinessError } 10200011 - The has method cannot be bound.
204   * @throws { BusinessError } 401 - Parameter error. Possible causes:
205   * 1.Mandatory parameters are left unspecified;
206   * 2.Incorrect parameter types.
207   * @syscap SystemCapability.Utils.Lang
208   * @crossplatform
209   * @since 10
210   */
211  /**
212   * Checks whether the current PlainArray object contains the specified key
213   *
214   * @param { number } key - key key need to determine whether to include the key
215   * @returns { boolean } the boolean type
216   * @throws { BusinessError } 10200011 - The has method cannot be bound.
217   * @throws { BusinessError } 401 - Parameter error. Possible causes:
218   * 1.Mandatory parameters are left unspecified;
219   * 2.Incorrect parameter types.
220   * @syscap SystemCapability.Utils.Lang
221   * @crossplatform
222   * @atomicservice
223   * @since 12
224   */
225  has(key: number): boolean;
226  /**
227   * Queries the value associated with the specified key
228   *
229   * @param { number } key - key key Looking for goals
230   * @returns { T } the value of key-value pairs
231   * @throws { BusinessError } 10200011 - The get method cannot be bound.
232   * @throws { BusinessError } 401 - Parameter error. Possible causes:
233   * 1.Mandatory parameters are left unspecified;
234   * 2.Incorrect parameter types.
235   * @syscap SystemCapability.Utils.Lang
236   * @since 8
237   */
238  /**
239   * Queries the value associated with the specified key
240   *
241   * @param { number } key - key key Looking for goals
242   * @returns { T } the value of key-value pairs
243   * @throws { BusinessError } 10200011 - The get method cannot be bound.
244   * @throws { BusinessError } 401 - Parameter error. Possible causes:
245   * 1.Mandatory parameters are left unspecified;
246   * 2.Incorrect parameter types.
247   * @syscap SystemCapability.Utils.Lang
248   * @crossplatform
249   * @since 10
250   */
251  /**
252   * Queries the value associated with the specified key
253   *
254   * @param { number } key - key key Looking for goals
255   * @returns { T } the value of key-value pairs
256   * @throws { BusinessError } 10200011 - The get method cannot be bound.
257   * @throws { BusinessError } 401 - Parameter error. Possible causes:
258   * 1.Mandatory parameters are left unspecified;
259   * 2.Incorrect parameter types.
260   * @syscap SystemCapability.Utils.Lang
261   * @crossplatform
262   * @atomicservice
263   * @since 12
264   */
265  get(key: number): T;
266  /**
267   * Queries the index for a specified key
268   *
269   * @param { number } key - key key Looking for goals
270   * @returns { number } Subscript corresponding to target
271   * @throws { BusinessError } 10200011 - The getIndexOfKey method cannot be bound.
272   * @throws { BusinessError } 401 - Parameter error. Possible causes:
273   * 1.Mandatory parameters are left unspecified;
274   * 2.Incorrect parameter types.
275   * @syscap SystemCapability.Utils.Lang
276   * @since 8
277   */
278  /**
279   * Queries the index for a specified key
280   *
281   * @param { number } key - key key Looking for goals
282   * @returns { number } Subscript corresponding to target
283   * @throws { BusinessError } 10200011 - The getIndexOfKey method cannot be bound.
284   * @throws { BusinessError } 401 - Parameter error. Possible causes:
285   * 1.Mandatory parameters are left unspecified;
286   * 2.Incorrect parameter types.
287   * @syscap SystemCapability.Utils.Lang
288   * @crossplatform
289   * @since 10
290   */
291  /**
292   * Queries the index for a specified key
293   *
294   * @param { number } key - key key Looking for goals
295   * @returns { number } Subscript corresponding to target
296   * @throws { BusinessError } 10200011 - The getIndexOfKey method cannot be bound.
297   * @throws { BusinessError } 401 - Parameter error. Possible causes:
298   * 1.Mandatory parameters are left unspecified;
299   * 2.Incorrect parameter types.
300   * @syscap SystemCapability.Utils.Lang
301   * @crossplatform
302   * @atomicservice
303   * @since 12
304   */
305  getIndexOfKey(key: number): number;
306  /**
307   * Queries the index for a specified value
308   *
309   * @param { T } value - value value Looking for goals
310   * @returns { number } Subscript corresponding to target
311   * @throws { BusinessError } 10200011 - The getIndexOfValue method cannot be bound.
312   * @syscap SystemCapability.Utils.Lang
313   * @since 8
314   */
315  /**
316   * Queries the index for a specified value
317   *
318   * @param { T } value - value value Looking for goals
319   * @returns { number } Subscript corresponding to target
320   * @throws { BusinessError } 10200011 - The getIndexOfValue method cannot be bound.
321   * @syscap SystemCapability.Utils.Lang
322   * @crossplatform
323   * @since 10
324   */
325  /**
326   * Queries the index for a specified value
327   *
328   * @param { T } value - value value Looking for goals
329   * @returns { number } Subscript corresponding to target
330   * @throws { BusinessError } 10200011 - The getIndexOfValue method cannot be bound.
331   * @syscap SystemCapability.Utils.Lang
332   * @crossplatform
333   * @atomicservice
334   * @since 12
335   */
336  getIndexOfValue(value: T): number;
337  /**
338   * Checks whether the current PlainArray object is empty
339   *
340   * @returns { boolean } the boolean type
341   * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound.
342   * @syscap SystemCapability.Utils.Lang
343   * @since 8
344   */
345  /**
346   * Checks whether the current PlainArray object is empty
347   *
348   * @returns { boolean } the boolean type
349   * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound.
350   * @syscap SystemCapability.Utils.Lang
351   * @crossplatform
352   * @since 10
353   */
354  /**
355   * Checks whether the current PlainArray object is empty
356   *
357   * @returns { boolean } the boolean type
358   * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound.
359   * @syscap SystemCapability.Utils.Lang
360   * @crossplatform
361   * @atomicservice
362   * @since 12
363   */
364  isEmpty(): boolean;
365  /**
366   * Queries the key at a specified index
367   *
368   * @param { number } index - index index Target subscript for search
369   * @returns { number } the key of key-value pairs
370   * @throws { BusinessError } 10200011 - The getKeyAt method cannot be bound.
371   * @throws { BusinessError } 401 - Parameter error. Possible causes:
372   * 1.Mandatory parameters are left unspecified;
373   * 2.Incorrect parameter types.
374   * @syscap SystemCapability.Utils.Lang
375   * @since 8
376   */
377  /**
378   * Queries the key at a specified index
379   *
380   * @param { number } index - index index Target subscript for search
381   * @returns { number } the key of key-value pairs
382   * @throws { BusinessError } 10200011 - The getKeyAt method cannot be bound.
383   * @throws { BusinessError } 401 - Parameter error. Possible causes:
384   * 1.Mandatory parameters are left unspecified;
385   * 2.Incorrect parameter types.
386   * @syscap SystemCapability.Utils.Lang
387   * @crossplatform
388   * @since 10
389   */
390  /**
391   * Queries the key at a specified index
392   *
393   * @param { number } index - index index Target subscript for search
394   * @returns { number } the key of key-value pairs
395   * @throws { BusinessError } 10200011 - The getKeyAt method cannot be bound.
396   * @throws { BusinessError } 401 - Parameter error. Possible causes:
397   * 1.Mandatory parameters are left unspecified;
398   * 2.Incorrect parameter types.
399   * @syscap SystemCapability.Utils.Lang
400   * @crossplatform
401   * @atomicservice
402   * @since 12
403   */
404  getKeyAt(index: number): number;
405  /**
406   * Remove the key-value pair based on a specified key if it exists and return the value
407   *
408   * @param { number } key - key key Target to be deleted
409   * @returns { T } Target mapped value
410   * @throws { BusinessError } 10200011 - The remove method cannot be bound.
411   * @throws { BusinessError } 401 - Parameter error. Possible causes:
412   * 1.Mandatory parameters are left unspecified;
413   * 2.Incorrect parameter types.
414   * @syscap SystemCapability.Utils.Lang
415   * @since 8
416   */
417  /**
418   * Remove the key-value pair based on a specified key if it exists and return the value
419   *
420   * @param { number } key - key key Target to be deleted
421   * @returns { T } Target mapped value
422   * @throws { BusinessError } 10200011 - The remove method cannot be bound.
423   * @throws { BusinessError } 401 - Parameter error. Possible causes:
424   * 1.Mandatory parameters are left unspecified;
425   * 2.Incorrect parameter types.
426   * @syscap SystemCapability.Utils.Lang
427   * @crossplatform
428   * @since 10
429   */
430  /**
431   * Remove the key-value pair based on a specified key if it exists and return the value
432   *
433   * @param { number } key - key key Target to be deleted
434   * @returns { T } Target mapped value
435   * @throws { BusinessError } 10200011 - The remove method cannot be bound.
436   * @throws { BusinessError } 401 - Parameter error. Possible causes:
437   * 1.Mandatory parameters are left unspecified;
438   * 2.Incorrect parameter types.
439   * @syscap SystemCapability.Utils.Lang
440   * @crossplatform
441   * @atomicservice
442   * @since 12
443   */
444  remove(key: number): T;
445  /**
446   * Remove the key-value pair at a specified index if it exists and return the value
447   *
448   * @param { number } index - index index Target subscript for search
449   * @returns { T } the T type
450   * @throws { BusinessError } 10200011 - The removeAt method cannot be bound.
451   * @throws { BusinessError } 401 - Parameter error. Possible causes:
452   * 1.Mandatory parameters are left unspecified;
453   * 2.Incorrect parameter types.
454   * @syscap SystemCapability.Utils.Lang
455   * @since 8
456   */
457  /**
458   * Remove the key-value pair at a specified index if it exists and return the value
459   *
460   * @param { number } index - index index Target subscript for search
461   * @returns { T } the T type
462   * @throws { BusinessError } 10200011 - The removeAt method cannot be bound.
463   * @throws { BusinessError } 401 - Parameter error. Possible causes:
464   * 1.Mandatory parameters are left unspecified;
465   * 2.Incorrect parameter types.
466   * @syscap SystemCapability.Utils.Lang
467   * @crossplatform
468   * @since 10
469   */
470  /**
471   * Remove the key-value pair at a specified index if it exists and return the value
472   *
473   * @param { number } index - index index Target subscript for search
474   * @returns { T } the T type
475   * @throws { BusinessError } 10200011 - The removeAt method cannot be bound.
476   * @throws { BusinessError } 401 - Parameter error. Possible causes:
477   * 1.Mandatory parameters are left unspecified;
478   * 2.Incorrect parameter types.
479   * @syscap SystemCapability.Utils.Lang
480   * @crossplatform
481   * @atomicservice
482   * @since 12
483   */
484  removeAt(index: number): T;
485  /**
486   * Remove a group of key-value pairs from a specified index
487   *
488   * @param { number } index - index index remove start index
489   * @param { number } size - size size Expected deletion quantity
490   * @returns { number } Actual deleted quantity
491   * @throws { BusinessError } 10200011 - The removeRangeFrom method cannot be bound.
492   * @throws { BusinessError } 10200001 - The value of index is out of range.
493   * @throws { BusinessError } 401 - Parameter error. Possible causes:
494   * 1.Mandatory parameters are left unspecified;
495   * 2.Incorrect parameter types.
496   * @syscap SystemCapability.Utils.Lang
497   * @since 8
498   */
499  /**
500   * Remove a group of key-value pairs from a specified index
501   *
502   * @param { number } index - index index remove start index
503   * @param { number } size - size size Expected deletion quantity
504   * @returns { number } Actual deleted quantity
505   * @throws { BusinessError } 10200011 - The removeRangeFrom method cannot be bound.
506   * @throws { BusinessError } 10200001 - The value of index is out of range.
507   * @throws { BusinessError } 401 - Parameter error. Possible causes:
508   * 1.Mandatory parameters are left unspecified;
509   * 2.Incorrect parameter types.
510   * @syscap SystemCapability.Utils.Lang
511   * @crossplatform
512   * @since 10
513   */
514  /**
515   * Remove a group of key-value pairs from a specified index
516   *
517   * @param { number } index - index index remove start index
518   * @param { number } size - size size Expected deletion quantity
519   * @returns { number } Actual deleted quantity
520   * @throws { BusinessError } 10200011 - The removeRangeFrom method cannot be bound.
521   * @throws { BusinessError } 10200001 - The value of index is out of range.
522   * @throws { BusinessError } 401 - Parameter error. Possible causes:
523   * 1.Mandatory parameters are left unspecified;
524   * 2.Incorrect parameter types.
525   * @syscap SystemCapability.Utils.Lang
526   * @crossplatform
527   * @atomicservice
528   * @since 12
529   */
530  removeRangeFrom(index: number, size: number): number;
531  /**
532   * Update value on specified index
533   *
534   * @param { number } index - index index Target subscript for search
535   * @param { T } value - value value Updated the target mapped value
536   * @throws { BusinessError } 10200011 - The setValueAt method cannot be bound.
537   * @throws { BusinessError } 10200001 - The value of index is out of range.
538   * @throws { BusinessError } 401 - Parameter error. Possible causes:
539   * 1.Mandatory parameters are left unspecified;
540   * 2.Incorrect parameter types.
541   * @syscap SystemCapability.Utils.Lang
542   * @since 8
543   */
544  /**
545   * Update value on specified index
546   *
547   * @param { number } index - index index Target subscript for search
548   * @param { T } value - value value Updated the target mapped value
549   * @throws { BusinessError } 10200011 - The setValueAt method cannot be bound.
550   * @throws { BusinessError } 10200001 - The value of index is out of range.
551   * @throws { BusinessError } 401 - Parameter error. Possible causes:
552   * 1.Mandatory parameters are left unspecified;
553   * 2.Incorrect parameter types.
554   * @syscap SystemCapability.Utils.Lang
555   * @crossplatform
556   * @since 10
557   */
558  /**
559   * Update value on specified index
560   *
561   * @param { number } index - index index Target subscript for search
562   * @param { T } value - value value Updated the target mapped value
563   * @throws { BusinessError } 10200011 - The setValueAt method cannot be bound.
564   * @throws { BusinessError } 10200001 - The value of index is out of range.
565   * @throws { BusinessError } 401 - Parameter error. Possible causes:
566   * 1.Mandatory parameters are left unspecified;
567   * 2.Incorrect parameter types.
568   * @syscap SystemCapability.Utils.Lang
569   * @crossplatform
570   * @atomicservice
571   * @since 12
572   */
573  setValueAt(index: number, value: T): void;
574  /**
575   * Obtains the string representation of the PlainArray object
576   *
577   * @returns { String }
578   * @throws { BusinessError } 10200011 - The toString method cannot be bound.
579   * @syscap SystemCapability.Utils.Lang
580   * @since 8
581   */
582  /**
583   * Obtains the string representation of the PlainArray object
584   *
585   * @returns { String }
586   * @throws { BusinessError } 10200011 - The toString method cannot be bound.
587   * @syscap SystemCapability.Utils.Lang
588   * @crossplatform
589   * @since 10
590   */
591  /**
592   * Obtains the string representation of the PlainArray object
593   *
594   * @returns { String }
595   * @throws { BusinessError } 10200011 - The toString method cannot be bound.
596   * @syscap SystemCapability.Utils.Lang
597   * @crossplatform
598   * @atomicservice
599   * @since 12
600   */
601  toString(): String;
602  /**
603   * Queries the value at a specified index
604   *
605   * @param { number } index - index index Target subscript for search
606   * @returns { T } the value of key-value pairs
607   * @throws { BusinessError } 10200011 - The getValueAt method cannot be bound.
608   * @throws { BusinessError } 10200001 - The value of index is out of range.
609   * @throws { BusinessError } 401 - Parameter error. Possible causes:
610   * 1.Mandatory parameters are left unspecified;
611   * 2.Incorrect parameter types.
612   * @syscap SystemCapability.Utils.Lang
613   * @since 8
614   */
615  /**
616   * Queries the value at a specified index
617   *
618   * @param { number } index - index index Target subscript for search
619   * @returns { T } the value of key-value pairs
620   * @throws { BusinessError } 10200011 - The getValueAt method cannot be bound.
621   * @throws { BusinessError } 10200001 - The value of index is out of range.
622   * @throws { BusinessError } 401 - Parameter error. Possible causes:
623   * 1.Mandatory parameters are left unspecified;
624   * 2.Incorrect parameter types.
625   * @syscap SystemCapability.Utils.Lang
626   * @crossplatform
627   * @since 10
628   */
629  /**
630   * Queries the value at a specified index
631   *
632   * @param { number } index - index index Target subscript for search
633   * @returns { T } the value of key-value pairs
634   * @throws { BusinessError } 10200011 - The getValueAt method cannot be bound.
635   * @throws { BusinessError } 10200001 - The value of index is out of range.
636   * @throws { BusinessError } 401 - Parameter error. Possible causes:
637   * 1.Mandatory parameters are left unspecified;
638   * 2.Incorrect parameter types.
639   * @syscap SystemCapability.Utils.Lang
640   * @crossplatform
641   * @atomicservice
642   * @since 12
643   */
644  getValueAt(index: number): T;
645  /**
646   * Executes a provided function once for each value in the PlainArray object.
647   *
648   * @param { function } callbackFn - callbackFn
649   * callbackFn (required) A function that accepts up to three arguments.
650   * The function to be called for each element.
651   * @param { Object } [thisArg] - thisArg
652   * thisArg (Optional) The value to be used as this value for when callbackFn is called.
653   * If thisArg is omitted, undefined is used as the this value.
654   * @throws { BusinessError } 10200011 - The forEach method cannot be bound.
655   * @throws { BusinessError } 401 - Parameter error. Possible causes:
656   * 1.Mandatory parameters are left unspecified;
657   * 2.Incorrect parameter types.
658   * @syscap SystemCapability.Utils.Lang
659   * @since 8
660   */
661  /**
662   * Executes a provided function once for each value in the PlainArray object.
663   *
664   * @param { function } callbackFn - callbackFn
665   * callbackFn (required) A function that accepts up to three arguments.
666   * The function to be called for each element.
667   * @param { Object } [thisArg] - thisArg
668   * thisArg (Optional) The value to be used as this value for when callbackFn is called.
669   * If thisArg is omitted, undefined is used as the this value.
670   * @throws { BusinessError } 10200011 - The forEach method cannot be bound.
671   * @throws { BusinessError } 401 - Parameter error. Possible causes:
672   * 1.Mandatory parameters are left unspecified;
673   * 2.Incorrect parameter types.
674   * @syscap SystemCapability.Utils.Lang
675   * @crossplatform
676   * @since 10
677   */
678  /**
679   * Executes a provided function once for each value in the PlainArray object.
680   *
681   * @param { function } callbackFn - callbackFn
682   * callbackFn (required) A function that accepts up to three arguments.
683   * The function to be called for each element.
684   * @param { Object } [thisArg] - thisArg
685   * thisArg (Optional) The value to be used as this value for when callbackFn is called.
686   * If thisArg is omitted, undefined is used as the this value.
687   * @throws { BusinessError } 10200011 - The forEach method cannot be bound.
688   * @throws { BusinessError } 401 - Parameter error. Possible causes:
689   * 1.Mandatory parameters are left unspecified;
690   * 2.Incorrect parameter types.
691   * @syscap SystemCapability.Utils.Lang
692   * @crossplatform
693   * @atomicservice
694   * @since 12
695   */
696  forEach(callbackFn: (value: T, index?: number, PlainArray?: PlainArray<T>) => void, thisArg?: Object): void;
697  /**
698   * returns an iterator.Each item of the iterator is a Javascript Object
699   *
700   * @returns { IterableIterator<[number, T]> }
701   * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound.
702   * @syscap SystemCapability.Utils.Lang
703   * @since 8
704   */
705  /**
706   * returns an iterator.Each item of the iterator is a Javascript Object
707   *
708   * @returns { IterableIterator<[number, T]> }
709   * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound.
710   * @syscap SystemCapability.Utils.Lang
711   * @crossplatform
712   * @since 10
713   */
714  /**
715   * returns an iterator.Each item of the iterator is a Javascript Object
716   *
717   * @returns { IterableIterator<[number, T]> }
718   * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound.
719   * @syscap SystemCapability.Utils.Lang
720   * @crossplatform
721   * @atomicservice
722   * @since 12
723   */
724  [Symbol.iterator](): IterableIterator<[number, T]>;
725}
726
727export default PlainArray;
728