13af6ab5fSopenharmony_ci/*
23af6ab5fSopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
33af6ab5fSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
43af6ab5fSopenharmony_ci * you may not use this file except in compliance with the License.
53af6ab5fSopenharmony_ci * You may obtain a copy of the License at
63af6ab5fSopenharmony_ci *
73af6ab5fSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
83af6ab5fSopenharmony_ci *
93af6ab5fSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
103af6ab5fSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
113af6ab5fSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
123af6ab5fSopenharmony_ci * See the License for the specific language governing permissions and
133af6ab5fSopenharmony_ci * limitations under the License.
143af6ab5fSopenharmony_ci */
153af6ab5fSopenharmony_ci
163af6ab5fSopenharmony_ci/**
173af6ab5fSopenharmony_ci * @file Defines the collections for ArkTS
183af6ab5fSopenharmony_ci * @kit ArkTS
193af6ab5fSopenharmony_ci */
203af6ab5fSopenharmony_ci
213af6ab5fSopenharmony_ciimport lang from './@arkts.lang'
223af6ab5fSopenharmony_ci
233af6ab5fSopenharmony_ci/**
243af6ab5fSopenharmony_ci * ArkTS collections.
253af6ab5fSopenharmony_ci *
263af6ab5fSopenharmony_ci * @namespace collections
273af6ab5fSopenharmony_ci * @syscap SystemCapability.Utils.Lang
283af6ab5fSopenharmony_ci * @crossplatform
293af6ab5fSopenharmony_ci * @atomicservice
303af6ab5fSopenharmony_ci * @since 12
313af6ab5fSopenharmony_ci */
323af6ab5fSopenharmony_cideclare namespace collections {
333af6ab5fSopenharmony_ci  /**
343af6ab5fSopenharmony_ci   * Callback function used in the typed Array's 'from' function.
353af6ab5fSopenharmony_ci   * 
363af6ab5fSopenharmony_ci   * @typedef { function } TypedArrayFromMapFn
373af6ab5fSopenharmony_ci   * @param { FromElementType } value - The value in the original array.
383af6ab5fSopenharmony_ci   * @param { number } index - The index in the original array.
393af6ab5fSopenharmony_ci   * @returns { ToElementType } The transformed value.
403af6ab5fSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
413af6ab5fSopenharmony_ci   * @crossplatform
423af6ab5fSopenharmony_ci   * @atomicservice
433af6ab5fSopenharmony_ci   * @since 12
443af6ab5fSopenharmony_ci   */
453af6ab5fSopenharmony_ci  type TypedArrayFromMapFn<FromElementType, ToElementType> = (value: FromElementType, index: number) => ToElementType;
463af6ab5fSopenharmony_ci  /**
473af6ab5fSopenharmony_ci   * Callback function used in typed Array functions which needs to determine
483af6ab5fSopenharmony_ci   * whether some element satisfies the specified predicate test
493af6ab5fSopenharmony_ci   * 
503af6ab5fSopenharmony_ci   * @typedef { function } TypedArrayPredicateFn
513af6ab5fSopenharmony_ci   * @param { ElementType } value - The value of the element.
523af6ab5fSopenharmony_ci   * @param { number } index - The index of the element.
533af6ab5fSopenharmony_ci   * @param { ArrayType } array - The array that the element belongs to.
543af6ab5fSopenharmony_ci   * @returns { boolean } True if the value meets the predicate, otherwise false.
553af6ab5fSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
563af6ab5fSopenharmony_ci   * @crossplatform
573af6ab5fSopenharmony_ci   * @atomicservice
583af6ab5fSopenharmony_ci   * @since 12
593af6ab5fSopenharmony_ci   */
603af6ab5fSopenharmony_ci  type TypedArrayPredicateFn<ElementType, ArrayType> =
613af6ab5fSopenharmony_ci    (value: ElementType, index: number, array: ArrayType) => boolean;
623af6ab5fSopenharmony_ci  /**
633af6ab5fSopenharmony_ci   * Callback function used in typed Array functions that perform specific action for each element.
643af6ab5fSopenharmony_ci   * 
653af6ab5fSopenharmony_ci   * @typedef { function } TypedArrayForEachCallback
663af6ab5fSopenharmony_ci   * @param { ElementType } value - The value of the element.
673af6ab5fSopenharmony_ci   * @param { number } index - The index of the element.
683af6ab5fSopenharmony_ci   * @param { ArrayType } array - The array that the element belongs to.
693af6ab5fSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
703af6ab5fSopenharmony_ci   * @crossplatform
713af6ab5fSopenharmony_ci   * @atomicservice
723af6ab5fSopenharmony_ci   * @since 12
733af6ab5fSopenharmony_ci   */
743af6ab5fSopenharmony_ci  type TypedArrayForEachCallback<ElementType, ArrayType> =
753af6ab5fSopenharmony_ci    (value: ElementType, index: number, array: ArrayType) => void;
763af6ab5fSopenharmony_ci  /**
773af6ab5fSopenharmony_ci   * Callback function used in typed Array functions that perform specific action for each element and
783af6ab5fSopenharmony_ci   *    produce corresponding new element.
793af6ab5fSopenharmony_ci   * 
803af6ab5fSopenharmony_ci   * @typedef { function } TypedArrayMapCallback
813af6ab5fSopenharmony_ci   * @param { ElementType } value - The value of the element.
823af6ab5fSopenharmony_ci   * @param { number } index - The index of the element.
833af6ab5fSopenharmony_ci   * @param { ArrayType } array - The array that the element belongs to.
843af6ab5fSopenharmony_ci   * @returns { ElementType } The result of the mapping.
853af6ab5fSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
863af6ab5fSopenharmony_ci   * @since 12
873af6ab5fSopenharmony_ci   */
883af6ab5fSopenharmony_ci  type TypedArrayMapCallback<ElementType, ArrayType> =
893af6ab5fSopenharmony_ci    (value: ElementType, index: number, array: ArrayType) => ElementType;
903af6ab5fSopenharmony_ci  /**
913af6ab5fSopenharmony_ci   * Callback function used in typed Array functions that require a reduction.
923af6ab5fSopenharmony_ci   * 
933af6ab5fSopenharmony_ci   * @typedef { function } TypedArrayReduceCallback
943af6ab5fSopenharmony_ci   * @param { AccType } previousValue - The accumulator value.
953af6ab5fSopenharmony_ci   * @param { ElementType } currentValue - The current element being processed in the array.
963af6ab5fSopenharmony_ci   * @param { number } currentIndex - The index of the current element being processed in the array.
973af6ab5fSopenharmony_ci   * @param { ArrayType } array - The array that the element belongs to.
983af6ab5fSopenharmony_ci   * @returns { AccType } The result of the reduction.
993af6ab5fSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
1003af6ab5fSopenharmony_ci   * @crossplatform
1013af6ab5fSopenharmony_ci   * @atomicservice
1023af6ab5fSopenharmony_ci   * @since 12
1033af6ab5fSopenharmony_ci   */
1043af6ab5fSopenharmony_ci  type TypedArrayReduceCallback<AccType, ElementType, ArrayType> =
1053af6ab5fSopenharmony_ci    (previousValue: AccType, currentValue: ElementType, currentIndex: number, array: ArrayType) => AccType;
1063af6ab5fSopenharmony_ci  /**
1073af6ab5fSopenharmony_ci   * Callback function used in the typed Array's 'sort' function.
1083af6ab5fSopenharmony_ci   * 
1093af6ab5fSopenharmony_ci   * @typedef { function } TypedArrayCompareFn
1103af6ab5fSopenharmony_ci   * @param { ElementType } first - The first element of the comparison.
1113af6ab5fSopenharmony_ci   * @param { ElementType } second - The second element of the comparison.
1123af6ab5fSopenharmony_ci   * @returns { number } The result of the comparison.
1133af6ab5fSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
1143af6ab5fSopenharmony_ci   * @crossplatform
1153af6ab5fSopenharmony_ci   * @atomicservice
1163af6ab5fSopenharmony_ci   * @since 12
1173af6ab5fSopenharmony_ci   */
1183af6ab5fSopenharmony_ci  type TypedArrayCompareFn<ElementType> = (first: ElementType, second: ElementType) => number;
1193af6ab5fSopenharmony_ci  /**
1203af6ab5fSopenharmony_ci   * Redefines ISendable for convenience.
1213af6ab5fSopenharmony_ci   *
1223af6ab5fSopenharmony_ci   * @typedef { lang.ISendable } ISendable
1233af6ab5fSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
1243af6ab5fSopenharmony_ci   * @crossplatform
1253af6ab5fSopenharmony_ci   * @atomicservice
1263af6ab5fSopenharmony_ci   * @since 12
1273af6ab5fSopenharmony_ci   */
1283af6ab5fSopenharmony_ci  type ISendable = lang.ISendable;
1293af6ab5fSopenharmony_ci  /**
1303af6ab5fSopenharmony_ci   * Represents an array-like object that can be concatenated.
1313af6ab5fSopenharmony_ci   * 
1323af6ab5fSopenharmony_ci   * @interface ConcatArray
1333af6ab5fSopenharmony_ci   * @extends ISendable
1343af6ab5fSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
1353af6ab5fSopenharmony_ci   * @since 12
1363af6ab5fSopenharmony_ci   */
1373af6ab5fSopenharmony_ci  interface ConcatArray<T> extends ISendable {
1383af6ab5fSopenharmony_ci    /**
1393af6ab5fSopenharmony_ci     * Gets the length of the ArkTS ConcatArray. This is a number one higher than the highest index in the array.
1403af6ab5fSopenharmony_ci     * 
1413af6ab5fSopenharmony_ci     * @type { number }
1423af6ab5fSopenharmony_ci     * @readonly
1433af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
1443af6ab5fSopenharmony_ci     * @since 12
1453af6ab5fSopenharmony_ci     */
1463af6ab5fSopenharmony_ci    public readonly length: number;
1473af6ab5fSopenharmony_ci    /**
1483af6ab5fSopenharmony_ci     * Adds all the elements of an ArkTS ConcatArray into a string, separated by the specified separator string.
1493af6ab5fSopenharmony_ci     * 
1503af6ab5fSopenharmony_ci     * @param { string } [separator] - A string used to separate one element of the array from
1513af6ab5fSopenharmony_ci     *     the next in the resulting string. If omitted, the array elements are separated with a comma.
1523af6ab5fSopenharmony_ci     * @returns { string } A string with all array elements joined.
1533af6ab5fSopenharmony_ci     *     If ConcatArray.length is 0, the empty string is returned.
1543af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Invalid separator.
1553af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
1563af6ab5fSopenharmony_ci     * @since 12
1573af6ab5fSopenharmony_ci     */
1583af6ab5fSopenharmony_ci    join(separator?: string): string;
1593af6ab5fSopenharmony_ci    /**
1603af6ab5fSopenharmony_ci     * Returns a copy of a section of an ArkTS ConcatArray.
1613af6ab5fSopenharmony_ci     *
1623af6ab5fSopenharmony_ci     * @param { number } [start] - The beginning index of the specified portion of the array.
1633af6ab5fSopenharmony_ci     *     If start is undefined, then the slice begins at index 0.
1643af6ab5fSopenharmony_ci     * @param { number } [end] - The end index of the specified portion of the array.
1653af6ab5fSopenharmony_ci     *     This is exclusive of the element at the index 'end'.
1663af6ab5fSopenharmony_ci     *     If end is undefined, then the slice extends to the end of the array.
1673af6ab5fSopenharmony_ci     * @returns { ConcatArray<T> } A new ConcatArray containing the extracted elements.
1683af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Invalid `start` or `end` parameters.
1693af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
1703af6ab5fSopenharmony_ci     * @since 12
1713af6ab5fSopenharmony_ci     */
1723af6ab5fSopenharmony_ci    slice(start?: number, end?: number): ConcatArray<T>;
1733af6ab5fSopenharmony_ci  }
1743af6ab5fSopenharmony_ci  /**
1753af6ab5fSopenharmony_ci   * Array is a data structure that stores a collection of elements. 
1763af6ab5fSopenharmony_ci   * If multiple threads access a Array instance concurrently, 
1773af6ab5fSopenharmony_ci   * and at least one of the threads modifies the array structurally,
1783af6ab5fSopenharmony_ci   * it must be synchronized externally.
1793af6ab5fSopenharmony_ci   * 
1803af6ab5fSopenharmony_ci   * @implements ConcatArray<T>
1813af6ab5fSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
1823af6ab5fSopenharmony_ci   * @crossplatform
1833af6ab5fSopenharmony_ci   * @atomicservice
1843af6ab5fSopenharmony_ci   * @since 12
1853af6ab5fSopenharmony_ci   */
1863af6ab5fSopenharmony_ci  @Sendable
1873af6ab5fSopenharmony_ci  class Array<T> implements ConcatArray<T> {
1883af6ab5fSopenharmony_ci    /**
1893af6ab5fSopenharmony_ci     * Gets the length of the ArkTS array. This is a number one higher than the highest index in the ArkTS array.
1903af6ab5fSopenharmony_ci     * 
1913af6ab5fSopenharmony_ci     * @type { number }
1923af6ab5fSopenharmony_ci     * @readonly
1933af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
1943af6ab5fSopenharmony_ci     * @crossplatform
1953af6ab5fSopenharmony_ci     * @atomicservice
1963af6ab5fSopenharmony_ci     * @since 12
1973af6ab5fSopenharmony_ci     */
1983af6ab5fSopenharmony_ci    public readonly length: number;
1993af6ab5fSopenharmony_ci    /**
2003af6ab5fSopenharmony_ci     * Creates an ArkTS Array with arrayLength elements initialized to initialValue.
2013af6ab5fSopenharmony_ci     *
2023af6ab5fSopenharmony_ci     * @param { number } arrayLength - The length of the array.
2033af6ab5fSopenharmony_ci     * @param { T } initialValue - Element initial value that will be filled into the Array.
2043af6ab5fSopenharmony_ci     * @returns { Array<T> } A new Array instance
2053af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
2063af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The create method cannot be bound.
2073af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
2083af6ab5fSopenharmony_ci     * @crossplatform
2093af6ab5fSopenharmony_ci     * @atomicservice
2103af6ab5fSopenharmony_ci     * @since 12
2113af6ab5fSopenharmony_ci     */
2123af6ab5fSopenharmony_ci    static create<T>(arrayLength: number, initialValue: T): Array<T>;
2133af6ab5fSopenharmony_ci    /**
2143af6ab5fSopenharmony_ci     * Creates an ArkTS Array from an array-like object.
2153af6ab5fSopenharmony_ci     * 
2163af6ab5fSopenharmony_ci     * @param { ArrayLike<T> } arrayLike - An array-like object to convert to an ArkTS Array.
2173af6ab5fSopenharmony_ci     * @returns { Array<T> } A new Array instance
2183af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
2193af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The from method cannot be bound.
2203af6ab5fSopenharmony_ci     * @static
2213af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
2223af6ab5fSopenharmony_ci     * @crossplatform
2233af6ab5fSopenharmony_ci     * @atomicservice
2243af6ab5fSopenharmony_ci     * @since 12
2253af6ab5fSopenharmony_ci     */
2263af6ab5fSopenharmony_ci    static from<T>(arrayLike: ArrayLike<T>): Array<T>;
2273af6ab5fSopenharmony_ci    /**
2283af6ab5fSopenharmony_ci     * A constructor used to create an ArkTS Array.
2293af6ab5fSopenharmony_ci     *
2303af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Array's constructor cannot be directly invoked.
2313af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
2323af6ab5fSopenharmony_ci     * @crossplatform
2333af6ab5fSopenharmony_ci     * @atomicservice
2343af6ab5fSopenharmony_ci     * @since 12
2353af6ab5fSopenharmony_ci     */
2363af6ab5fSopenharmony_ci    constructor();
2373af6ab5fSopenharmony_ci    /**
2383af6ab5fSopenharmony_ci     * A constructor used to create an ArkTS Array.
2393af6ab5fSopenharmony_ci     *
2403af6ab5fSopenharmony_ci     * @param { T } first - First element when initializing an ArkTS Array.
2413af6ab5fSopenharmony_ci     * @param { T[] } left - Left elements when initializing an ArkTS Array.
2423af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
2433af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Array's constructor cannot be directly invoked.
2443af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
2453af6ab5fSopenharmony_ci     * @crossplatform
2463af6ab5fSopenharmony_ci     * @atomicservice
2473af6ab5fSopenharmony_ci     * @since 12
2483af6ab5fSopenharmony_ci     */
2493af6ab5fSopenharmony_ci    constructor(first: T, ...left: T[]);
2503af6ab5fSopenharmony_ci    /**
2513af6ab5fSopenharmony_ci     * Removes the last element from an ArkTS array and returns it.
2523af6ab5fSopenharmony_ci     * If the array is empty, undefined is returned and the array is not modified.
2533af6ab5fSopenharmony_ci     * 
2543af6ab5fSopenharmony_ci     * @returns { T | undefined } - The removed element from the array; undefined if the array is empty.
2553af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The pop method cannot be bound.
2563af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
2573af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
2583af6ab5fSopenharmony_ci     * @crossplatform
2593af6ab5fSopenharmony_ci     * @atomicservice
2603af6ab5fSopenharmony_ci     * @since 12
2613af6ab5fSopenharmony_ci     */
2623af6ab5fSopenharmony_ci    pop(): T | undefined;
2633af6ab5fSopenharmony_ci    /**
2643af6ab5fSopenharmony_ci     * Appends new elements to the end of an ArkTS Array, and returns the new length of the array.
2653af6ab5fSopenharmony_ci     * 
2663af6ab5fSopenharmony_ci     * @param { T[] } items - New elements to add to the ArkTS array.
2673af6ab5fSopenharmony_ci     * @returns { number } - The new length property of the object upon which the method was called.
2683af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
2693af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The push method cannot be bound.
2703af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
2713af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
2723af6ab5fSopenharmony_ci     * @crossplatform
2733af6ab5fSopenharmony_ci     * @atomicservice
2743af6ab5fSopenharmony_ci     * @since 12
2753af6ab5fSopenharmony_ci     */
2763af6ab5fSopenharmony_ci    push(...items: T[]): number;
2773af6ab5fSopenharmony_ci    /**
2783af6ab5fSopenharmony_ci     * Adds all the elements of an ArkTS Array into a string, separated by the specified separator string.
2793af6ab5fSopenharmony_ci     * 
2803af6ab5fSopenharmony_ci     * @param { string } [separator] - A string used to separate one element of the array from
2813af6ab5fSopenharmony_ci     *     the next in the resulting string. If omitted, the array elements are separated with a comma.
2823af6ab5fSopenharmony_ci     * @returns { string } A string with all array elements joined. If Array.length is 0, the empty string is returned.
2833af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
2843af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The join method cannot be bound.
2853af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
2863af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
2873af6ab5fSopenharmony_ci     * @crossplatform
2883af6ab5fSopenharmony_ci     * @atomicservice
2893af6ab5fSopenharmony_ci     * @since 12
2903af6ab5fSopenharmony_ci     */
2913af6ab5fSopenharmony_ci    join(separator?: string): string;
2923af6ab5fSopenharmony_ci    /**
2933af6ab5fSopenharmony_ci     * Removes the first element from an ArkTS Array and returns it.
2943af6ab5fSopenharmony_ci     * If the array is empty, undefined is returned and the array is not modified.
2953af6ab5fSopenharmony_ci     * 
2963af6ab5fSopenharmony_ci     * @returns { T | undefined } The removed element from the array; undefined if the array is empty
2973af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The shift method cannot be bound.
2983af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
2993af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
3003af6ab5fSopenharmony_ci     * @crossplatform
3013af6ab5fSopenharmony_ci     * @atomicservice
3023af6ab5fSopenharmony_ci     * @since 12
3033af6ab5fSopenharmony_ci     */
3043af6ab5fSopenharmony_ci    shift(): T | undefined;
3053af6ab5fSopenharmony_ci    /**
3063af6ab5fSopenharmony_ci     * Inserts new elements at the start of an array, and returns the new length of the array.
3073af6ab5fSopenharmony_ci     *
3083af6ab5fSopenharmony_ci     * @param { T[] } items - Elements to insert at the start of the array.
3093af6ab5fSopenharmony_ci     * @returns { number } The new length property of the object upon which the method was called.
3103af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
3113af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The unshift method cannot be bound.
3123af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
3133af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
3143af6ab5fSopenharmony_ci     * @crossplatform
3153af6ab5fSopenharmony_ci     * @atomicservice
3163af6ab5fSopenharmony_ci     * @since 12
3173af6ab5fSopenharmony_ci     */
3183af6ab5fSopenharmony_ci    unshift(...items: T[]): number;
3193af6ab5fSopenharmony_ci    /**
3203af6ab5fSopenharmony_ci     * Returns a copy of a section of an ArkTS Array.
3213af6ab5fSopenharmony_ci     * For both start and end, a negative index can be used to indicate an offset from the end of the array.
3223af6ab5fSopenharmony_ci     * For example, -2 refers to the second to last element of the array.
3233af6ab5fSopenharmony_ci     *
3243af6ab5fSopenharmony_ci     * @param { number } [start] - The beginning index of the specified portion of the array.
3253af6ab5fSopenharmony_ci     *     If start is undefined, then the slice begins at index 0.
3263af6ab5fSopenharmony_ci     * @param { number } [end] - The end index of the specified portion of the array.
3273af6ab5fSopenharmony_ci     *     This is exclusive of the element at the index 'end'.
3283af6ab5fSopenharmony_ci     *     If end is undefined, then the slice extends to the end of the array.
3293af6ab5fSopenharmony_ci     * @returns { Array<T> } A new array containing the extracted elements.
3303af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
3313af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The slice method cannot be bound.
3323af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
3333af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
3343af6ab5fSopenharmony_ci     * @crossplatform
3353af6ab5fSopenharmony_ci     * @atomicservice
3363af6ab5fSopenharmony_ci     * @since 12
3373af6ab5fSopenharmony_ci     */
3383af6ab5fSopenharmony_ci    slice(start?: number, end?: number): Array<T>;
3393af6ab5fSopenharmony_ci    /**
3403af6ab5fSopenharmony_ci     * Sorts an array in place. This method mutates the array and returns a reference to the same array.
3413af6ab5fSopenharmony_ci     *
3423af6ab5fSopenharmony_ci     * @param { function } [compareFn] - Function used to determine the order of the elements. It is expected to return
3433af6ab5fSopenharmony_ci     *     a negative value if the first argument is less than the second argument, zero if they're equal,
3443af6ab5fSopenharmony_ci     *     and a positive value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
3453af6ab5fSopenharmony_ci     * @returns { Array<T> } The reference to the original array, now sorted.
3463af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
3473af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The sort method cannot be bound.
3483af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
3493af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
3503af6ab5fSopenharmony_ci     * @crossplatform
3513af6ab5fSopenharmony_ci     * @atomicservice
3523af6ab5fSopenharmony_ci     * @since 12
3533af6ab5fSopenharmony_ci     */
3543af6ab5fSopenharmony_ci    sort(compareFn?: (a: T, b: T) => number): Array<T>;
3553af6ab5fSopenharmony_ci    /**
3563af6ab5fSopenharmony_ci     * Returns the index of the first occurrence of a value in an ArkTS Array, or -1 if it is not present.
3573af6ab5fSopenharmony_ci     * 
3583af6ab5fSopenharmony_ci     * @param { T } searchElement - The value to locate in the array.
3593af6ab5fSopenharmony_ci     * @param { number } [fromIndex] - The array index at which to begin the search.
3603af6ab5fSopenharmony_ci     *     If fromIndex is omitted, the search starts at index 0.
3613af6ab5fSopenharmony_ci     * @returns { number } The first index of searchElement in the array; -1 if not found.
3623af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
3633af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The indexOf method cannot be bound.
3643af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
3653af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
3663af6ab5fSopenharmony_ci     * @crossplatform
3673af6ab5fSopenharmony_ci     * @atomicservice
3683af6ab5fSopenharmony_ci     * @since 12
3693af6ab5fSopenharmony_ci     */
3703af6ab5fSopenharmony_ci    indexOf(searchElement: T, fromIndex?: number): number;
3713af6ab5fSopenharmony_ci    /**
3723af6ab5fSopenharmony_ci     * Executes a provided function once for each value in the Array object.
3733af6ab5fSopenharmony_ci     *
3743af6ab5fSopenharmony_ci     * @param { function } callbackFn - A function that accepts up to three arguments.
3753af6ab5fSopenharmony_ci     *     The function to be called for each element.
3763af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
3773af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The forEach method cannot be bound.
3783af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
3793af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
3803af6ab5fSopenharmony_ci     * @crossplatform
3813af6ab5fSopenharmony_ci     * @atomicservice
3823af6ab5fSopenharmony_ci     * @since 12
3833af6ab5fSopenharmony_ci     */
3843af6ab5fSopenharmony_ci    forEach(callbackFn: (value: T, index: number, array: Array<T>) => void): void;
3853af6ab5fSopenharmony_ci    /**
3863af6ab5fSopenharmony_ci     * Calls a defined callback function on each element of an ArkTS Array,
3873af6ab5fSopenharmony_ci     * and returns an array that contains the results.
3883af6ab5fSopenharmony_ci     * 
3893af6ab5fSopenharmony_ci     * @param { function } callbackFn - A function that accepts up to three arguments.
3903af6ab5fSopenharmony_ci     *     The map method calls the callbackFn function one time for each element in the array.
3913af6ab5fSopenharmony_ci     * @returns { Array<U> } A new array with each element being the result of the callback function.
3923af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
3933af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The map method cannot be bound.
3943af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
3953af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
3963af6ab5fSopenharmony_ci     * @crossplatform
3973af6ab5fSopenharmony_ci     * @atomicservice
3983af6ab5fSopenharmony_ci     * @since 12
3993af6ab5fSopenharmony_ci     */
4003af6ab5fSopenharmony_ci    map<U>(callbackFn: (value: T, index: number, array: Array<T>) => U): Array<U>;
4013af6ab5fSopenharmony_ci    /**
4023af6ab5fSopenharmony_ci     * Returns the elements of an ArkTS Array that meet the condition specified in a callback function.
4033af6ab5fSopenharmony_ci     * 
4043af6ab5fSopenharmony_ci     * @param { function } predicate - A function that accepts up to three arguments.
4053af6ab5fSopenharmony_ci     *     The filter method calls the predicate function one time for each element in the array.
4063af6ab5fSopenharmony_ci     * @returns { Array<T> } A shallow copy of the given containing just the elements that pass the test.
4073af6ab5fSopenharmony_ci     *     If no elements pass the test, an empty array is returned.
4083af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
4093af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The filter method cannot be bound.
4103af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
4113af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
4123af6ab5fSopenharmony_ci     * @crossplatform
4133af6ab5fSopenharmony_ci     * @atomicservice
4143af6ab5fSopenharmony_ci     * @since 12
4153af6ab5fSopenharmony_ci     */
4163af6ab5fSopenharmony_ci    filter(predicate: (value: T, index: number, array: Array<T>) => boolean): Array<T>;
4173af6ab5fSopenharmony_ci    /**
4183af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an ArkTS Array.
4193af6ab5fSopenharmony_ci     * The return value of the callback function is the accumulated result,
4203af6ab5fSopenharmony_ci     * and is provided as an argument in the next call to the callback function.
4213af6ab5fSopenharmony_ci     * 
4223af6ab5fSopenharmony_ci     * @param { function } callbackFn - A function that accepts up to four arguments.
4233af6ab5fSopenharmony_ci     *     The reduce method calls the callbackFn function one time for each element in the array.
4243af6ab5fSopenharmony_ci     * @returns { T } The value that results from running the "reducer" callback function to
4253af6ab5fSopenharmony_ci     *     completion over the entire array.
4263af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
4273af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
4283af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
4293af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
4303af6ab5fSopenharmony_ci     * @crossplatform
4313af6ab5fSopenharmony_ci     * @atomicservice
4323af6ab5fSopenharmony_ci     * @since 12
4333af6ab5fSopenharmony_ci     */
4343af6ab5fSopenharmony_ci    reduce(callbackFn: (previousValue: T, currentValue: T, currentIndex: number, array: Array<T>) => T): T;
4353af6ab5fSopenharmony_ci    /**
4363af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array.
4373af6ab5fSopenharmony_ci     * The return value of the callback function is the accumulated result,
4383af6ab5fSopenharmony_ci     * and is provided as an argument in the next call to the callback function.
4393af6ab5fSopenharmony_ci     * 
4403af6ab5fSopenharmony_ci     * @param { function } callbackFn - A function that accepts up to four arguments.
4413af6ab5fSopenharmony_ci     *     The reduce method calls the callbackFn function one time for each element in the array.
4423af6ab5fSopenharmony_ci     * @param { U } initialValue - If initialValue is specified,
4433af6ab5fSopenharmony_ci     *     it is used as the initial value to start the accumulation.
4443af6ab5fSopenharmony_ci     *     The first call to the callbackFn function provides this value as an argument instead of an array value.
4453af6ab5fSopenharmony_ci     * @returns { U } The value that results from running the "reducer" callback function to
4463af6ab5fSopenharmony_ci     *     completion over the entire array.
4473af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
4483af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
4493af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
4503af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
4513af6ab5fSopenharmony_ci     * @crossplatform
4523af6ab5fSopenharmony_ci     * @atomicservice
4533af6ab5fSopenharmony_ci     * @since 12
4543af6ab5fSopenharmony_ci    */
4553af6ab5fSopenharmony_ci    reduce<U>(
4563af6ab5fSopenharmony_ci      callbackFn: (previousValue: U, currentValue: T, currentIndex: number, array: Array<T>) => U,
4573af6ab5fSopenharmony_ci      initialValue: U
4583af6ab5fSopenharmony_ci    ): U;
4593af6ab5fSopenharmony_ci    /**
4603af6ab5fSopenharmony_ci     * Returns the item located at the specified index.
4613af6ab5fSopenharmony_ci     *
4623af6ab5fSopenharmony_ci     * @param { number } index - The zero-based index of the desired code unit.
4633af6ab5fSopenharmony_ci     *     A negative index will count back from the last item.
4643af6ab5fSopenharmony_ci     * @returns { T | undefined } The element in the array matching the given index.
4653af6ab5fSopenharmony_ci     *     Always returns undefined if index < -array.length or index >= array.length without
4663af6ab5fSopenharmony_ci     *     attempting to access the corresponding property.
4673af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
4683af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The at method cannot be bound.
4693af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
4703af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
4713af6ab5fSopenharmony_ci     * @crossplatform
4723af6ab5fSopenharmony_ci     * @atomicservice
4733af6ab5fSopenharmony_ci     * @since 12
4743af6ab5fSopenharmony_ci     */
4753af6ab5fSopenharmony_ci    at(index: number): T | undefined;
4763af6ab5fSopenharmony_ci    [Symbol.iterator](): IterableIterator<T>;
4773af6ab5fSopenharmony_ci    /**
4783af6ab5fSopenharmony_ci     * Returns an iterable of key, value pairs for every entry in the array
4793af6ab5fSopenharmony_ci     * 
4803af6ab5fSopenharmony_ci     * @returns { IterableIterator<[number, T]> } A new iterable iterator object.
4813af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The entries method cannot be bound.
4823af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
4833af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
4843af6ab5fSopenharmony_ci     * @crossplatform
4853af6ab5fSopenharmony_ci     * @atomicservice
4863af6ab5fSopenharmony_ci     * @since 12
4873af6ab5fSopenharmony_ci     */
4883af6ab5fSopenharmony_ci    entries(): IterableIterator<[number, T]>;
4893af6ab5fSopenharmony_ci    /**
4903af6ab5fSopenharmony_ci     * Returns an iterable of keys in the array
4913af6ab5fSopenharmony_ci     * 
4923af6ab5fSopenharmony_ci     * @returns { IterableIterator<number> } A new iterable iterator object.
4933af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The keys method cannot be bound.
4943af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
4953af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
4963af6ab5fSopenharmony_ci     * @crossplatform
4973af6ab5fSopenharmony_ci     * @atomicservice
4983af6ab5fSopenharmony_ci     * @since 12
4993af6ab5fSopenharmony_ci     */
5003af6ab5fSopenharmony_ci    keys(): IterableIterator<number>;
5013af6ab5fSopenharmony_ci    /**
5023af6ab5fSopenharmony_ci     * Returns an iterable of values in the array
5033af6ab5fSopenharmony_ci     * 
5043af6ab5fSopenharmony_ci     * @returns { IterableIterator<T> } A new iterable iterator object.
5053af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The values method cannot be bound.
5063af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
5073af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
5083af6ab5fSopenharmony_ci     * @crossplatform
5093af6ab5fSopenharmony_ci     * @atomicservice
5103af6ab5fSopenharmony_ci     * @since 12
5113af6ab5fSopenharmony_ci     */
5123af6ab5fSopenharmony_ci    values(): IterableIterator<T>;
5133af6ab5fSopenharmony_ci    /**
5143af6ab5fSopenharmony_ci     * Returns the value of the first element in the array where predicate is true, and undefined
5153af6ab5fSopenharmony_ci     * otherwise.
5163af6ab5fSopenharmony_ci     * 
5173af6ab5fSopenharmony_ci     * @param { function } predicate - Find calls predicate once for each element of the array, in ascending
5183af6ab5fSopenharmony_ci     *     order, until it finds one where predicate returns true.
5193af6ab5fSopenharmony_ci     *     If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.
5203af6ab5fSopenharmony_ci     * @returns { T | undefined } The first element in the array that satisfies the provided testing function.
5213af6ab5fSopenharmony_ci     *     Otherwise, undefined is returned.
5223af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
5233af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The find method cannot be bound.
5243af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
5253af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
5263af6ab5fSopenharmony_ci     * @crossplatform
5273af6ab5fSopenharmony_ci     * @atomicservice
5283af6ab5fSopenharmony_ci     * @since 12
5293af6ab5fSopenharmony_ci     */
5303af6ab5fSopenharmony_ci    find(predicate: (value: T, index: number, obj: Array<T>) => boolean): T | undefined;
5313af6ab5fSopenharmony_ci    /**
5323af6ab5fSopenharmony_ci     * Determines whether an array includes a certain element, returning true or false as appropriate.
5333af6ab5fSopenharmony_ci     *
5343af6ab5fSopenharmony_ci     * @param { T } searchElement - The element to search for.
5353af6ab5fSopenharmony_ci     * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement.
5363af6ab5fSopenharmony_ci     * @returns { boolean } A boolean value which is true if the value searchElement is found within
5373af6ab5fSopenharmony_ci     *     the array (or the part of the array indicated by the index fromIndex, if specified).
5383af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
5393af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The includes method cannot be bound.
5403af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
5413af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
5423af6ab5fSopenharmony_ci     * @crossplatform
5433af6ab5fSopenharmony_ci     * @atomicservice
5443af6ab5fSopenharmony_ci     * @since 12
5453af6ab5fSopenharmony_ci     */
5463af6ab5fSopenharmony_ci    includes(searchElement: T, fromIndex?: number): boolean;
5473af6ab5fSopenharmony_ci    /**
5483af6ab5fSopenharmony_ci     * Returns the index of the first element in the array where predicate is true, and -1
5493af6ab5fSopenharmony_ci     * otherwise.
5503af6ab5fSopenharmony_ci     *
5513af6ab5fSopenharmony_ci     * @param { function } predicate - Find calls predicate once for each element of the array, in ascending
5523af6ab5fSopenharmony_ci     *     order, until it finds one where predicate returns true. If such an element is found,
5533af6ab5fSopenharmony_ci     *     findIndex immediately returns that element index. Otherwise, findIndex returns -1.
5543af6ab5fSopenharmony_ci     * @returns { number } The index of the first element in the array that passes the test. Otherwise, -1;
5553af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
5563af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The findIndex method cannot be bound.
5573af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
5583af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
5593af6ab5fSopenharmony_ci     * @crossplatform
5603af6ab5fSopenharmony_ci     * @atomicservice
5613af6ab5fSopenharmony_ci     * @since 12
5623af6ab5fSopenharmony_ci     */
5633af6ab5fSopenharmony_ci    findIndex(predicate: (value: T, index: number, obj: Array<T>) => boolean): number;
5643af6ab5fSopenharmony_ci    /**
5653af6ab5fSopenharmony_ci     * Returns the this object after filling the section identified by start and end with value
5663af6ab5fSopenharmony_ci     * 
5673af6ab5fSopenharmony_ci     * @param { T } value - Value to fill array section with
5683af6ab5fSopenharmony_ci     * @param { number } [start] - Index to start filling the array at. If start is negative, it is treated as
5693af6ab5fSopenharmony_ci     *     length+start where length is the length of the array.
5703af6ab5fSopenharmony_ci     * @param { number } [end] - Index to stop filling the array at. If end is negative, it is treated as
5713af6ab5fSopenharmony_ci     *     length+end.
5723af6ab5fSopenharmony_ci     * @returns { Array<T> } The modified array, filled with value.
5733af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
5743af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The fill method cannot be bound.
5753af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
5763af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
5773af6ab5fSopenharmony_ci     * @crossplatform
5783af6ab5fSopenharmony_ci     * @atomicservice
5793af6ab5fSopenharmony_ci     * @since 12
5803af6ab5fSopenharmony_ci     */
5813af6ab5fSopenharmony_ci    fill(value: T, start?: number, end?: number): Array<T>;
5823af6ab5fSopenharmony_ci    /**
5833af6ab5fSopenharmony_ci     * Shrinks the ArkTS array to the given arrayLength.
5843af6ab5fSopenharmony_ci     * 
5853af6ab5fSopenharmony_ci     * @param { number } arrayLength - The new Array length.
5863af6ab5fSopenharmony_ci     *     Throws error when arrayLength < 0 or arrayLength > 2^32.
5873af6ab5fSopenharmony_ci     *     If arrayLength > array.length, array remains unchanged.
5883af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
5893af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The shrinkTo method cannot be bound.
5903af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
5913af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
5923af6ab5fSopenharmony_ci     * @crossplatform
5933af6ab5fSopenharmony_ci     * @atomicservice
5943af6ab5fSopenharmony_ci     * @since 12
5953af6ab5fSopenharmony_ci     */
5963af6ab5fSopenharmony_ci    shrinkTo(arrayLength: number): void;
5973af6ab5fSopenharmony_ci    /**
5983af6ab5fSopenharmony_ci     * Extends the ArkTS array to the given arrayLength,
5993af6ab5fSopenharmony_ci     * and appends new elements with given initialValue up to the arrayLength.
6003af6ab5fSopenharmony_ci     * 
6013af6ab5fSopenharmony_ci     * @param { number } arrayLength - The new Array length.
6023af6ab5fSopenharmony_ci     *     Throws error when arrayLength < 0 or arrayLength > 2^32.
6033af6ab5fSopenharmony_ci     *     If arrayLength < array.length, array remains unchanged.
6043af6ab5fSopenharmony_ci     * @param { T } initialValue - Element initial value that will be appended to the array.
6053af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
6063af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The extendTo method cannot be bound.
6073af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
6083af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
6093af6ab5fSopenharmony_ci     * @crossplatform
6103af6ab5fSopenharmony_ci     * @atomicservice
6113af6ab5fSopenharmony_ci     * @since 12
6123af6ab5fSopenharmony_ci     */
6133af6ab5fSopenharmony_ci    extendTo(arrayLength: number, initialValue: T): void;
6143af6ab5fSopenharmony_ci    /**
6153af6ab5fSopenharmony_ci     * Returns the item at that index.
6163af6ab5fSopenharmony_ci     * 
6173af6ab5fSopenharmony_ci     * @param { number } index - The zero-based index of the desired code unit.
6183af6ab5fSopenharmony_ci     *     Throws error if index < 0 or index >= array.length.
6193af6ab5fSopenharmony_ci     * @returns { T } The element in the array matching the given index. 
6203af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
6213af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of index is out of range.
6223af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
6233af6ab5fSopenharmony_ci     * @crossplatform
6243af6ab5fSopenharmony_ci     * @atomicservice
6253af6ab5fSopenharmony_ci     * @since 12
6263af6ab5fSopenharmony_ci     */
6273af6ab5fSopenharmony_ci    [index: number]: T;
6283af6ab5fSopenharmony_ci    /**
6293af6ab5fSopenharmony_ci     * Concatenates two or more arrays.
6303af6ab5fSopenharmony_ci     *
6313af6ab5fSopenharmony_ci     * @param { ConcatArray<T>[] } items - The arrays to concatenate.
6323af6ab5fSopenharmony_ci     * @returns { Array<T> } A new array containing the elements of the concatenated arrays.
6333af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Not a valid array.
6343af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The concat method cannot be bound.
6353af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
6363af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
6373af6ab5fSopenharmony_ci     * @since 12
6383af6ab5fSopenharmony_ci     */
6393af6ab5fSopenharmony_ci    concat(...items: ConcatArray<T>[]): Array<T>;
6403af6ab5fSopenharmony_ci  }
6413af6ab5fSopenharmony_ci  
6423af6ab5fSopenharmony_ci  /**
6433af6ab5fSopenharmony_ci   * The Map holds key-value pairs.
6443af6ab5fSopenharmony_ci   * If multiple threads access a Map instance concurrently, 
6453af6ab5fSopenharmony_ci   * and at least one of the threads modifies the map structurally,
6463af6ab5fSopenharmony_ci   * it must be synchronized externally.
6473af6ab5fSopenharmony_ci   * 
6483af6ab5fSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
6493af6ab5fSopenharmony_ci   * @crossplatform
6503af6ab5fSopenharmony_ci   * @atomicservice
6513af6ab5fSopenharmony_ci   * @since 12
6523af6ab5fSopenharmony_ci   */
6533af6ab5fSopenharmony_ci  @Sendable
6543af6ab5fSopenharmony_ci  class Map<K, V> {
6553af6ab5fSopenharmony_ci    /**
6563af6ab5fSopenharmony_ci     * Returns the number of elements in the Map.
6573af6ab5fSopenharmony_ci     *
6583af6ab5fSopenharmony_ci     * @type { number }
6593af6ab5fSopenharmony_ci     * @readonly
6603af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
6613af6ab5fSopenharmony_ci     * @crossplatform
6623af6ab5fSopenharmony_ci     * @atomicservice
6633af6ab5fSopenharmony_ci     * @since 12
6643af6ab5fSopenharmony_ci     */
6653af6ab5fSopenharmony_ci    public readonly size: number;
6663af6ab5fSopenharmony_ci    /**
6673af6ab5fSopenharmony_ci     * A constructor used to create a Map.
6683af6ab5fSopenharmony_ci     *
6693af6ab5fSopenharmony_ci     * @param { readonly (readonly [K, V])[] | null } [entries] - An Array or other iterable object
6703af6ab5fSopenharmony_ci     * whose elements are key-value pairs.
6713af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
6723af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Map's constructor cannot be directly invoked.
6733af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
6743af6ab5fSopenharmony_ci     * @crossplatform
6753af6ab5fSopenharmony_ci     * @atomicservice
6763af6ab5fSopenharmony_ci     * @since 12
6773af6ab5fSopenharmony_ci     */
6783af6ab5fSopenharmony_ci    constructor(entries?: readonly (readonly [K, V])[] | null)
6793af6ab5fSopenharmony_ci    /**
6803af6ab5fSopenharmony_ci     * Returns an iterable of key, value pairs for every entry in the map.
6813af6ab5fSopenharmony_ci     *
6823af6ab5fSopenharmony_ci     * @returns { IterableIterator<[K, V]> } A new iterable iterator object.
6833af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The entries method cannot be bound.
6843af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
6853af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
6863af6ab5fSopenharmony_ci     * @crossplatform
6873af6ab5fSopenharmony_ci     * @atomicservice
6883af6ab5fSopenharmony_ci     * @since 12
6893af6ab5fSopenharmony_ci     */
6903af6ab5fSopenharmony_ci    entries(): IterableIterator<[K, V]>;
6913af6ab5fSopenharmony_ci    /**
6923af6ab5fSopenharmony_ci     * Returns an iterable of keys in the map.
6933af6ab5fSopenharmony_ci     *
6943af6ab5fSopenharmony_ci     * @returns { IterableIterator<K> } A new iterable iterator object.
6953af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The keys method cannot be bound.
6963af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
6973af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
6983af6ab5fSopenharmony_ci     * @crossplatform
6993af6ab5fSopenharmony_ci     * @atomicservice
7003af6ab5fSopenharmony_ci     * @since 12
7013af6ab5fSopenharmony_ci     */
7023af6ab5fSopenharmony_ci    keys(): IterableIterator<K>;
7033af6ab5fSopenharmony_ci    /**
7043af6ab5fSopenharmony_ci     * Returns an iterable of values in the map.
7053af6ab5fSopenharmony_ci     *
7063af6ab5fSopenharmony_ci     * @returns { IterableIterator<V> } A new iterable iterator object.
7073af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The values method cannot be bound.
7083af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
7093af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
7103af6ab5fSopenharmony_ci     * @crossplatform
7113af6ab5fSopenharmony_ci     * @atomicservice
7123af6ab5fSopenharmony_ci     * @since 12
7133af6ab5fSopenharmony_ci     */
7143af6ab5fSopenharmony_ci    values(): IterableIterator<V>;
7153af6ab5fSopenharmony_ci    /**
7163af6ab5fSopenharmony_ci     * Clears the map.
7173af6ab5fSopenharmony_ci     *
7183af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The clear method cannot be bound.
7193af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
7203af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
7213af6ab5fSopenharmony_ci     * @crossplatform
7223af6ab5fSopenharmony_ci     * @atomicservice
7233af6ab5fSopenharmony_ci     * @since 12
7243af6ab5fSopenharmony_ci     */
7253af6ab5fSopenharmony_ci    clear(): void;
7263af6ab5fSopenharmony_ci    /**
7273af6ab5fSopenharmony_ci     * Returns true if an element in the Map existed and has been removed, or false if the element does not exist.
7283af6ab5fSopenharmony_ci     *
7293af6ab5fSopenharmony_ci     * @param { K } key - The key of the element to remove from the Map object.
7303af6ab5fSopenharmony_ci     * @returns { boolean } True if an element in the Map Object existed and has been removed,
7313af6ab5fSopenharmony_ci     *     or false if the element does not exist.
7323af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
7333af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The delete method cannot be bound.
7343af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
7353af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
7363af6ab5fSopenharmony_ci     * @crossplatform
7373af6ab5fSopenharmony_ci     * @atomicservice
7383af6ab5fSopenharmony_ci     * @since 12
7393af6ab5fSopenharmony_ci     */
7403af6ab5fSopenharmony_ci    delete(key: K): boolean;
7413af6ab5fSopenharmony_ci    /**
7423af6ab5fSopenharmony_ci     * Executes the provided callback once for each key of the map which actually exist.
7433af6ab5fSopenharmony_ci     *
7443af6ab5fSopenharmony_ci     * @param { function } callbackFn - A function that accepts up to three arguments.
7453af6ab5fSopenharmony_ci     *     The function to be called for each element.
7463af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
7473af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The forEach method cannot be bound.
7483af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
7493af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
7503af6ab5fSopenharmony_ci     * @crossplatform
7513af6ab5fSopenharmony_ci     * @atomicservice
7523af6ab5fSopenharmony_ci     * @since 12
7533af6ab5fSopenharmony_ci     */
7543af6ab5fSopenharmony_ci    forEach(callbackFn: (value: V, key: K, map: Map<K, V>) => void): void;
7553af6ab5fSopenharmony_ci    /**
7563af6ab5fSopenharmony_ci     * Returns a specified element from the Map object.
7573af6ab5fSopenharmony_ci     * If the value that is associated to the provided key is an object,
7583af6ab5fSopenharmony_ci     * then you will get a reference to that object and any change made to that object
7593af6ab5fSopenharmony_ci     * will effectively modify it inside the Map.
7603af6ab5fSopenharmony_ci     *
7613af6ab5fSopenharmony_ci     * @param { K } key - The key of the element to return from the Map object
7623af6ab5fSopenharmony_ci     * @returns { V | undefined } The element associated with the specified key,
7633af6ab5fSopenharmony_ci     *     or undefined if the key can''t be found in the Map object.
7643af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
7653af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The get method cannot be bound.
7663af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
7673af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
7683af6ab5fSopenharmony_ci     * @crossplatform
7693af6ab5fSopenharmony_ci     * @atomicservice
7703af6ab5fSopenharmony_ci     * @since 12
7713af6ab5fSopenharmony_ci     */
7723af6ab5fSopenharmony_ci    get(key: K): V | undefined;
7733af6ab5fSopenharmony_ci    /**
7743af6ab5fSopenharmony_ci     * Returns boolean indicating whether an element with the specified key exists or not.
7753af6ab5fSopenharmony_ci     *
7763af6ab5fSopenharmony_ci     * @param { K } key - The key of the element to test for presence in the Map object.
7773af6ab5fSopenharmony_ci     * @returns { boolean } true if an element with the specified key exists in the Map Object; otherwise false.
7783af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
7793af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The has method cannot be bound.
7803af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
7813af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
7823af6ab5fSopenharmony_ci     * @crossplatform
7833af6ab5fSopenharmony_ci     * @atomicservice
7843af6ab5fSopenharmony_ci     * @since 12
7853af6ab5fSopenharmony_ci     */
7863af6ab5fSopenharmony_ci    has(key: K): boolean;
7873af6ab5fSopenharmony_ci    /**
7883af6ab5fSopenharmony_ci     * Adds a new element with a specified key and value to the Map.
7893af6ab5fSopenharmony_ci     * If an element with the same key already exists, the element will be updated.
7903af6ab5fSopenharmony_ci     *
7913af6ab5fSopenharmony_ci     * @param { K } key - The key of the element to add to the Map object.
7923af6ab5fSopenharmony_ci     * @param { V } value - The value of the element to add to the object.
7933af6ab5fSopenharmony_ci     * @returns { Map<K, V> } The Object.
7943af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
7953af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The set method cannot be bound.
7963af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
7973af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
7983af6ab5fSopenharmony_ci     * @crossplatform
7993af6ab5fSopenharmony_ci     * @atomicservice
8003af6ab5fSopenharmony_ci     * @since 12
8013af6ab5fSopenharmony_ci     */
8023af6ab5fSopenharmony_ci    set(key: K, value: V): Map<K, V>;
8033af6ab5fSopenharmony_ci  }
8043af6ab5fSopenharmony_ci  
8053af6ab5fSopenharmony_ci  /**
8063af6ab5fSopenharmony_ci   * Set lets you store unique values of any type.
8073af6ab5fSopenharmony_ci   * If multiple threads access a Set instance concurrently, 
8083af6ab5fSopenharmony_ci   * and at least one of the threads modifies the set structurally,
8093af6ab5fSopenharmony_ci   * it must be synchronized externally.
8103af6ab5fSopenharmony_ci   * 
8113af6ab5fSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
8123af6ab5fSopenharmony_ci   * @crossplatform
8133af6ab5fSopenharmony_ci   * @atomicservice
8143af6ab5fSopenharmony_ci   * @since 12
8153af6ab5fSopenharmony_ci   */
8163af6ab5fSopenharmony_ci  @Sendable
8173af6ab5fSopenharmony_ci  class Set<T> {
8183af6ab5fSopenharmony_ci    /**
8193af6ab5fSopenharmony_ci     * Returns the number of elements in the Set.
8203af6ab5fSopenharmony_ci     *
8213af6ab5fSopenharmony_ci     * @type { number }
8223af6ab5fSopenharmony_ci     * @readonly
8233af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
8243af6ab5fSopenharmony_ci     * @crossplatform
8253af6ab5fSopenharmony_ci     * @atomicservice
8263af6ab5fSopenharmony_ci     * @since 12
8273af6ab5fSopenharmony_ci     */
8283af6ab5fSopenharmony_ci    public readonly size: number;
8293af6ab5fSopenharmony_ci    /**
8303af6ab5fSopenharmony_ci     * A constructor used to create a Set.
8313af6ab5fSopenharmony_ci     *
8323af6ab5fSopenharmony_ci     * @param { readonly T[] | null } [values] - If an iterable object is passed,
8333af6ab5fSopenharmony_ci     *     all of its elements will be added to the new Set.
8343af6ab5fSopenharmony_ci     *     If you don't specify this parameter, or its value is null, the new Set is empty.
8353af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
8363af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Set's constructor cannot be directly invoked.
8373af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
8383af6ab5fSopenharmony_ci     * @crossplatform
8393af6ab5fSopenharmony_ci     * @atomicservice
8403af6ab5fSopenharmony_ci     * @since 12
8413af6ab5fSopenharmony_ci     */
8423af6ab5fSopenharmony_ci    constructor(values?: readonly T[] | null);
8433af6ab5fSopenharmony_ci    /**
8443af6ab5fSopenharmony_ci     * Returns an iterable of [value, value] pairs for each element in this set.
8453af6ab5fSopenharmony_ci     * 
8463af6ab5fSopenharmony_ci     * @returns { IterableIterator<[T, T]> } A new iterable iterator object.
8473af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The entries method cannot be bound.
8483af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
8493af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
8503af6ab5fSopenharmony_ci     * @crossplatform
8513af6ab5fSopenharmony_ci     * @atomicservice
8523af6ab5fSopenharmony_ci     * @since 12
8533af6ab5fSopenharmony_ci     */
8543af6ab5fSopenharmony_ci    entries(): IterableIterator<[T, T]>;
8553af6ab5fSopenharmony_ci    /**
8563af6ab5fSopenharmony_ci     * Returns an iterable of the values in the set.
8573af6ab5fSopenharmony_ci     *
8583af6ab5fSopenharmony_ci     * @returns { IterableIterator<T> } A new iterable iterator object.
8593af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The keys method cannot be bound.
8603af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
8613af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
8623af6ab5fSopenharmony_ci     * @crossplatform
8633af6ab5fSopenharmony_ci     * @atomicservice
8643af6ab5fSopenharmony_ci     * @since 12
8653af6ab5fSopenharmony_ci     */
8663af6ab5fSopenharmony_ci    keys(): IterableIterator<T>;
8673af6ab5fSopenharmony_ci    /**
8683af6ab5fSopenharmony_ci     * Returns an iterable of values in the set.
8693af6ab5fSopenharmony_ci     *
8703af6ab5fSopenharmony_ci     * @returns { IterableIterator<T> } A new iterable iterator object.
8713af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The values method cannot be bound.
8723af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
8733af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
8743af6ab5fSopenharmony_ci     * @crossplatform
8753af6ab5fSopenharmony_ci     * @atomicservice
8763af6ab5fSopenharmony_ci     * @since 12
8773af6ab5fSopenharmony_ci     */
8783af6ab5fSopenharmony_ci    values(): IterableIterator<T>;
8793af6ab5fSopenharmony_ci    /**
8803af6ab5fSopenharmony_ci     * Appends a new element with a specified value to the end of the Set.
8813af6ab5fSopenharmony_ci     *
8823af6ab5fSopenharmony_ci     * @param { T } value - The value of the element to add to the Set object.
8833af6ab5fSopenharmony_ci     * @returns { Set<T> } The Set object with added value.
8843af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The add method cannot be bound.
8853af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
8863af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
8873af6ab5fSopenharmony_ci     * @crossplatform
8883af6ab5fSopenharmony_ci     * @atomicservice
8893af6ab5fSopenharmony_ci     * @since 12
8903af6ab5fSopenharmony_ci     */
8913af6ab5fSopenharmony_ci    add(value: T): Set<T>;
8923af6ab5fSopenharmony_ci    /**
8933af6ab5fSopenharmony_ci     * Clears the Set.
8943af6ab5fSopenharmony_ci     *
8953af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The clear method cannot be bound.
8963af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
8973af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
8983af6ab5fSopenharmony_ci     * @crossplatform
8993af6ab5fSopenharmony_ci     * @atomicservice
9003af6ab5fSopenharmony_ci     * @since 12
9013af6ab5fSopenharmony_ci     */
9023af6ab5fSopenharmony_ci    clear(): void;
9033af6ab5fSopenharmony_ci    /**
9043af6ab5fSopenharmony_ci     * Returns true if an element in the Set existed and has been removed, or false if the element does not exist.
9053af6ab5fSopenharmony_ci     *
9063af6ab5fSopenharmony_ci     * @param { T } value - The value to remove from Set.
9073af6ab5fSopenharmony_ci     * @returns { boolean } Returns true if value was already in Set; otherwise false.
9083af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The delete method cannot be bound.
9093af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
9103af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
9113af6ab5fSopenharmony_ci     * @crossplatform
9123af6ab5fSopenharmony_ci     * @atomicservice
9133af6ab5fSopenharmony_ci     * @since 12
9143af6ab5fSopenharmony_ci     */
9153af6ab5fSopenharmony_ci    delete(value: T): boolean;
9163af6ab5fSopenharmony_ci    /**
9173af6ab5fSopenharmony_ci     * Executes a provided function once per each value in the Set object, in insertion order.
9183af6ab5fSopenharmony_ci     *
9193af6ab5fSopenharmony_ci     * @param { function } callbackFn - A function that accepts up to three arguments.
9203af6ab5fSopenharmony_ci     *     The function to be called for each element.
9213af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
9223af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The forEach method cannot be bound.
9233af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
9243af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
9253af6ab5fSopenharmony_ci     * @crossplatform
9263af6ab5fSopenharmony_ci     * @atomicservice
9273af6ab5fSopenharmony_ci     * @since 12
9283af6ab5fSopenharmony_ci     */
9293af6ab5fSopenharmony_ci    forEach(callbackFn: (value: T, value2: T, set: Set<T>) => void): void;
9303af6ab5fSopenharmony_ci    /**
9313af6ab5fSopenharmony_ci     * A boolean indicating whether an element with the specified value exists in the Set or not.
9323af6ab5fSopenharmony_ci     *
9333af6ab5fSopenharmony_ci     * @param { T } value -  The value to test for presence in the Object.
9343af6ab5fSopenharmony_ci     * @returns { boolean } Returns true if an element with the specified value exists in the Set object;
9353af6ab5fSopenharmony_ci     *     otherwise false.
9363af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
9373af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The has method cannot be bound.
9383af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
9393af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
9403af6ab5fSopenharmony_ci     * @crossplatform
9413af6ab5fSopenharmony_ci     * @atomicservice
9423af6ab5fSopenharmony_ci     * @since 12
9433af6ab5fSopenharmony_ci     */
9443af6ab5fSopenharmony_ci    has(value: T): boolean;
9453af6ab5fSopenharmony_ci  }
9463af6ab5fSopenharmony_ci  /**
9473af6ab5fSopenharmony_ci   * Represents a raw buffer of binary data, which is used to store data for the
9483af6ab5fSopenharmony_ci   * different typed arrays. ArrayBuffers cannot be read from or written to directly,
9493af6ab5fSopenharmony_ci   * but can be passed to a typed array or DataView Object to interpret the raw
9503af6ab5fSopenharmony_ci   * buffer as needed.
9513af6ab5fSopenharmony_ci   * If multiple threads access a ArrayBuffer instance concurrently, 
9523af6ab5fSopenharmony_ci   * and at least one of the threads modifies the buffer structurally,
9533af6ab5fSopenharmony_ci   * it must be synchronized externally.
9543af6ab5fSopenharmony_ci   *
9553af6ab5fSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
9563af6ab5fSopenharmony_ci   * @crossplatform
9573af6ab5fSopenharmony_ci   * @atomicservice
9583af6ab5fSopenharmony_ci   * @since 12
9593af6ab5fSopenharmony_ci   */
9603af6ab5fSopenharmony_ci  @Sendable
9613af6ab5fSopenharmony_ci  class ArrayBuffer {
9623af6ab5fSopenharmony_ci    /**
9633af6ab5fSopenharmony_ci     * Read-only. The length of the ArrayBuffer (in bytes).
9643af6ab5fSopenharmony_ci     *
9653af6ab5fSopenharmony_ci     * @type { number }
9663af6ab5fSopenharmony_ci     * @readonly
9673af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
9683af6ab5fSopenharmony_ci     * @crossplatform
9693af6ab5fSopenharmony_ci     * @atomicservice
9703af6ab5fSopenharmony_ci     * @since 12
9713af6ab5fSopenharmony_ci     */
9723af6ab5fSopenharmony_ci    public readonly byteLength: number;
9733af6ab5fSopenharmony_ci    /**
9743af6ab5fSopenharmony_ci     * A constructor used to create a ArrayBuffer.
9753af6ab5fSopenharmony_ci     *
9763af6ab5fSopenharmony_ci     * @param { number } byteLength - The length of the ArkTS array buffer
9773af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The ArrayBuffer's constructor cannot be directly invoked.
9783af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
9793af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
9803af6ab5fSopenharmony_ci     * @crossplatform
9813af6ab5fSopenharmony_ci     * @atomicservice
9823af6ab5fSopenharmony_ci     * @since 12
9833af6ab5fSopenharmony_ci     */
9843af6ab5fSopenharmony_ci    constructor(byteLength: number);
9853af6ab5fSopenharmony_ci    /**
9863af6ab5fSopenharmony_ci     * Returns a section of an ArrayBuffer.
9873af6ab5fSopenharmony_ci     *
9883af6ab5fSopenharmony_ci     * @param { number } begin - Zero-based index at which to start extraction, converted to an integer.
9893af6ab5fSopenharmony_ci     * @param { number } [end] - Zero-based index at which to end extraction, converted to an integer.
9903af6ab5fSopenharmony_ci     *     Default is buffer.length
9913af6ab5fSopenharmony_ci     * @returns { ArrayBuffer } A new ArrayBuffer containing the extracted elements.
9923af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
9933af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The slice method cannot be bound.
9943af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
9953af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
9963af6ab5fSopenharmony_ci     * @crossplatform
9973af6ab5fSopenharmony_ci     * @atomicservice
9983af6ab5fSopenharmony_ci     * @since 12
9993af6ab5fSopenharmony_ci     */
10003af6ab5fSopenharmony_ci    slice(begin: number, end?: number): ArrayBuffer;
10013af6ab5fSopenharmony_ci  }
10023af6ab5fSopenharmony_ci
10033af6ab5fSopenharmony_ci  /**
10043af6ab5fSopenharmony_ci   * A typed array of 8-bit integer values. The contents are initialized to 0.
10053af6ab5fSopenharmony_ci   * If multiple threads access a Int8Array instance concurrently, 
10063af6ab5fSopenharmony_ci   * and at least one of the threads modifies the array structurally,
10073af6ab5fSopenharmony_ci   * it must be synchronized externally.
10083af6ab5fSopenharmony_ci   *
10093af6ab5fSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
10103af6ab5fSopenharmony_ci   * @crossplatform
10113af6ab5fSopenharmony_ci   * @atomicservice
10123af6ab5fSopenharmony_ci   * @since 12
10133af6ab5fSopenharmony_ci   */
10143af6ab5fSopenharmony_ci  @Sendable
10153af6ab5fSopenharmony_ci  class Int8Array {
10163af6ab5fSopenharmony_ci    /**
10173af6ab5fSopenharmony_ci     * The size in bytes of each element in the array.
10183af6ab5fSopenharmony_ci     *
10193af6ab5fSopenharmony_ci     * @type { number }
10203af6ab5fSopenharmony_ci     * @readonly
10213af6ab5fSopenharmony_ci     * @static
10223af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
10233af6ab5fSopenharmony_ci     * @crossplatform
10243af6ab5fSopenharmony_ci     * @atomicservice
10253af6ab5fSopenharmony_ci     * @since 12
10263af6ab5fSopenharmony_ci     */
10273af6ab5fSopenharmony_ci    public static readonly BYTES_PER_ELEMENT: number;
10283af6ab5fSopenharmony_ci    /**
10293af6ab5fSopenharmony_ci     * The ArrayBuffer instance referenced by the array.
10303af6ab5fSopenharmony_ci     *
10313af6ab5fSopenharmony_ci     * @type { ArrayBuffer }
10323af6ab5fSopenharmony_ci     * @readonly
10333af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
10343af6ab5fSopenharmony_ci     * @crossplatform
10353af6ab5fSopenharmony_ci     * @atomicservice
10363af6ab5fSopenharmony_ci     * @since 12
10373af6ab5fSopenharmony_ci     */
10383af6ab5fSopenharmony_ci    public readonly buffer: ArrayBuffer;
10393af6ab5fSopenharmony_ci    /**
10403af6ab5fSopenharmony_ci     * The length in bytes of the array.
10413af6ab5fSopenharmony_ci     *
10423af6ab5fSopenharmony_ci     * @type { number }
10433af6ab5fSopenharmony_ci     * @readonly
10443af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
10453af6ab5fSopenharmony_ci     * @crossplatform
10463af6ab5fSopenharmony_ci     * @atomicservice
10473af6ab5fSopenharmony_ci     * @since 12
10483af6ab5fSopenharmony_ci     */
10493af6ab5fSopenharmony_ci    public readonly byteLength: number;
10503af6ab5fSopenharmony_ci    /**
10513af6ab5fSopenharmony_ci     * The offset in bytes of the array.
10523af6ab5fSopenharmony_ci     *
10533af6ab5fSopenharmony_ci     * @type { number }
10543af6ab5fSopenharmony_ci     * @readonly
10553af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
10563af6ab5fSopenharmony_ci     * @crossplatform
10573af6ab5fSopenharmony_ci     * @atomicservice
10583af6ab5fSopenharmony_ci     * @since 12
10593af6ab5fSopenharmony_ci     */
10603af6ab5fSopenharmony_ci    public readonly byteOffset: number;
10613af6ab5fSopenharmony_ci    /**
10623af6ab5fSopenharmony_ci     * The length of the array.
10633af6ab5fSopenharmony_ci     *
10643af6ab5fSopenharmony_ci     * @type { number }
10653af6ab5fSopenharmony_ci     * @readonly
10663af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
10673af6ab5fSopenharmony_ci     * @crossplatform
10683af6ab5fSopenharmony_ci     * @atomicservice
10693af6ab5fSopenharmony_ci     * @since 12
10703af6ab5fSopenharmony_ci     */
10713af6ab5fSopenharmony_ci    public readonly length: number;
10723af6ab5fSopenharmony_ci    /**
10733af6ab5fSopenharmony_ci     * A constructor used to create an Int8Array.
10743af6ab5fSopenharmony_ci     *
10753af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Int8Array's constructor cannot be directly invoked.
10763af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
10773af6ab5fSopenharmony_ci     * @crossplatform
10783af6ab5fSopenharmony_ci     * @atomicservice
10793af6ab5fSopenharmony_ci     * @since 12
10803af6ab5fSopenharmony_ci     */
10813af6ab5fSopenharmony_ci    constructor();
10823af6ab5fSopenharmony_ci    /**
10833af6ab5fSopenharmony_ci     * A constructor used to create an Int8Array.
10843af6ab5fSopenharmony_ci     *
10853af6ab5fSopenharmony_ci     * @param { number } length - The length of the array
10863af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Int8Array's constructor cannot be directly invoked.
10873af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
10883af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
10893af6ab5fSopenharmony_ci     * @crossplatform
10903af6ab5fSopenharmony_ci     * @atomicservice
10913af6ab5fSopenharmony_ci     * @since 12
10923af6ab5fSopenharmony_ci     */
10933af6ab5fSopenharmony_ci    constructor(length: number);
10943af6ab5fSopenharmony_ci    /**
10953af6ab5fSopenharmony_ci     * A constructor used to create an Int8Array.
10963af6ab5fSopenharmony_ci     *
10973af6ab5fSopenharmony_ci     * @param { ArrayLike<number> | ArrayBuffer } array - An array is initialized with the given elements
10983af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Int8Array's constructor cannot be directly invoked.
10993af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
11003af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
11013af6ab5fSopenharmony_ci     * @crossplatform
11023af6ab5fSopenharmony_ci     * @atomicservice
11033af6ab5fSopenharmony_ci     * @since 12
11043af6ab5fSopenharmony_ci     */
11053af6ab5fSopenharmony_ci    constructor(array: ArrayLike<number> | ArrayBuffer);
11063af6ab5fSopenharmony_ci    /**
11073af6ab5fSopenharmony_ci     * A constructor used to create an Int8Array.
11083af6ab5fSopenharmony_ci     *
11093af6ab5fSopenharmony_ci     * @param { ArrayBuffer } buffer - An array is initialized with the given elements
11103af6ab5fSopenharmony_ci     * @param { number } [byteOffset] - The byteOffset (in bytes) parameter specifies the memory range
11113af6ab5fSopenharmony_ci     *     that will be exposed by the typed array view.
11123af6ab5fSopenharmony_ci     * @param { number } [length] - The length parameter specifies the memory range
11133af6ab5fSopenharmony_ci     *     that will be exposed by the typed array view.
11143af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Int8Array's constructor cannot be directly invoked.
11153af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
11163af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
11173af6ab5fSopenharmony_ci     * @crossplatform
11183af6ab5fSopenharmony_ci     * @atomicservice
11193af6ab5fSopenharmony_ci     * @since 12
11203af6ab5fSopenharmony_ci     */
11213af6ab5fSopenharmony_ci    constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number);
11223af6ab5fSopenharmony_ci    /**
11233af6ab5fSopenharmony_ci     * Creates an Int8Array from an array-like object.
11243af6ab5fSopenharmony_ci     *
11253af6ab5fSopenharmony_ci     * @param { ArrayLike<number> } arrayLike - An array-like object to convert to an Int8Array.
11263af6ab5fSopenharmony_ci     * @returns { Int8Array } A new Int8Array instance
11273af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
11283af6ab5fSopenharmony_ci     * @static
11293af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
11303af6ab5fSopenharmony_ci     * @crossplatform
11313af6ab5fSopenharmony_ci     * @atomicservice
11323af6ab5fSopenharmony_ci     * @since 12
11333af6ab5fSopenharmony_ci     */
11343af6ab5fSopenharmony_ci    static from(arrayLike: ArrayLike<number>): Int8Array;
11353af6ab5fSopenharmony_ci    
11363af6ab5fSopenharmony_ci    /**
11373af6ab5fSopenharmony_ci     * Creates an Int8Array from an array-like object.
11383af6ab5fSopenharmony_ci     *
11393af6ab5fSopenharmony_ci     * @param { ArrayLike<T> } arrayLike - An array-like object to convert to an Int8Array.
11403af6ab5fSopenharmony_ci     * @param { TypedArrayFromMapFn<T, number> } mapFn - A mapping function to call on every element of the array.
11413af6ab5fSopenharmony_ci     * @returns { Int8Array } A new Int8Array instance
11423af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
11433af6ab5fSopenharmony_ci     * @static
11443af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
11453af6ab5fSopenharmony_ci     * @crossplatform
11463af6ab5fSopenharmony_ci     * @atomicservice
11473af6ab5fSopenharmony_ci     * @since 12
11483af6ab5fSopenharmony_ci     */
11493af6ab5fSopenharmony_ci    static from<T>(arrayLike: ArrayLike<T>, mapFn: TypedArrayFromMapFn<T, number>): Int8Array;
11503af6ab5fSopenharmony_ci    /**
11513af6ab5fSopenharmony_ci     * Creates an Int8Array from an iterable object.
11523af6ab5fSopenharmony_ci     *
11533af6ab5fSopenharmony_ci     * @param { Iterable<number> } arrayLike - An iterable object to convert to an Int8Array.
11543af6ab5fSopenharmony_ci     * @param { TypedArrayFromMapFn<number, number> } [mapFn] - A mapping function to
11553af6ab5fSopenharmony_ci     *     call on every element of the array.
11563af6ab5fSopenharmony_ci     * @returns { Int8Array } A new Int8Array instance
11573af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
11583af6ab5fSopenharmony_ci     * @static
11593af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
11603af6ab5fSopenharmony_ci     * @crossplatform
11613af6ab5fSopenharmony_ci     * @atomicservice
11623af6ab5fSopenharmony_ci     * @since 12
11633af6ab5fSopenharmony_ci     */
11643af6ab5fSopenharmony_ci    static from(arrayLike: Iterable<number>, mapFn?: TypedArrayFromMapFn<number, number>): Int8Array;
11653af6ab5fSopenharmony_ci    /**
11663af6ab5fSopenharmony_ci     * Returns the this object after copying a section of the array identified by start and end
11673af6ab5fSopenharmony_ci     * to the same array starting at position target.
11683af6ab5fSopenharmony_ci     *
11693af6ab5fSopenharmony_ci     * @param { number } target - If target is negative, it is treated as length+target where length is the
11703af6ab5fSopenharmony_ci     *     length of the array.
11713af6ab5fSopenharmony_ci     * @param { number } start - If start is negative, it is treated as length+start. If end is negative, it
11723af6ab5fSopenharmony_ci     *     is treated as length+end.
11733af6ab5fSopenharmony_ci     * @param { number } [end] - If not specified, length of the this object is used as its default value.
11743af6ab5fSopenharmony_ci     * @returns { Int8Array } The array itself.
11753af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
11763af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound.
11773af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
11783af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
11793af6ab5fSopenharmony_ci     * @crossplatform
11803af6ab5fSopenharmony_ci     * @atomicservice
11813af6ab5fSopenharmony_ci     * @since 12
11823af6ab5fSopenharmony_ci     */
11833af6ab5fSopenharmony_ci    copyWithin(target: number, start: number, end?: number): Int8Array;
11843af6ab5fSopenharmony_ci    /**
11853af6ab5fSopenharmony_ci     * Determines whether all the members of an array satisfy the specified test.
11863af6ab5fSopenharmony_ci     *
11873af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Int8Array> } predicate - A function that accepts up to three arguments.
11883af6ab5fSopenharmony_ci     *     The every method calls the predicate function for each element in the array until
11893af6ab5fSopenharmony_ci     *     the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.
11903af6ab5fSopenharmony_ci     * @returns { boolean } true unless predicate returns a false value for a typed array element,
11913af6ab5fSopenharmony_ci     *     in which case false is immediately returned.
11923af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
11933af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The every method cannot be bound.
11943af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
11953af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
11963af6ab5fSopenharmony_ci     * @crossplatform
11973af6ab5fSopenharmony_ci     * @atomicservice
11983af6ab5fSopenharmony_ci     * @since 12
11993af6ab5fSopenharmony_ci     */
12003af6ab5fSopenharmony_ci    every(predicate: TypedArrayPredicateFn<number, Int8Array>): boolean;
12013af6ab5fSopenharmony_ci    /**
12023af6ab5fSopenharmony_ci     * Returns the this object after filling the section identified by start and end with value.
12033af6ab5fSopenharmony_ci     *
12043af6ab5fSopenharmony_ci     * @param { number } value - value to fill array section with.
12053af6ab5fSopenharmony_ci     * @param { number } [start] - index to start filling the array at. If start is negative, it is treated as
12063af6ab5fSopenharmony_ci     *     length+start where length is the length of the array.
12073af6ab5fSopenharmony_ci     * @param { number } [end] - index to stop filling the array at. If end is negative, it is treated as
12083af6ab5fSopenharmony_ci     *     length+end.
12093af6ab5fSopenharmony_ci     * @returns { Int8Array } The array itself.
12103af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
12113af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The fill method cannot be bound.
12123af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
12133af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
12143af6ab5fSopenharmony_ci     * @crossplatform
12153af6ab5fSopenharmony_ci     * @atomicservice
12163af6ab5fSopenharmony_ci     * @since 12
12173af6ab5fSopenharmony_ci     */
12183af6ab5fSopenharmony_ci    fill(value: number, start?: number, end?: number): Int8Array;
12193af6ab5fSopenharmony_ci    /**
12203af6ab5fSopenharmony_ci     * Returns the elements of an array that meet the condition specified in a callback function.
12213af6ab5fSopenharmony_ci     *
12223af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Int8Array> } predicate - A function that accepts up to three arguments.
12233af6ab5fSopenharmony_ci     *     The filter method calls the predicate function one time for each element in the array.
12243af6ab5fSopenharmony_ci     * @returns { Int8Array } The array itself.
12253af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
12263af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The filter method cannot be bound.
12273af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
12283af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
12293af6ab5fSopenharmony_ci     * @crossplatform
12303af6ab5fSopenharmony_ci     * @atomicservice
12313af6ab5fSopenharmony_ci     * @since 12
12323af6ab5fSopenharmony_ci     */
12333af6ab5fSopenharmony_ci    filter(predicate: TypedArrayPredicateFn<number, Int8Array>): Int8Array;
12343af6ab5fSopenharmony_ci    /**
12353af6ab5fSopenharmony_ci     * Returns the value of the first element in the array where predicate is true, and undefined
12363af6ab5fSopenharmony_ci     * otherwise.
12373af6ab5fSopenharmony_ci     *
12383af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Int8Array> } predicate - find calls predicate once for each element of
12393af6ab5fSopenharmony_ci     *     the array, in ascending order, until it finds one where predicate returns true.
12403af6ab5fSopenharmony_ci     *     If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.
12413af6ab5fSopenharmony_ci     * @returns { number | undefined } The first element in the typed array
12423af6ab5fSopenharmony_ci     *     that satisfies the provided testing function. Otherwise, undefined is returned.
12433af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
12443af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The find method cannot be bound.
12453af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
12463af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
12473af6ab5fSopenharmony_ci     * @crossplatform
12483af6ab5fSopenharmony_ci     * @atomicservice
12493af6ab5fSopenharmony_ci     * @since 12
12503af6ab5fSopenharmony_ci     */
12513af6ab5fSopenharmony_ci    find(predicate: TypedArrayPredicateFn<number, Int8Array>): number | undefined;
12523af6ab5fSopenharmony_ci    /**
12533af6ab5fSopenharmony_ci     * Returns the index of the first element in the array where predicate is true, and -1
12543af6ab5fSopenharmony_ci     * otherwise.
12553af6ab5fSopenharmony_ci     *
12563af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Int8Array> } predicate - find calls predicate once for each element of
12573af6ab5fSopenharmony_ci     *     the array, in ascending order, until it finds one where predicate returns true. If such an element is found,
12583af6ab5fSopenharmony_ci     *     findIndex immediately returns that element index. Otherwise, findIndex returns -1.
12593af6ab5fSopenharmony_ci     * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1.
12603af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
12613af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The findIndex method cannot be bound.
12623af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
12633af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
12643af6ab5fSopenharmony_ci     * @crossplatform
12653af6ab5fSopenharmony_ci     * @atomicservice
12663af6ab5fSopenharmony_ci     * @since 12
12673af6ab5fSopenharmony_ci     */
12683af6ab5fSopenharmony_ci    findIndex(predicate: TypedArrayPredicateFn<number, Int8Array>): number;
12693af6ab5fSopenharmony_ci    /**
12703af6ab5fSopenharmony_ci     * Performs the specified action for each element in an array.
12713af6ab5fSopenharmony_ci     *
12723af6ab5fSopenharmony_ci     * @param { TypedArrayForEachCallback<number, Int8Array> } callbackFn -  A function that
12733af6ab5fSopenharmony_ci     *     accepts up to three arguments.
12743af6ab5fSopenharmony_ci     *     forEach calls the callbackfn function one time for each element in the array.
12753af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
12763af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The forEach method cannot be bound.
12773af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
12783af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
12793af6ab5fSopenharmony_ci     * @crossplatform
12803af6ab5fSopenharmony_ci     * @atomicservice
12813af6ab5fSopenharmony_ci     * @since 12
12823af6ab5fSopenharmony_ci     */
12833af6ab5fSopenharmony_ci    forEach(callbackFn: TypedArrayForEachCallback<number, Int8Array>): void;
12843af6ab5fSopenharmony_ci    /**
12853af6ab5fSopenharmony_ci     * Returns the index of the first occurrence of a value in an array.
12863af6ab5fSopenharmony_ci     *
12873af6ab5fSopenharmony_ci     * @param { number } searchElement - The value to locate in the array.
12883af6ab5fSopenharmony_ci     * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the
12893af6ab5fSopenharmony_ci     *      search starts at index 0.
12903af6ab5fSopenharmony_ci     * @returns { number } The first index of searchElement in the typed array; -1 if not found.
12913af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
12923af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The indexOf method cannot be bound.
12933af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
12943af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
12953af6ab5fSopenharmony_ci     * @crossplatform
12963af6ab5fSopenharmony_ci     * @atomicservice
12973af6ab5fSopenharmony_ci     * @since 12
12983af6ab5fSopenharmony_ci     */
12993af6ab5fSopenharmony_ci    indexOf(searchElement: number, fromIndex?: number): number;
13003af6ab5fSopenharmony_ci    /**
13013af6ab5fSopenharmony_ci     * Adds all the elements of an array separated by the specified separator string.
13023af6ab5fSopenharmony_ci     * @param { string } [separator] - A string used to separate one element of an array from the next in the
13033af6ab5fSopenharmony_ci     *     resulting String. If omitted, the array elements are separated with a comma.
13043af6ab5fSopenharmony_ci     * @returns { string } A string with all typed array elements joined.
13053af6ab5fSopenharmony_ci     *     If array.length is 0, the empty string is returned.
13063af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
13073af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The join method cannot be bound.
13083af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
13093af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
13103af6ab5fSopenharmony_ci     * @crossplatform
13113af6ab5fSopenharmony_ci     * @atomicservice
13123af6ab5fSopenharmony_ci     * @since 12
13133af6ab5fSopenharmony_ci     */
13143af6ab5fSopenharmony_ci    join(separator?: string): string;
13153af6ab5fSopenharmony_ci    /**
13163af6ab5fSopenharmony_ci     * Calls a defined callback function on each element of an array, and returns an array that
13173af6ab5fSopenharmony_ci     * contains the results.
13183af6ab5fSopenharmony_ci     *
13193af6ab5fSopenharmony_ci     * @param { TypedArrayForEachCallback<number, Int8Array> } callbackFn - A function that
13203af6ab5fSopenharmony_ci     *     accepts up to three arguments.
13213af6ab5fSopenharmony_ci     *     The map method calls the callbackfn function one time for each element in the array.
13223af6ab5fSopenharmony_ci     * @returns { Int8Array } The array itself.
13233af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
13243af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The map method cannot be bound.
13253af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
13263af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
13273af6ab5fSopenharmony_ci     * @crossplatform
13283af6ab5fSopenharmony_ci     * @atomicservice
13293af6ab5fSopenharmony_ci     * @since 12
13303af6ab5fSopenharmony_ci     */
13313af6ab5fSopenharmony_ci    map(callbackFn: TypedArrayForEachCallback<number, Int8Array>): Int8Array;
13323af6ab5fSopenharmony_ci    /**
13333af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array. The return value of
13343af6ab5fSopenharmony_ci     * the callback function is the accumulated result, and is provided as an argument in the next
13353af6ab5fSopenharmony_ci     * call to the callback function.
13363af6ab5fSopenharmony_ci     *
13373af6ab5fSopenharmony_ci     * @param { TypedArrayReduceCallback<number, number, Int8Array> } callbackFn - A function that
13383af6ab5fSopenharmony_ci     *     accepts up to four arguments.
13393af6ab5fSopenharmony_ci     *     The reduce method calls the callbackfn function one time for each element in the array.
13403af6ab5fSopenharmony_ci     * @returns { number } The value that results from running the "reducer" callback function to
13413af6ab5fSopenharmony_ci     *     completion over the entire typed array.
13423af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
13433af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
13443af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
13453af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
13463af6ab5fSopenharmony_ci     * @crossplatform
13473af6ab5fSopenharmony_ci     * @atomicservice
13483af6ab5fSopenharmony_ci     * @since 12
13493af6ab5fSopenharmony_ci     */
13503af6ab5fSopenharmony_ci    reduce(callbackFn: TypedArrayReduceCallback<number, number, Int8Array>): number;
13513af6ab5fSopenharmony_ci    /**
13523af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array. The return value of
13533af6ab5fSopenharmony_ci     * the callback function is the accumulated result, and is provided as an argument in the next
13543af6ab5fSopenharmony_ci     * call to the callback function.
13553af6ab5fSopenharmony_ci     *
13563af6ab5fSopenharmony_ci     * @param { TypedArrayReduceCallback<number, number, Int8Array> } callbackFn - A function that
13573af6ab5fSopenharmony_ci     *     accepts up to four arguments.
13583af6ab5fSopenharmony_ci     *     The reduce method calls the callbackfn function one time for each element in the array.
13593af6ab5fSopenharmony_ci     * @param { number } initialValue - If initialValue is specified, it is used as the initial value to start
13603af6ab5fSopenharmony_ci     *     the accumulation. The first call to the callbackfn function provides this value as an argument
13613af6ab5fSopenharmony_ci     *     instead of an array value.
13623af6ab5fSopenharmony_ci     * @returns { number } The value that results from running the "reducer" callback function to
13633af6ab5fSopenharmony_ci     *     completion over the entire typed array.
13643af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
13653af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
13663af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
13673af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
13683af6ab5fSopenharmony_ci     * @crossplatform
13693af6ab5fSopenharmony_ci     * @atomicservice
13703af6ab5fSopenharmony_ci     * @since 12
13713af6ab5fSopenharmony_ci     */
13723af6ab5fSopenharmony_ci    reduce(callbackFn: TypedArrayReduceCallback<number, number, Int8Array>, initialValue: number): number;
13733af6ab5fSopenharmony_ci    /**
13743af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array. The return value of
13753af6ab5fSopenharmony_ci     * the callback function is the accumulated result, and is provided as an argument in the next
13763af6ab5fSopenharmony_ci     * call to the callback function.
13773af6ab5fSopenharmony_ci     *
13783af6ab5fSopenharmony_ci     * @param { TypedArrayReduceCallback<U, number, Int8Array> } callbackFn - A function that
13793af6ab5fSopenharmony_ci     *     accepts up to four arguments.
13803af6ab5fSopenharmony_ci     *     The reduce method calls the callbackfn function one time for each element in the array.
13813af6ab5fSopenharmony_ci     * @param { U } initialValue - If initialValue is specified, it is used as the initial value to start
13823af6ab5fSopenharmony_ci     *     the accumulation. The first call to the callbackfn function provides this value as an argument
13833af6ab5fSopenharmony_ci     *     instead of an array value.
13843af6ab5fSopenharmony_ci     * @returns { U } The value that results from running the "reducer" callback function to
13853af6ab5fSopenharmony_ci     *     completion over the entire typed array.
13863af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
13873af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
13883af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
13893af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
13903af6ab5fSopenharmony_ci     * @crossplatform
13913af6ab5fSopenharmony_ci     * @atomicservice
13923af6ab5fSopenharmony_ci     * @since 12
13933af6ab5fSopenharmony_ci     */
13943af6ab5fSopenharmony_ci    reduce<U>(callbackFn: TypedArrayReduceCallback<U, number, Int8Array>, initialValue: U): U;
13953af6ab5fSopenharmony_ci    /**
13963af6ab5fSopenharmony_ci     * Reverses the elements in an Array.
13973af6ab5fSopenharmony_ci     *
13983af6ab5fSopenharmony_ci     * @returns { Int8Array } The reference to the original typed array, now reversed.
13993af6ab5fSopenharmony_ci     *     <br>Note that the typed array is reversed in place, and no copy is made.
14003af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reverse method cannot be bound.
14013af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
14023af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
14033af6ab5fSopenharmony_ci     * @crossplatform
14043af6ab5fSopenharmony_ci     * @atomicservice
14053af6ab5fSopenharmony_ci     * @since 12
14063af6ab5fSopenharmony_ci     */
14073af6ab5fSopenharmony_ci    reverse(): Int8Array;
14083af6ab5fSopenharmony_ci    /**
14093af6ab5fSopenharmony_ci     * Sets a value or an array of values.
14103af6ab5fSopenharmony_ci     *
14113af6ab5fSopenharmony_ci     * @param { ArrayLike<number> } array - A typed or untyped array of values to set.
14123af6ab5fSopenharmony_ci     * @param { number } [offset] - The index in the current array at which the values are to be written.
14133af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
14143af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The set method cannot be bound.
14153af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
14163af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
14173af6ab5fSopenharmony_ci     * @crossplatform
14183af6ab5fSopenharmony_ci     * @atomicservice
14193af6ab5fSopenharmony_ci     * @since 12
14203af6ab5fSopenharmony_ci     */
14213af6ab5fSopenharmony_ci    set(array: ArrayLike<number>, offset?: number): void;
14223af6ab5fSopenharmony_ci    /**
14233af6ab5fSopenharmony_ci     * Returns a section of an array.
14243af6ab5fSopenharmony_ci     *
14253af6ab5fSopenharmony_ci     * @param { number } [start] - The beginning of the specified portion of the array.
14263af6ab5fSopenharmony_ci     * @param { number } [end] - The end of the specified portion of the array.
14273af6ab5fSopenharmony_ci     *     This is exclusive of the element at the index 'end'.
14283af6ab5fSopenharmony_ci     * @returns { Int8Array } A new typed array containing the extracted elements.
14293af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
14303af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The slice method cannot be bound.
14313af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
14323af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
14333af6ab5fSopenharmony_ci     * @crossplatform
14343af6ab5fSopenharmony_ci     * @atomicservice
14353af6ab5fSopenharmony_ci     * @since 12
14363af6ab5fSopenharmony_ci     */
14373af6ab5fSopenharmony_ci    slice(start?: number, end?: number): Int8Array;
14383af6ab5fSopenharmony_ci    /**
14393af6ab5fSopenharmony_ci     * Determines whether the specified callback function returns true for any element of an array.
14403af6ab5fSopenharmony_ci     *
14413af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Int8Array> } predicate - A function that accepts up to three arguments.
14423af6ab5fSopenharmony_ci     *     The some method calls the predicate function for each element in the array until
14433af6ab5fSopenharmony_ci     *     the predicate returns a value which is coercible to the Boolean value true, or until the end of the array.
14443af6ab5fSopenharmony_ci     * @returns { boolean } false unless predicate returns a truthy value for a typed array element,
14453af6ab5fSopenharmony_ci     *     in which case true is immediately returned.
14463af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
14473af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The some method cannot be bound.
14483af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
14493af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
14503af6ab5fSopenharmony_ci     * @crossplatform
14513af6ab5fSopenharmony_ci     * @atomicservice
14523af6ab5fSopenharmony_ci     * @since 12
14533af6ab5fSopenharmony_ci     */
14543af6ab5fSopenharmony_ci    some(predicate: TypedArrayPredicateFn<number, Int8Array>): boolean;
14553af6ab5fSopenharmony_ci    /**
14563af6ab5fSopenharmony_ci     * Sorts an array.
14573af6ab5fSopenharmony_ci     *
14583af6ab5fSopenharmony_ci     * @param { TypedArrayCompareFn<number> } [compareFn] - Function used to determine the order of the elements.
14593af6ab5fSopenharmony_ci     *     It is expected to return a negative value if first argument is less than second argument,
14603af6ab5fSopenharmony_ci     *     zero if they're equal and a positive value otherwise.
14613af6ab5fSopenharmony_ci     *     If omitted, the elements are sorted in ascending, ASCII character order.
14623af6ab5fSopenharmony_ci     * @returns { Int8Array } The reference to the original typed array, now sorted.
14633af6ab5fSopenharmony_ci     *     Note that the typed array is sorted in place and no copy is made.
14643af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
14653af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The sort method cannot be bound.
14663af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
14673af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
14683af6ab5fSopenharmony_ci     * @crossplatform
14693af6ab5fSopenharmony_ci     * @atomicservice
14703af6ab5fSopenharmony_ci     * @since 12
14713af6ab5fSopenharmony_ci     */
14723af6ab5fSopenharmony_ci    sort(compareFn?: TypedArrayCompareFn<number>): Int8Array;
14733af6ab5fSopenharmony_ci    /**
14743af6ab5fSopenharmony_ci     * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements
14753af6ab5fSopenharmony_ci     * at begin, inclusive, up to end, exclusive.
14763af6ab5fSopenharmony_ci     *
14773af6ab5fSopenharmony_ci     * @param { number } [begin] - The index of the beginning of the array.
14783af6ab5fSopenharmony_ci     * @param { number } [end] - The index of the end of the array.
14793af6ab5fSopenharmony_ci     * @returns { Int8Array } A new Int8Array object.
14803af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
14813af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The subarray method cannot be bound.
14823af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
14833af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
14843af6ab5fSopenharmony_ci     * @crossplatform
14853af6ab5fSopenharmony_ci     * @atomicservice
14863af6ab5fSopenharmony_ci     * @since 12
14873af6ab5fSopenharmony_ci     */
14883af6ab5fSopenharmony_ci    subarray(begin?: number, end?: number): Int8Array;
14893af6ab5fSopenharmony_ci    /**
14903af6ab5fSopenharmony_ci     * Returns the item located at the specified index.
14913af6ab5fSopenharmony_ci     *
14923af6ab5fSopenharmony_ci     * @param { number } index - The zero-based index of the desired code unit.<br/>
14933af6ab5fSopenharmony_ci     *     A negative index will count back from the last item.
14943af6ab5fSopenharmony_ci     * @returns { number | undefined } The element in the array matching the given index.<br/>
14953af6ab5fSopenharmony_ci     *     Always returns undefined if index < -array.length or
14963af6ab5fSopenharmony_ci     *     index >= array.length without attempting to access the corresponding property.
14973af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
14983af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The at method cannot be bound.
14993af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
15003af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
15013af6ab5fSopenharmony_ci     * @crossplatform
15023af6ab5fSopenharmony_ci     * @atomicservice
15033af6ab5fSopenharmony_ci     * @since 12
15043af6ab5fSopenharmony_ci     */
15053af6ab5fSopenharmony_ci    at(index: number): number | undefined;
15063af6ab5fSopenharmony_ci    /**
15073af6ab5fSopenharmony_ci     * Returns an iterable of key, value pairs for every entry in the array
15083af6ab5fSopenharmony_ci     *
15093af6ab5fSopenharmony_ci     * @returns { IterableIterator<[number, number]> } A new iterable iterator object.
15103af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
15113af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
15123af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
15133af6ab5fSopenharmony_ci     * @crossplatform
15143af6ab5fSopenharmony_ci     * @atomicservice
15153af6ab5fSopenharmony_ci     * @since 12
15163af6ab5fSopenharmony_ci     */
15173af6ab5fSopenharmony_ci    entries(): IterableIterator<[number, number]>;
15183af6ab5fSopenharmony_ci    /**
15193af6ab5fSopenharmony_ci     * Returns an iterable of keys in the array
15203af6ab5fSopenharmony_ci     *
15213af6ab5fSopenharmony_ci     * @returns { IterableIterator<number> } A new iterable iterator object.
15223af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
15233af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
15243af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
15253af6ab5fSopenharmony_ci     * @crossplatform
15263af6ab5fSopenharmony_ci     * @atomicservice
15273af6ab5fSopenharmony_ci     * @since 12
15283af6ab5fSopenharmony_ci     */
15293af6ab5fSopenharmony_ci    keys(): IterableIterator<number>;
15303af6ab5fSopenharmony_ci    /**
15313af6ab5fSopenharmony_ci     * Returns an iterable of values in the array
15323af6ab5fSopenharmony_ci     *
15333af6ab5fSopenharmony_ci     * @returns { IterableIterator<number> } A new iterable iterator object.
15343af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
15353af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
15363af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
15373af6ab5fSopenharmony_ci     * @crossplatform
15383af6ab5fSopenharmony_ci     * @atomicservice
15393af6ab5fSopenharmony_ci     * @since 12
15403af6ab5fSopenharmony_ci     */
15413af6ab5fSopenharmony_ci    values(): IterableIterator<number>;
15423af6ab5fSopenharmony_ci    /**
15433af6ab5fSopenharmony_ci     * Determines whether an array includes a certain element, returning true or false as appropriate.
15443af6ab5fSopenharmony_ci     *
15453af6ab5fSopenharmony_ci     * @param { number } searchElement - The element to search for.
15463af6ab5fSopenharmony_ci     * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement.
15473af6ab5fSopenharmony_ci     * @returns { boolean } A boolean value which is true if the value searchElement is found <br/>
15483af6ab5fSopenharmony_ci     *     within the typed array (or the part of the typed array indicated by the index fromIndex, if specified).
15493af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
15503af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The at method cannot be bound.
15513af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
15523af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
15533af6ab5fSopenharmony_ci     * @crossplatform
15543af6ab5fSopenharmony_ci     * @atomicservice
15553af6ab5fSopenharmony_ci     * @since 12
15563af6ab5fSopenharmony_ci     */
15573af6ab5fSopenharmony_ci    includes(searchElement: number, fromIndex?: number): boolean;
15583af6ab5fSopenharmony_ci    /**
15593af6ab5fSopenharmony_ci     * Returns the item at that index.
15603af6ab5fSopenharmony_ci     * 
15613af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
15623af6ab5fSopenharmony_ci     * @crossplatform
15633af6ab5fSopenharmony_ci     * @atomicservice
15643af6ab5fSopenharmony_ci     * @since 12
15653af6ab5fSopenharmony_ci     */
15663af6ab5fSopenharmony_ci    [index: number]: number;
15673af6ab5fSopenharmony_ci  }
15683af6ab5fSopenharmony_ci
15693af6ab5fSopenharmony_ci  /**
15703af6ab5fSopenharmony_ci   * The Uint8ClampedArray typed array represents an array of 8-bit unsigned integers clamped to 0–255.
15713af6ab5fSopenharmony_ci   * The contents are initialized to 0.
15723af6ab5fSopenharmony_ci   * If multiple threads access a Uint8ClampedArray instance concurrently, 
15733af6ab5fSopenharmony_ci   * and at least one of the threads modifies the array structurally,
15743af6ab5fSopenharmony_ci   * it must be synchronized externally.
15753af6ab5fSopenharmony_ci   *
15763af6ab5fSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
15773af6ab5fSopenharmony_ci   * @since 12
15783af6ab5fSopenharmony_ci   */
15793af6ab5fSopenharmony_ci  @Sendable
15803af6ab5fSopenharmony_ci  class Uint8ClampedArray {
15813af6ab5fSopenharmony_ci    /**
15823af6ab5fSopenharmony_ci     * The size in bytes of each element in the array.
15833af6ab5fSopenharmony_ci     *
15843af6ab5fSopenharmony_ci     * @type { number }
15853af6ab5fSopenharmony_ci     * @readonly
15863af6ab5fSopenharmony_ci     * @static
15873af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
15883af6ab5fSopenharmony_ci     * @since 12
15893af6ab5fSopenharmony_ci     */
15903af6ab5fSopenharmony_ci    public static readonly BYTES_PER_ELEMENT: number;
15913af6ab5fSopenharmony_ci    /**
15923af6ab5fSopenharmony_ci     * The ArrayBuffer instance referenced by the array.
15933af6ab5fSopenharmony_ci     *
15943af6ab5fSopenharmony_ci     * @type { ArrayBuffer }
15953af6ab5fSopenharmony_ci     * @readonly
15963af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
15973af6ab5fSopenharmony_ci     * @since 12
15983af6ab5fSopenharmony_ci     */
15993af6ab5fSopenharmony_ci    public readonly buffer: ArrayBuffer;
16003af6ab5fSopenharmony_ci    /**
16013af6ab5fSopenharmony_ci     * The length in bytes of the array.
16023af6ab5fSopenharmony_ci     *
16033af6ab5fSopenharmony_ci     * @type { number }
16043af6ab5fSopenharmony_ci     * @readonly
16053af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
16063af6ab5fSopenharmony_ci     * @since 12
16073af6ab5fSopenharmony_ci     */
16083af6ab5fSopenharmony_ci    public readonly byteLength: number;
16093af6ab5fSopenharmony_ci    /**
16103af6ab5fSopenharmony_ci     * The offset in bytes of the array.
16113af6ab5fSopenharmony_ci     *
16123af6ab5fSopenharmony_ci     * @type { number }
16133af6ab5fSopenharmony_ci     * @readonly
16143af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
16153af6ab5fSopenharmony_ci     * @since 12
16163af6ab5fSopenharmony_ci     */
16173af6ab5fSopenharmony_ci    public readonly byteOffset: number;
16183af6ab5fSopenharmony_ci    /**
16193af6ab5fSopenharmony_ci     * The length of the array.
16203af6ab5fSopenharmony_ci     *
16213af6ab5fSopenharmony_ci     * @type { number }
16223af6ab5fSopenharmony_ci     * @readonly
16233af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
16243af6ab5fSopenharmony_ci     * @since 12
16253af6ab5fSopenharmony_ci     */
16263af6ab5fSopenharmony_ci    public readonly length: number;
16273af6ab5fSopenharmony_ci    /**
16283af6ab5fSopenharmony_ci     * A constructor used to create an Uint8ClampedArray.
16293af6ab5fSopenharmony_ci     *
16303af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Uint8ClampedArray's constructor cannot be directly invoked.
16313af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
16323af6ab5fSopenharmony_ci     * @since 12
16333af6ab5fSopenharmony_ci     */
16343af6ab5fSopenharmony_ci    constructor();
16353af6ab5fSopenharmony_ci    /**
16363af6ab5fSopenharmony_ci     * A constructor used to create an Uint8ClampedArray.
16373af6ab5fSopenharmony_ci     *
16383af6ab5fSopenharmony_ci     * @param { number } length - The length of the array
16393af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Uint8ClampedArray's constructor cannot be directly invoked.
16403af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
16413af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
16423af6ab5fSopenharmony_ci     * @since 12
16433af6ab5fSopenharmony_ci     */
16443af6ab5fSopenharmony_ci    constructor(length: number);
16453af6ab5fSopenharmony_ci    /**
16463af6ab5fSopenharmony_ci     * A constructor used to create an Uint8ClampedArray.
16473af6ab5fSopenharmony_ci     *
16483af6ab5fSopenharmony_ci     * @param { ArrayLike<number> | ArrayBuffer } array - An array is initialized with the given elements
16493af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Uint8ClampedArray's constructor cannot be directly invoked.
16503af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
16513af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
16523af6ab5fSopenharmony_ci     * @since 12
16533af6ab5fSopenharmony_ci     */
16543af6ab5fSopenharmony_ci    constructor(array: ArrayLike<number> | ArrayBuffer);
16553af6ab5fSopenharmony_ci    /**
16563af6ab5fSopenharmony_ci     * A constructor used to create an Uint8ClampedArray.
16573af6ab5fSopenharmony_ci     *
16583af6ab5fSopenharmony_ci     * @param { ArrayBuffer } buffer - An array is initialized with the given elements
16593af6ab5fSopenharmony_ci     * @param { number } [byteOffset] - The byteOffset (in bytes) parameter specifies the memory range
16603af6ab5fSopenharmony_ci     *     that will be exposed by the typed array view.
16613af6ab5fSopenharmony_ci     * @param { number } [length] - The length parameter specifies the memory range
16623af6ab5fSopenharmony_ci     *     that will be exposed by the typed array view.
16633af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Uint8ClampedArray's constructor cannot be directly invoked.
16643af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
16653af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
16663af6ab5fSopenharmony_ci     * @since 12
16673af6ab5fSopenharmony_ci     */
16683af6ab5fSopenharmony_ci    constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number);
16693af6ab5fSopenharmony_ci    /**
16703af6ab5fSopenharmony_ci     * Creates an Uint8ClampedArray from an array-like object.
16713af6ab5fSopenharmony_ci     *
16723af6ab5fSopenharmony_ci     * @param { ArrayLike<number> } arrayLike - An array-like object to convert to an Uint8ClampedArray.
16733af6ab5fSopenharmony_ci     * @returns { Uint8ClampedArray } A new Uint8ClampedArray instance
16743af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
16753af6ab5fSopenharmony_ci     * @static
16763af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
16773af6ab5fSopenharmony_ci     * @since 12
16783af6ab5fSopenharmony_ci     */
16793af6ab5fSopenharmony_ci    static from(arrayLike: ArrayLike<number>): Uint8ClampedArray;
16803af6ab5fSopenharmony_ci    
16813af6ab5fSopenharmony_ci    /**
16823af6ab5fSopenharmony_ci     * Creates an Uint8ClampedArray from an array-like object.
16833af6ab5fSopenharmony_ci     *
16843af6ab5fSopenharmony_ci     * @param { ArrayLike<T> } arrayLike - An array-like object to convert to an Uint8ClampedArray.
16853af6ab5fSopenharmony_ci     * @param { TypedArrayFromMapFn<T, number> } mapFn - A mapping function to call on every element of the array.
16863af6ab5fSopenharmony_ci     * @returns { Uint8ClampedArray } A new Uint8ClampedArray instance
16873af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
16883af6ab5fSopenharmony_ci     * @static
16893af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
16903af6ab5fSopenharmony_ci     * @since 12
16913af6ab5fSopenharmony_ci     */
16923af6ab5fSopenharmony_ci    static from<T>(arrayLike: ArrayLike<T>, mapFn: TypedArrayFromMapFn<T, number>): Uint8ClampedArray;
16933af6ab5fSopenharmony_ci    /**
16943af6ab5fSopenharmony_ci     * Creates an Uint8ClampedArray from an iterable object.
16953af6ab5fSopenharmony_ci     *
16963af6ab5fSopenharmony_ci     * @param { Iterable<number> } arrayLike - An iterable object to convert to an Uint8ClampedArray.
16973af6ab5fSopenharmony_ci     * @param { TypedArrayFromMapFn<number, number> } [mapFn] - A mapping function to
16983af6ab5fSopenharmony_ci     *     call on every element of the array.
16993af6ab5fSopenharmony_ci     * @returns { Uint8ClampedArray } A new Uint8ClampedArray instance
17003af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
17013af6ab5fSopenharmony_ci     * @static
17023af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
17033af6ab5fSopenharmony_ci     * @since 12
17043af6ab5fSopenharmony_ci     */
17053af6ab5fSopenharmony_ci    static from(arrayLike: Iterable<number>, mapFn?: TypedArrayFromMapFn<number, number>): Uint8ClampedArray;
17063af6ab5fSopenharmony_ci    /**
17073af6ab5fSopenharmony_ci     * Returns the this object after copying a section of the array identified by start and end
17083af6ab5fSopenharmony_ci     * to the same array starting at position target.
17093af6ab5fSopenharmony_ci     *
17103af6ab5fSopenharmony_ci     * @param { number } target - If target is negative, it is treated as length+target where length is the
17113af6ab5fSopenharmony_ci     *     length of the array.
17123af6ab5fSopenharmony_ci     * @param { number } start - If start is negative, it is treated as length+start. If end is negative, it
17133af6ab5fSopenharmony_ci     *     is treated as length+end.
17143af6ab5fSopenharmony_ci     * @param { number } [end] - If not specified, length of the this object is used as its default value.
17153af6ab5fSopenharmony_ci     * @returns { Uint8ClampedArray } The array itself.
17163af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
17173af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound.
17183af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
17193af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
17203af6ab5fSopenharmony_ci     * @since 12
17213af6ab5fSopenharmony_ci     */
17223af6ab5fSopenharmony_ci    copyWithin(target: number, start: number, end?: number): Uint8ClampedArray;
17233af6ab5fSopenharmony_ci    /**
17243af6ab5fSopenharmony_ci     * Determines whether all the members of an array satisfy the specified test.
17253af6ab5fSopenharmony_ci     *
17263af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Uint8ClampedArray> } predicate - A function
17273af6ab5fSopenharmony_ci     *     that accepts up to three arguments.
17283af6ab5fSopenharmony_ci     *     The every method calls the predicate function for each element in the array until
17293af6ab5fSopenharmony_ci     *     the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.
17303af6ab5fSopenharmony_ci     * @returns { boolean } true unless predicate returns a false value for a typed array element,
17313af6ab5fSopenharmony_ci     *     in which case false is immediately returned.
17323af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
17333af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The every method cannot be bound.
17343af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
17353af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
17363af6ab5fSopenharmony_ci     * @since 12
17373af6ab5fSopenharmony_ci     */
17383af6ab5fSopenharmony_ci    every(predicate: TypedArrayPredicateFn<number, Uint8ClampedArray>): boolean;
17393af6ab5fSopenharmony_ci    /**
17403af6ab5fSopenharmony_ci     * Returns the this object after filling the section identified by start and end with value.
17413af6ab5fSopenharmony_ci     *
17423af6ab5fSopenharmony_ci     * @param { number } value - value to fill array section with.
17433af6ab5fSopenharmony_ci     * @param { number } [start] - index to start filling the array at. If start is negative, it is treated as
17443af6ab5fSopenharmony_ci     *     length+start where length is the length of the array.
17453af6ab5fSopenharmony_ci     * @param { number } [end] - index to stop filling the array at. If end is negative, it is treated as
17463af6ab5fSopenharmony_ci     *     length+end.
17473af6ab5fSopenharmony_ci     * @returns { Uint8ClampedArray } The array itself.
17483af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
17493af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The fill method cannot be bound.
17503af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
17513af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
17523af6ab5fSopenharmony_ci     * @since 12
17533af6ab5fSopenharmony_ci     */
17543af6ab5fSopenharmony_ci    fill(value: number, start?: number, end?: number): Uint8ClampedArray;
17553af6ab5fSopenharmony_ci    /**
17563af6ab5fSopenharmony_ci     * Returns the elements of an array that meet the condition specified in a callback function.
17573af6ab5fSopenharmony_ci     *
17583af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Uint8ClampedArray> } predicate - A function
17593af6ab5fSopenharmony_ci     *     that accepts up to three arguments.
17603af6ab5fSopenharmony_ci     *     The filter method calls the predicate function one time for each element in the array.
17613af6ab5fSopenharmony_ci     * @returns { Uint8ClampedArray } The array itself.
17623af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
17633af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The filter method cannot be bound.
17643af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
17653af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
17663af6ab5fSopenharmony_ci     * @since 12
17673af6ab5fSopenharmony_ci     */
17683af6ab5fSopenharmony_ci    filter(predicate: TypedArrayPredicateFn<number, Uint8ClampedArray>): Uint8ClampedArray;
17693af6ab5fSopenharmony_ci    /**
17703af6ab5fSopenharmony_ci     * Returns the value of the first element in the array where predicate is true, and undefined
17713af6ab5fSopenharmony_ci     * otherwise.
17723af6ab5fSopenharmony_ci     *
17733af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Uint8ClampedArray> } predicate - find calls predicate once for
17743af6ab5fSopenharmony_ci     *     each element of the array, in ascending order, until it finds one where predicate returns true.
17753af6ab5fSopenharmony_ci     *     If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.
17763af6ab5fSopenharmony_ci     * @returns { number | undefined } The first element in the typed array
17773af6ab5fSopenharmony_ci     *     that satisfies the provided testing function. Otherwise, undefined is returned.
17783af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
17793af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The find method cannot be bound.
17803af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
17813af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
17823af6ab5fSopenharmony_ci     * @since 12
17833af6ab5fSopenharmony_ci     */
17843af6ab5fSopenharmony_ci    find(predicate: TypedArrayPredicateFn<number, Uint8ClampedArray>): number | undefined;
17853af6ab5fSopenharmony_ci    /**
17863af6ab5fSopenharmony_ci     * Returns the index of the first element in the array where predicate is true, and -1
17873af6ab5fSopenharmony_ci     * otherwise.
17883af6ab5fSopenharmony_ci     *
17893af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Uint8ClampedArray> } predicate - find calls predicate once for
17903af6ab5fSopenharmony_ci     *     each element of the array, in ascending order, until it finds one where predicate returns true.
17913af6ab5fSopenharmony_ci     *     If such an element is found, findIndex immediately returns that element index.
17923af6ab5fSopenharmony_ci     *     Otherwise, findIndex returns -1.
17933af6ab5fSopenharmony_ci     * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1.
17943af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
17953af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The findIndex method cannot be bound.
17963af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
17973af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
17983af6ab5fSopenharmony_ci     * @since 12
17993af6ab5fSopenharmony_ci     */
18003af6ab5fSopenharmony_ci    findIndex(predicate: TypedArrayPredicateFn<number, Uint8ClampedArray>): number;
18013af6ab5fSopenharmony_ci    /**
18023af6ab5fSopenharmony_ci     * Performs the specified action for each element in an array.
18033af6ab5fSopenharmony_ci     *
18043af6ab5fSopenharmony_ci     * @param { TypedArrayForEachCallback<number, Uint8ClampedArray> } callbackFn -  A function that
18053af6ab5fSopenharmony_ci     *     accepts up to three arguments.
18063af6ab5fSopenharmony_ci     *     forEach calls the callbackfn function one time for each element in the array.
18073af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
18083af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The forEach method cannot be bound.
18093af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
18103af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
18113af6ab5fSopenharmony_ci     * @since 12
18123af6ab5fSopenharmony_ci     */
18133af6ab5fSopenharmony_ci    forEach(callbackFn: TypedArrayForEachCallback<number, Uint8ClampedArray>): void;
18143af6ab5fSopenharmony_ci    /**
18153af6ab5fSopenharmony_ci     * Returns the index of the first occurrence of a value in an array.
18163af6ab5fSopenharmony_ci     *
18173af6ab5fSopenharmony_ci     * @param { number } searchElement - The value to locate in the array.
18183af6ab5fSopenharmony_ci     * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the
18193af6ab5fSopenharmony_ci     *      search starts at index 0.
18203af6ab5fSopenharmony_ci     * @returns { number } The first index of searchElement in the typed array; -1 if not found.
18213af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
18223af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The indexOf method cannot be bound.
18233af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
18243af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
18253af6ab5fSopenharmony_ci     * @since 12
18263af6ab5fSopenharmony_ci     */
18273af6ab5fSopenharmony_ci    indexOf(searchElement: number, fromIndex?: number): number;
18283af6ab5fSopenharmony_ci    /**
18293af6ab5fSopenharmony_ci     * Adds all the elements of an array separated by the specified separator string.
18303af6ab5fSopenharmony_ci     * @param { string } [separator] - A string used to separate one element of an array from the next in the
18313af6ab5fSopenharmony_ci     *     resulting String. If omitted, the array elements are separated with a comma.
18323af6ab5fSopenharmony_ci     * @returns { string } A string with all typed array elements joined.
18333af6ab5fSopenharmony_ci     *     If array.length is 0, the empty string is returned.
18343af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
18353af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The join method cannot be bound.
18363af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
18373af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
18383af6ab5fSopenharmony_ci     * @since 12
18393af6ab5fSopenharmony_ci     */
18403af6ab5fSopenharmony_ci    join(separator?: string): string;
18413af6ab5fSopenharmony_ci    /**
18423af6ab5fSopenharmony_ci     * Calls a defined callback function on each element of an array, and returns an array that
18433af6ab5fSopenharmony_ci     * contains the results.
18443af6ab5fSopenharmony_ci     *
18453af6ab5fSopenharmony_ci     * @param { TypedArrayMapCallback<number, Uint8ClampedArray> } callbackFn - A function that
18463af6ab5fSopenharmony_ci     *     accepts up to three arguments.
18473af6ab5fSopenharmony_ci     *     The map method calls the callbackfn function one time for each element in the array.
18483af6ab5fSopenharmony_ci     * @returns { Uint8ClampedArray } The array itself.
18493af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
18503af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The map method cannot be bound.
18513af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
18523af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
18533af6ab5fSopenharmony_ci     * @since 12
18543af6ab5fSopenharmony_ci     */
18553af6ab5fSopenharmony_ci    map(callbackFn: TypedArrayMapCallback<number, Uint8ClampedArray>): Uint8ClampedArray;
18563af6ab5fSopenharmony_ci    /**
18573af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array. The return value of
18583af6ab5fSopenharmony_ci     * the callback function is the accumulated result, and is provided as an argument in the next
18593af6ab5fSopenharmony_ci     * call to the callback function.
18603af6ab5fSopenharmony_ci     *
18613af6ab5fSopenharmony_ci     * @param { TypedArrayReduceCallback<number, number, Uint8ClampedArray> } callbackFn - A function that
18623af6ab5fSopenharmony_ci     *     accepts up to four arguments.
18633af6ab5fSopenharmony_ci     *     The reduce method calls the callbackfn function one time for each element in the array.
18643af6ab5fSopenharmony_ci     * @returns { number } The value that results from running the "reducer" callback function to
18653af6ab5fSopenharmony_ci     *     completion over the entire typed array.
18663af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
18673af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
18683af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
18693af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
18703af6ab5fSopenharmony_ci     * @since 12
18713af6ab5fSopenharmony_ci     */
18723af6ab5fSopenharmony_ci    reduce(callbackFn: TypedArrayReduceCallback<number, number, Uint8ClampedArray>): number;
18733af6ab5fSopenharmony_ci    /**
18743af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array. The return value of
18753af6ab5fSopenharmony_ci     * the callback function is the accumulated result, and is provided as an argument in the next
18763af6ab5fSopenharmony_ci     * call to the callback function.
18773af6ab5fSopenharmony_ci     *
18783af6ab5fSopenharmony_ci     * @param { TypedArrayReduceCallback<U, number, Uint8ClampedArray> } callbackFn - A function that
18793af6ab5fSopenharmony_ci     *     accepts up to four arguments.
18803af6ab5fSopenharmony_ci     *     The reduce method calls the callbackfn function one time for each element in the array.
18813af6ab5fSopenharmony_ci     * @param { U } initialValue - If initialValue is specified, it is used as the initial value to start
18823af6ab5fSopenharmony_ci     *     the accumulation. The first call to the callbackfn function provides this value as an argument
18833af6ab5fSopenharmony_ci     *     instead of an array value.
18843af6ab5fSopenharmony_ci     * @returns { U } The value that results from running the "reducer" callback function to
18853af6ab5fSopenharmony_ci     *     completion over the entire typed array.
18863af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
18873af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
18883af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
18893af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
18903af6ab5fSopenharmony_ci     * @since 12
18913af6ab5fSopenharmony_ci     */
18923af6ab5fSopenharmony_ci    reduce<U = number>(callbackFn: TypedArrayReduceCallback<U, number, Uint8ClampedArray>, initialValue: U): U;
18933af6ab5fSopenharmony_ci    /**
18943af6ab5fSopenharmony_ci     * Reverses the elements in an Array.
18953af6ab5fSopenharmony_ci     *
18963af6ab5fSopenharmony_ci     * @returns { Uint8ClampedArray } The reference to the original typed array, now reversed.
18973af6ab5fSopenharmony_ci     *     <br>Note that the typed array is reversed in place, and no copy is made.
18983af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reverse method cannot be bound.
18993af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
19003af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
19013af6ab5fSopenharmony_ci     * @since 12
19023af6ab5fSopenharmony_ci     */
19033af6ab5fSopenharmony_ci    reverse(): Uint8ClampedArray;
19043af6ab5fSopenharmony_ci    /**
19053af6ab5fSopenharmony_ci     * Sets a value or an array of values.
19063af6ab5fSopenharmony_ci     *
19073af6ab5fSopenharmony_ci     * @param { ArrayLike<number> } array - A typed or untyped array of values to set.
19083af6ab5fSopenharmony_ci     * @param { number } [offset] - The index in the current array at which the values are to be written.
19093af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
19103af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The set method cannot be bound.
19113af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
19123af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
19133af6ab5fSopenharmony_ci     * @since 12
19143af6ab5fSopenharmony_ci     */
19153af6ab5fSopenharmony_ci    set(array: ArrayLike<number>, offset?: number): void;
19163af6ab5fSopenharmony_ci    /**
19173af6ab5fSopenharmony_ci     * Returns a section of an array.
19183af6ab5fSopenharmony_ci     *
19193af6ab5fSopenharmony_ci     * @param { number } [start] - The beginning of the specified portion of the array.
19203af6ab5fSopenharmony_ci     * @param { number } [end] - The end of the specified portion of the array.
19213af6ab5fSopenharmony_ci     *     This is exclusive of the element at the index 'end'.
19223af6ab5fSopenharmony_ci     * @returns { Uint8ClampedArray } A new typed array containing the extracted elements.
19233af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
19243af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The slice method cannot be bound.
19253af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
19263af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
19273af6ab5fSopenharmony_ci     * @since 12
19283af6ab5fSopenharmony_ci     */
19293af6ab5fSopenharmony_ci    slice(start?: number, end?: number): Uint8ClampedArray;
19303af6ab5fSopenharmony_ci    /**
19313af6ab5fSopenharmony_ci     * Determines whether the specified callback function returns true for any element of an array.
19323af6ab5fSopenharmony_ci     *
19333af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Uint8ClampedArray> } predicate - A function
19343af6ab5fSopenharmony_ci     *     that accepts up to three arguments.
19353af6ab5fSopenharmony_ci     *     The some method calls the predicate function for each element in the array until
19363af6ab5fSopenharmony_ci     *     the predicate returns a value which is coercible to the Boolean value true, or until the end of the array.
19373af6ab5fSopenharmony_ci     * @returns { boolean } false unless predicate returns a truthy value for a typed array element,
19383af6ab5fSopenharmony_ci     *     in which case true is immediately returned.
19393af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
19403af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The some method cannot be bound.
19413af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
19423af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
19433af6ab5fSopenharmony_ci     * @since 12
19443af6ab5fSopenharmony_ci     */
19453af6ab5fSopenharmony_ci    some(predicate: TypedArrayPredicateFn<number, Uint8ClampedArray>): boolean;
19463af6ab5fSopenharmony_ci    /**
19473af6ab5fSopenharmony_ci     * Sorts an array.
19483af6ab5fSopenharmony_ci     *
19493af6ab5fSopenharmony_ci     * @param { TypedArrayCompareFn<number> } [compareFn] - Function used to determine the order of the elements.
19503af6ab5fSopenharmony_ci     *     It is expected to return a negative value if first argument is less than second argument,
19513af6ab5fSopenharmony_ci     *     zero if they're equal and a positive value otherwise.
19523af6ab5fSopenharmony_ci     *     If omitted, the elements are sorted in ascending, ASCII character order.
19533af6ab5fSopenharmony_ci     * @returns { Uint8ClampedArray } The reference to the original typed array, now sorted.
19543af6ab5fSopenharmony_ci     *     Note that the typed array is sorted in place and no copy is made.
19553af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
19563af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The sort method cannot be bound.
19573af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
19583af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
19593af6ab5fSopenharmony_ci     * @since 12
19603af6ab5fSopenharmony_ci     */
19613af6ab5fSopenharmony_ci    sort(compareFn?: TypedArrayCompareFn<number>): Uint8ClampedArray;
19623af6ab5fSopenharmony_ci    /**
19633af6ab5fSopenharmony_ci     * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements
19643af6ab5fSopenharmony_ci     * at begin, inclusive, up to end, exclusive.
19653af6ab5fSopenharmony_ci     *
19663af6ab5fSopenharmony_ci     * @param { number } [begin] - The index of the beginning of the array.
19673af6ab5fSopenharmony_ci     * @param { number } [end] - The index of the end of the array.
19683af6ab5fSopenharmony_ci     * @returns { Uint8ClampedArray } A new Uint8ClampedArray object.
19693af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
19703af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The subarray method cannot be bound.
19713af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
19723af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
19733af6ab5fSopenharmony_ci     * @since 12
19743af6ab5fSopenharmony_ci     */
19753af6ab5fSopenharmony_ci    subarray(begin?: number, end?: number): Uint8ClampedArray;
19763af6ab5fSopenharmony_ci    /**
19773af6ab5fSopenharmony_ci     * Returns the item located at the specified index.
19783af6ab5fSopenharmony_ci     *
19793af6ab5fSopenharmony_ci     * @param { number } index - The zero-based index of the desired code unit.<br/>
19803af6ab5fSopenharmony_ci     *     A negative index will count back from the last item.
19813af6ab5fSopenharmony_ci     * @returns { number | undefined } The element in the array matching the given index.<br/>
19823af6ab5fSopenharmony_ci     *     Always returns undefined if index < -array.length or
19833af6ab5fSopenharmony_ci     *     index >= array.length without attempting to access the corresponding property.
19843af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
19853af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The at method cannot be bound.
19863af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
19873af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
19883af6ab5fSopenharmony_ci     * @since 12
19893af6ab5fSopenharmony_ci     */
19903af6ab5fSopenharmony_ci    at(index: number): number | undefined;
19913af6ab5fSopenharmony_ci    /**
19923af6ab5fSopenharmony_ci     * Returns an iterable of key, value pairs for every entry in the array
19933af6ab5fSopenharmony_ci     *
19943af6ab5fSopenharmony_ci     * @returns { IterableIterator<[number, number]> } A new iterable iterator object.
19953af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
19963af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
19973af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
19983af6ab5fSopenharmony_ci     * @since 12
19993af6ab5fSopenharmony_ci     */
20003af6ab5fSopenharmony_ci    entries(): IterableIterator<[number, number]>;
20013af6ab5fSopenharmony_ci    /**
20023af6ab5fSopenharmony_ci     * Returns an iterable of keys in the array
20033af6ab5fSopenharmony_ci     *
20043af6ab5fSopenharmony_ci     * @returns { IterableIterator<number> } A new iterable iterator object.
20053af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
20063af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
20073af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
20083af6ab5fSopenharmony_ci     * @since 12
20093af6ab5fSopenharmony_ci     */
20103af6ab5fSopenharmony_ci    keys(): IterableIterator<number>;
20113af6ab5fSopenharmony_ci    /**
20123af6ab5fSopenharmony_ci     * Returns an iterable of values in the array
20133af6ab5fSopenharmony_ci     *
20143af6ab5fSopenharmony_ci     * @returns { IterableIterator<number> } A new iterable iterator object.
20153af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
20163af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
20173af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
20183af6ab5fSopenharmony_ci     * @since 12
20193af6ab5fSopenharmony_ci     */
20203af6ab5fSopenharmony_ci    values(): IterableIterator<number>;
20213af6ab5fSopenharmony_ci    /**
20223af6ab5fSopenharmony_ci     * Determines whether an array includes a certain element, returning true or false as appropriate.
20233af6ab5fSopenharmony_ci     *
20243af6ab5fSopenharmony_ci     * @param { number } searchElement - The element to search for.
20253af6ab5fSopenharmony_ci     * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement.
20263af6ab5fSopenharmony_ci     * @returns { boolean } A boolean value which is true if the value searchElement is found <br/>
20273af6ab5fSopenharmony_ci     *     within the typed array (or the part of the typed array indicated by the index fromIndex, if specified).
20283af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
20293af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The at method cannot be bound.
20303af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
20313af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
20323af6ab5fSopenharmony_ci     * @since 12
20333af6ab5fSopenharmony_ci     */
20343af6ab5fSopenharmony_ci    includes(searchElement: number, fromIndex?: number): boolean;
20353af6ab5fSopenharmony_ci    /**
20363af6ab5fSopenharmony_ci     * Returns the item at that index.
20373af6ab5fSopenharmony_ci     * 
20383af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
20393af6ab5fSopenharmony_ci     * @since 12
20403af6ab5fSopenharmony_ci     */
20413af6ab5fSopenharmony_ci    [index: number]: number;
20423af6ab5fSopenharmony_ci  }
20433af6ab5fSopenharmony_ci
20443af6ab5fSopenharmony_ci  /**
20453af6ab5fSopenharmony_ci   * A typed array of 8-bit unsigned integer values. The contents are initialized to 0.
20463af6ab5fSopenharmony_ci   * If multiple threads access a Uint8Array instance concurrently, 
20473af6ab5fSopenharmony_ci   * and at least one of the threads modifies the array structurally,
20483af6ab5fSopenharmony_ci   * it must be synchronized externally.
20493af6ab5fSopenharmony_ci   *
20503af6ab5fSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
20513af6ab5fSopenharmony_ci   * @crossplatform
20523af6ab5fSopenharmony_ci   * @atomicservice
20533af6ab5fSopenharmony_ci   * @since 12
20543af6ab5fSopenharmony_ci   */
20553af6ab5fSopenharmony_ci  @Sendable
20563af6ab5fSopenharmony_ci  class Uint8Array {
20573af6ab5fSopenharmony_ci    /**
20583af6ab5fSopenharmony_ci     * The size in bytes of each element in the array.
20593af6ab5fSopenharmony_ci     *
20603af6ab5fSopenharmony_ci     * @type { number }
20613af6ab5fSopenharmony_ci     * @readonly
20623af6ab5fSopenharmony_ci     * @static
20633af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
20643af6ab5fSopenharmony_ci     * @crossplatform
20653af6ab5fSopenharmony_ci     * @atomicservice
20663af6ab5fSopenharmony_ci     * @since 12
20673af6ab5fSopenharmony_ci     */
20683af6ab5fSopenharmony_ci    public static readonly BYTES_PER_ELEMENT: number;
20693af6ab5fSopenharmony_ci    /**
20703af6ab5fSopenharmony_ci     * The ArrayBuffer instance referenced by the array.
20713af6ab5fSopenharmony_ci     *
20723af6ab5fSopenharmony_ci     * @type { ArrayBuffer }
20733af6ab5fSopenharmony_ci     * @readonly
20743af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
20753af6ab5fSopenharmony_ci     * @crossplatform
20763af6ab5fSopenharmony_ci     * @atomicservice
20773af6ab5fSopenharmony_ci     * @since 12
20783af6ab5fSopenharmony_ci     */
20793af6ab5fSopenharmony_ci    public readonly buffer: ArrayBuffer;
20803af6ab5fSopenharmony_ci    /**
20813af6ab5fSopenharmony_ci     * The length in bytes of the array.
20823af6ab5fSopenharmony_ci     *
20833af6ab5fSopenharmony_ci     * @type { number }
20843af6ab5fSopenharmony_ci     * @readonly
20853af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
20863af6ab5fSopenharmony_ci     * @crossplatform
20873af6ab5fSopenharmony_ci     * @atomicservice
20883af6ab5fSopenharmony_ci     * @since 12
20893af6ab5fSopenharmony_ci     */
20903af6ab5fSopenharmony_ci    public readonly byteLength: number;
20913af6ab5fSopenharmony_ci    /**
20923af6ab5fSopenharmony_ci     * The offset in bytes of the array.
20933af6ab5fSopenharmony_ci     *
20943af6ab5fSopenharmony_ci     * @type { number }
20953af6ab5fSopenharmony_ci     * @readonly
20963af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
20973af6ab5fSopenharmony_ci     * @crossplatform
20983af6ab5fSopenharmony_ci     * @atomicservice
20993af6ab5fSopenharmony_ci     * @since 12
21003af6ab5fSopenharmony_ci     */
21013af6ab5fSopenharmony_ci    public readonly byteOffset: number;
21023af6ab5fSopenharmony_ci    /**
21033af6ab5fSopenharmony_ci     * The length of the array.
21043af6ab5fSopenharmony_ci     *
21053af6ab5fSopenharmony_ci     * @type { number }
21063af6ab5fSopenharmony_ci     * @readonly
21073af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
21083af6ab5fSopenharmony_ci     * @crossplatform
21093af6ab5fSopenharmony_ci     * @atomicservice
21103af6ab5fSopenharmony_ci     * @since 12
21113af6ab5fSopenharmony_ci     */
21123af6ab5fSopenharmony_ci    public readonly length: number;
21133af6ab5fSopenharmony_ci    /**
21143af6ab5fSopenharmony_ci     * A constructor used to create an Uint8Array.
21153af6ab5fSopenharmony_ci     *
21163af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Uint8Array's constructor cannot be directly invoked.
21173af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
21183af6ab5fSopenharmony_ci     * @crossplatform
21193af6ab5fSopenharmony_ci     * @atomicservice
21203af6ab5fSopenharmony_ci     * @since 12
21213af6ab5fSopenharmony_ci     */
21223af6ab5fSopenharmony_ci    constructor();
21233af6ab5fSopenharmony_ci    /**
21243af6ab5fSopenharmony_ci     * A constructor used to create an Uint8Array.
21253af6ab5fSopenharmony_ci     *
21263af6ab5fSopenharmony_ci     * @param { number } length - The length of the array
21273af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Uint8Array's constructor cannot be directly invoked.
21283af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
21293af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
21303af6ab5fSopenharmony_ci     * @crossplatform
21313af6ab5fSopenharmony_ci     * @atomicservice
21323af6ab5fSopenharmony_ci     * @since 12
21333af6ab5fSopenharmony_ci     */
21343af6ab5fSopenharmony_ci    constructor(length: number);
21353af6ab5fSopenharmony_ci    /**
21363af6ab5fSopenharmony_ci     * A constructor used to create an Uint8Array.
21373af6ab5fSopenharmony_ci     *
21383af6ab5fSopenharmony_ci     * @param { ArrayLike<number> | ArrayBuffer } array - An array is initialized with the given elements
21393af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Uint8Array's constructor cannot be directly invoked.
21403af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
21413af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
21423af6ab5fSopenharmony_ci     * @crossplatform
21433af6ab5fSopenharmony_ci     * @atomicservice
21443af6ab5fSopenharmony_ci     * @since 12
21453af6ab5fSopenharmony_ci     */
21463af6ab5fSopenharmony_ci    constructor(array: ArrayLike<number> | ArrayBuffer);
21473af6ab5fSopenharmony_ci    /**
21483af6ab5fSopenharmony_ci     * A constructor used to create an Uint8Array.
21493af6ab5fSopenharmony_ci     *
21503af6ab5fSopenharmony_ci     * @param { ArrayBuffer } buffer - An array is initialized with the given elements
21513af6ab5fSopenharmony_ci     * @param { number } [byteOffset] - The byteOffset (in bytes) parameter specifies the memory range
21523af6ab5fSopenharmony_ci     *     that will be exposed by the typed array view.
21533af6ab5fSopenharmony_ci     * @param { number } [length] - The length parameter specifies the memory range
21543af6ab5fSopenharmony_ci     *     that will be exposed by the typed array view.
21553af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Uint8Array's constructor cannot be directly invoked.
21563af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
21573af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
21583af6ab5fSopenharmony_ci     * @crossplatform
21593af6ab5fSopenharmony_ci     * @atomicservice
21603af6ab5fSopenharmony_ci     * @since 12
21613af6ab5fSopenharmony_ci     */
21623af6ab5fSopenharmony_ci    constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number);
21633af6ab5fSopenharmony_ci    /**
21643af6ab5fSopenharmony_ci     * Creates an Uint8Array from an array-like object.
21653af6ab5fSopenharmony_ci     *
21663af6ab5fSopenharmony_ci     * @param { ArrayLike<number> } arrayLike - An array-like object to convert to an Uint8Array.
21673af6ab5fSopenharmony_ci     * @returns { Uint8Array } A new Uint8Array instance
21683af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
21693af6ab5fSopenharmony_ci     * @static
21703af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
21713af6ab5fSopenharmony_ci     * @crossplatform
21723af6ab5fSopenharmony_ci     * @atomicservice
21733af6ab5fSopenharmony_ci     * @since 12
21743af6ab5fSopenharmony_ci     */
21753af6ab5fSopenharmony_ci    static from(arrayLike: ArrayLike<number>): Uint8Array;
21763af6ab5fSopenharmony_ci    /**
21773af6ab5fSopenharmony_ci     * Creates an Uint8Array from an array-like object.
21783af6ab5fSopenharmony_ci     *
21793af6ab5fSopenharmony_ci     * @param { ArrayLike<T> } arrayLike - An array-like object to convert to an Uint8Array.
21803af6ab5fSopenharmony_ci     * @param { TypedArrayFromMapFn<T, number> } mapFn - A mapping function to call on every element of the array.
21813af6ab5fSopenharmony_ci     * @returns { Uint8Array } A new Uint8Array instance
21823af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
21833af6ab5fSopenharmony_ci     * @static
21843af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
21853af6ab5fSopenharmony_ci     * @crossplatform
21863af6ab5fSopenharmony_ci     * @atomicservice
21873af6ab5fSopenharmony_ci     * @since 12
21883af6ab5fSopenharmony_ci     */
21893af6ab5fSopenharmony_ci    static from<T>(arrayLike: ArrayLike<T>, mapFn: TypedArrayFromMapFn<T, number>): Uint8Array;
21903af6ab5fSopenharmony_ci    /**
21913af6ab5fSopenharmony_ci     * Creates an Uint8Array from an iterable object.
21923af6ab5fSopenharmony_ci     *
21933af6ab5fSopenharmony_ci     * @param { Iterable<number> } arrayLike - An iterable object to convert to an Uint8Array.
21943af6ab5fSopenharmony_ci     * @param { TypedArrayFromMapFn<number, number> } [mapFn] - A mapping function to
21953af6ab5fSopenharmony_ci     * call on every element of the array.
21963af6ab5fSopenharmony_ci     * @returns { Uint8Array } A new Uint8Array instance
21973af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
21983af6ab5fSopenharmony_ci     * @static
21993af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
22003af6ab5fSopenharmony_ci     * @crossplatform
22013af6ab5fSopenharmony_ci     * @atomicservice
22023af6ab5fSopenharmony_ci     * @since 12
22033af6ab5fSopenharmony_ci     */
22043af6ab5fSopenharmony_ci    static from(arrayLike: Iterable<number>, mapFn?: TypedArrayFromMapFn<number, number>): Uint8Array;
22053af6ab5fSopenharmony_ci    /**
22063af6ab5fSopenharmony_ci     * Returns the this object after copying a section of the array identified by start and end
22073af6ab5fSopenharmony_ci     * to the same array starting at position target.
22083af6ab5fSopenharmony_ci     *
22093af6ab5fSopenharmony_ci     * @param { number } target - If target is negative, it is treated as length+target where length is the
22103af6ab5fSopenharmony_ci     *     length of the array.
22113af6ab5fSopenharmony_ci     * @param { number } start - If start is negative, it is treated as length+start. If end is negative, it
22123af6ab5fSopenharmony_ci     *     is treated as length+end.
22133af6ab5fSopenharmony_ci     * @param { number } [end] - If not specified, length of the this object is used as its default value.
22143af6ab5fSopenharmony_ci     * @returns { Uint8Array } The array itself.
22153af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
22163af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound.
22173af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
22183af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
22193af6ab5fSopenharmony_ci     * @crossplatform
22203af6ab5fSopenharmony_ci     * @atomicservice
22213af6ab5fSopenharmony_ci     * @since 12
22223af6ab5fSopenharmony_ci     */
22233af6ab5fSopenharmony_ci    copyWithin(target: number, start: number, end?: number): Uint8Array;
22243af6ab5fSopenharmony_ci    /**
22253af6ab5fSopenharmony_ci     * Determines whether all the members of an array satisfy the specified test.
22263af6ab5fSopenharmony_ci     *
22273af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Uint8Array> } predicate - A function that accepts up to three arguments.
22283af6ab5fSopenharmony_ci     *     The every method calls the predicate function for each element in the array until
22293af6ab5fSopenharmony_ci     *     the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.
22303af6ab5fSopenharmony_ci     * @returns { boolean } true unless predicate returns a false value for a typed array element,
22313af6ab5fSopenharmony_ci     *     in which case false is immediately returned.
22323af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
22333af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The every method cannot be bound.
22343af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
22353af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
22363af6ab5fSopenharmony_ci     * @crossplatform
22373af6ab5fSopenharmony_ci     * @atomicservice
22383af6ab5fSopenharmony_ci     * @since 12
22393af6ab5fSopenharmony_ci     */
22403af6ab5fSopenharmony_ci    every(predicate: TypedArrayPredicateFn<number, Uint8Array>): boolean;
22413af6ab5fSopenharmony_ci    /**
22423af6ab5fSopenharmony_ci     * Returns the this object after filling the section identified by start and end with value.
22433af6ab5fSopenharmony_ci     *
22443af6ab5fSopenharmony_ci     * @param { number } value - value to fill array section with.
22453af6ab5fSopenharmony_ci     * @param { number } [start] - index to start filling the array at. If start is negative, it is treated as
22463af6ab5fSopenharmony_ci     *     length+start where length is the length of the array.
22473af6ab5fSopenharmony_ci     * @param { number } [end] - index to stop filling the array at. If end is negative, it is treated as
22483af6ab5fSopenharmony_ci     *     length+end.
22493af6ab5fSopenharmony_ci     * @returns { Uint8Array } The array itself.
22503af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
22513af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The fill method cannot be bound.
22523af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
22533af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
22543af6ab5fSopenharmony_ci     * @crossplatform
22553af6ab5fSopenharmony_ci     * @atomicservice
22563af6ab5fSopenharmony_ci     * @since 12
22573af6ab5fSopenharmony_ci     */
22583af6ab5fSopenharmony_ci    fill(value: number, start?: number, end?: number): Uint8Array;
22593af6ab5fSopenharmony_ci    /**
22603af6ab5fSopenharmony_ci     * Returns the elements of an array that meet the condition specified in a callback function.
22613af6ab5fSopenharmony_ci     *
22623af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Uint8Array> } predicate - A function that accepts up to three arguments.
22633af6ab5fSopenharmony_ci     *     The filter method calls the predicate function one time for each element in the array.
22643af6ab5fSopenharmony_ci     * @returns { Uint8Array } The array itself.
22653af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
22663af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The filter method cannot be bound.
22673af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
22683af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
22693af6ab5fSopenharmony_ci     * @crossplatform
22703af6ab5fSopenharmony_ci     * @atomicservice
22713af6ab5fSopenharmony_ci     * @since 12
22723af6ab5fSopenharmony_ci     */
22733af6ab5fSopenharmony_ci    filter(predicate: TypedArrayPredicateFn<number, Uint8Array>): Uint8Array;
22743af6ab5fSopenharmony_ci    /**
22753af6ab5fSopenharmony_ci     * Returns the value of the first element in the array where predicate is true, and undefined
22763af6ab5fSopenharmony_ci     * otherwise.
22773af6ab5fSopenharmony_ci     *
22783af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Uint8Array> } predicate - find calls predicate once for each element of
22793af6ab5fSopenharmony_ci     *     the array, in ascending order, until it finds one where predicate returns true.
22803af6ab5fSopenharmony_ci     *     If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.
22813af6ab5fSopenharmony_ci     * @returns { number | undefined } The first element in the typed array
22823af6ab5fSopenharmony_ci     *      that satisfies the provided testing function. Otherwise, undefined is returned.
22833af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
22843af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The find method cannot be bound.
22853af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
22863af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
22873af6ab5fSopenharmony_ci     * @crossplatform
22883af6ab5fSopenharmony_ci     * @atomicservice
22893af6ab5fSopenharmony_ci     * @since 12
22903af6ab5fSopenharmony_ci     */
22913af6ab5fSopenharmony_ci    find(predicate: TypedArrayPredicateFn<number, Uint8Array>): number | undefined;
22923af6ab5fSopenharmony_ci    /**
22933af6ab5fSopenharmony_ci     * Returns the index of the first element in the array where predicate is true, and -1
22943af6ab5fSopenharmony_ci     * otherwise.
22953af6ab5fSopenharmony_ci     *
22963af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Uint8Array> } predicate - find calls predicate once for each element of
22973af6ab5fSopenharmony_ci     *     the array, in ascending order, until it finds one where predicate returns true. If such an element is found,
22983af6ab5fSopenharmony_ci     *     findIndex immediately returns that element index. Otherwise, findIndex returns -1.
22993af6ab5fSopenharmony_ci     * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1.
23003af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
23013af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The findIndex method cannot be bound.
23023af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
23033af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
23043af6ab5fSopenharmony_ci     * @crossplatform
23053af6ab5fSopenharmony_ci     * @atomicservice
23063af6ab5fSopenharmony_ci     * @since 12
23073af6ab5fSopenharmony_ci     */
23083af6ab5fSopenharmony_ci    findIndex(predicate: TypedArrayPredicateFn<number, Uint8Array>): number;
23093af6ab5fSopenharmony_ci    /**
23103af6ab5fSopenharmony_ci     * Performs the specified action for each element in an array.
23113af6ab5fSopenharmony_ci     *
23123af6ab5fSopenharmony_ci     * @param { TypedArrayForEachCallback<number, Uint8Array> } callbackFn -  A function that
23133af6ab5fSopenharmony_ci     *     accepts up to three arguments.
23143af6ab5fSopenharmony_ci     *     forEach calls the callbackfn function one time for each element in the array.
23153af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
23163af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The forEach method cannot be bound.
23173af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
23183af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
23193af6ab5fSopenharmony_ci     * @crossplatform
23203af6ab5fSopenharmony_ci     * @atomicservice
23213af6ab5fSopenharmony_ci     * @since 12
23223af6ab5fSopenharmony_ci     */
23233af6ab5fSopenharmony_ci    forEach(callbackFn: TypedArrayForEachCallback<number, Uint8Array>): void;
23243af6ab5fSopenharmony_ci    /**
23253af6ab5fSopenharmony_ci     * Returns the index of the first occurrence of a value in an array.
23263af6ab5fSopenharmony_ci     *
23273af6ab5fSopenharmony_ci     * @param { number } searchElement - The value to locate in the array.
23283af6ab5fSopenharmony_ci     * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the
23293af6ab5fSopenharmony_ci     *      search starts at index 0.
23303af6ab5fSopenharmony_ci     * @returns { number } The first index of searchElement in the typed array; -1 if not found.
23313af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
23323af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The indexOf method cannot be bound.
23333af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
23343af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
23353af6ab5fSopenharmony_ci     * @crossplatform
23363af6ab5fSopenharmony_ci     * @atomicservice
23373af6ab5fSopenharmony_ci     * @since 12
23383af6ab5fSopenharmony_ci     */
23393af6ab5fSopenharmony_ci    indexOf(searchElement: number, fromIndex?: number): number;
23403af6ab5fSopenharmony_ci    /**
23413af6ab5fSopenharmony_ci     * Adds all the elements of an array separated by the specified separator string.
23423af6ab5fSopenharmony_ci     * @param { string } [separator] - A string used to separate one element of an array from the next in the
23433af6ab5fSopenharmony_ci     *     resulting String. If omitted, the array elements are separated with a comma.
23443af6ab5fSopenharmony_ci     * @returns { string } A string with all typed array elements joined.
23453af6ab5fSopenharmony_ci     *     If array.length is 0, the empty string is returned.
23463af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
23473af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The join method cannot be bound.
23483af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
23493af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
23503af6ab5fSopenharmony_ci     * @crossplatform
23513af6ab5fSopenharmony_ci     * @atomicservice
23523af6ab5fSopenharmony_ci     * @since 12
23533af6ab5fSopenharmony_ci     */
23543af6ab5fSopenharmony_ci    join(separator?: string): string;
23553af6ab5fSopenharmony_ci    /**
23563af6ab5fSopenharmony_ci     * Calls a defined callback function on each element of an array, and returns an array that
23573af6ab5fSopenharmony_ci     * contains the results.
23583af6ab5fSopenharmony_ci     *
23593af6ab5fSopenharmony_ci     * @param { TypedArrayForEachCallback<number, Uint8Array> } callbackFn - A function that
23603af6ab5fSopenharmony_ci     *     accepts up to three arguments.
23613af6ab5fSopenharmony_ci     *     The map method calls the callbackfn function one time for each element in the array.
23623af6ab5fSopenharmony_ci     * @returns { Uint8Array } The array itself.
23633af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
23643af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The map method cannot be bound.
23653af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
23663af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
23673af6ab5fSopenharmony_ci     * @crossplatform
23683af6ab5fSopenharmony_ci     * @atomicservice
23693af6ab5fSopenharmony_ci     * @since 12
23703af6ab5fSopenharmony_ci     */
23713af6ab5fSopenharmony_ci    map(callbackFn: TypedArrayForEachCallback<number, Uint8Array>): Uint8Array;
23723af6ab5fSopenharmony_ci    /**
23733af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array. The return value of
23743af6ab5fSopenharmony_ci     * the callback function is the accumulated result, and is provided as an argument in the next
23753af6ab5fSopenharmony_ci     * call to the callback function.
23763af6ab5fSopenharmony_ci     *
23773af6ab5fSopenharmony_ci     * @param { TypedArrayReduceCallback<number, number, Uint8Array> } callbackFn - A function that
23783af6ab5fSopenharmony_ci     *     accepts up to four arguments.
23793af6ab5fSopenharmony_ci     *     The reduce method calls the callbackfn function one time for each element in the array.
23803af6ab5fSopenharmony_ci     * @returns { number } The value that results from running the "reducer" callback function to
23813af6ab5fSopenharmony_ci     *     completion over the entire typed array.
23823af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
23833af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
23843af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
23853af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
23863af6ab5fSopenharmony_ci     * @crossplatform
23873af6ab5fSopenharmony_ci     * @atomicservice
23883af6ab5fSopenharmony_ci     * @since 12
23893af6ab5fSopenharmony_ci     */
23903af6ab5fSopenharmony_ci    reduce(callbackFn: TypedArrayReduceCallback<number, number, Uint8Array>): number;
23913af6ab5fSopenharmony_ci    /**
23923af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array. The return value of
23933af6ab5fSopenharmony_ci     * the callback function is the accumulated result, and is provided as an argument in the next
23943af6ab5fSopenharmony_ci     * call to the callback function.
23953af6ab5fSopenharmony_ci     *
23963af6ab5fSopenharmony_ci     * @param { TypedArrayReduceCallback<number, number, Uint8Array> } callbackFn - A function that
23973af6ab5fSopenharmony_ci     *     accepts up to four arguments.
23983af6ab5fSopenharmony_ci     *     The reduce method calls the callbackfn function one time for each element in the array.
23993af6ab5fSopenharmony_ci     * @param { number } initialValue - If initialValue is specified, it is used as the initial value to start
24003af6ab5fSopenharmony_ci     *     the accumulation. The first call to the callbackfn function provides this value as an argument
24013af6ab5fSopenharmony_ci     *     instead of an array value.
24023af6ab5fSopenharmony_ci     * @returns { number } The value that results from running the "reducer" callback function to
24033af6ab5fSopenharmony_ci     *     completion over the entire typed array.
24043af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
24053af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
24063af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
24073af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
24083af6ab5fSopenharmony_ci     * @crossplatform
24093af6ab5fSopenharmony_ci     * @atomicservice
24103af6ab5fSopenharmony_ci     * @since 12
24113af6ab5fSopenharmony_ci     */
24123af6ab5fSopenharmony_ci    reduce(callbackFn: TypedArrayReduceCallback<number, number, Uint8Array>, initialValue: number): number;
24133af6ab5fSopenharmony_ci    /**
24143af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array. The return value of
24153af6ab5fSopenharmony_ci     * the callback function is the accumulated result, and is provided as an argument in the next
24163af6ab5fSopenharmony_ci     * call to the callback function.
24173af6ab5fSopenharmony_ci     *
24183af6ab5fSopenharmony_ci     * @param { TypedArrayReduceCallback<U, number, Uint8Array> } callbackFn - A function that
24193af6ab5fSopenharmony_ci     *     accepts up to four arguments.
24203af6ab5fSopenharmony_ci     *     The reduce method calls the callbackfn function one time for each element in the array.
24213af6ab5fSopenharmony_ci     * @param { U } initialValue - If initialValue is specified, it is used as the initial value to start
24223af6ab5fSopenharmony_ci     *     the accumulation. The first call to the callbackfn function provides this value as an argument
24233af6ab5fSopenharmony_ci     *     instead of an array value.
24243af6ab5fSopenharmony_ci     * @returns { U } The value that results from running the "reducer" callback function to
24253af6ab5fSopenharmony_ci     *     completion over the entire typed array.
24263af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
24273af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
24283af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
24293af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
24303af6ab5fSopenharmony_ci     * @crossplatform
24313af6ab5fSopenharmony_ci     * @atomicservice
24323af6ab5fSopenharmony_ci     * @since 12
24333af6ab5fSopenharmony_ci     */
24343af6ab5fSopenharmony_ci    reduce<U>(callbackFn: TypedArrayReduceCallback<U, number, Uint8Array>, initialValue: U): U;
24353af6ab5fSopenharmony_ci    /**
24363af6ab5fSopenharmony_ci     * Reverses the elements in an Array.
24373af6ab5fSopenharmony_ci     *
24383af6ab5fSopenharmony_ci     * @returns { Uint8Array } The reference to the original typed array, now reversed.
24393af6ab5fSopenharmony_ci     *     <br>Note that the typed array is reversed in place, and no copy is made.
24403af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reverse method cannot be bound.
24413af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
24423af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
24433af6ab5fSopenharmony_ci     * @crossplatform
24443af6ab5fSopenharmony_ci     * @atomicservice
24453af6ab5fSopenharmony_ci     * @since 12
24463af6ab5fSopenharmony_ci     */
24473af6ab5fSopenharmony_ci    reverse(): Uint8Array;
24483af6ab5fSopenharmony_ci    /**
24493af6ab5fSopenharmony_ci     * Sets a value or an array of values.
24503af6ab5fSopenharmony_ci     *
24513af6ab5fSopenharmony_ci     * @param { ArrayLike<number> } array - A typed or untyped array of values to set.
24523af6ab5fSopenharmony_ci     * @param { number } [offset] - The index in the current array at which the values are to be written.
24533af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
24543af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The set method cannot be bound.
24553af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
24563af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
24573af6ab5fSopenharmony_ci     * @crossplatform
24583af6ab5fSopenharmony_ci     * @atomicservice
24593af6ab5fSopenharmony_ci     * @since 12
24603af6ab5fSopenharmony_ci     */
24613af6ab5fSopenharmony_ci    set(array: ArrayLike<number>, offset?: number): void;
24623af6ab5fSopenharmony_ci    /**
24633af6ab5fSopenharmony_ci     * Returns a section of an array.
24643af6ab5fSopenharmony_ci     *
24653af6ab5fSopenharmony_ci     * @param { number } [start] - The beginning of the specified portion of the array.
24663af6ab5fSopenharmony_ci     * @param { number } [end] - The end of the specified portion of the array.
24673af6ab5fSopenharmony_ci     *     This is exclusive of the element at the index 'end'.
24683af6ab5fSopenharmony_ci     * @returns { Uint8Array } A new typed array containing the extracted elements.
24693af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
24703af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The slice method cannot be bound.
24713af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
24723af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
24733af6ab5fSopenharmony_ci     * @crossplatform
24743af6ab5fSopenharmony_ci     * @atomicservice
24753af6ab5fSopenharmony_ci     * @since 12
24763af6ab5fSopenharmony_ci     */
24773af6ab5fSopenharmony_ci    slice(start?: number, end?: number): Uint8Array;
24783af6ab5fSopenharmony_ci    /**
24793af6ab5fSopenharmony_ci     * Determines whether the specified callback function returns true for any element of an array.
24803af6ab5fSopenharmony_ci     *
24813af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Uint8Array> } predicate - A function that accepts up to three arguments.
24823af6ab5fSopenharmony_ci     *     The some method calls the predicate function for each element in the array until
24833af6ab5fSopenharmony_ci     *     the predicate returns a value which is coercible to the Boolean value true, or until the end of the array.
24843af6ab5fSopenharmony_ci     * @returns { boolean } false unless predicate returns a truthy value for a typed array element,
24853af6ab5fSopenharmony_ci     *     in which case true is immediately returned.
24863af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
24873af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The some method cannot be bound.
24883af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
24893af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
24903af6ab5fSopenharmony_ci     * @crossplatform
24913af6ab5fSopenharmony_ci     * @atomicservice
24923af6ab5fSopenharmony_ci     * @since 12
24933af6ab5fSopenharmony_ci     */
24943af6ab5fSopenharmony_ci    some(predicate: TypedArrayPredicateFn<number, Uint8Array>): boolean;
24953af6ab5fSopenharmony_ci    /**
24963af6ab5fSopenharmony_ci     * Sorts an array.
24973af6ab5fSopenharmony_ci     *
24983af6ab5fSopenharmony_ci     * @param { TypedArrayCompareFn<number> } [compareFn] - Function used to determine the order of the elements.
24993af6ab5fSopenharmony_ci     *     It is expected to return a negative value if first argument is less than second argument,
25003af6ab5fSopenharmony_ci     *     zero if they're equal and a positive value otherwise.
25013af6ab5fSopenharmony_ci     *     If omitted, the elements are sorted in ascending, ASCII character order.
25023af6ab5fSopenharmony_ci     * @returns { Uint8Array } The reference to the original typed array, now sorted.
25033af6ab5fSopenharmony_ci     *     Note that the typed array is sorted in place and no copy is made.
25043af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
25053af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The sort method cannot be bound.
25063af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
25073af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
25083af6ab5fSopenharmony_ci     * @crossplatform
25093af6ab5fSopenharmony_ci     * @atomicservice
25103af6ab5fSopenharmony_ci     * @since 12
25113af6ab5fSopenharmony_ci     */
25123af6ab5fSopenharmony_ci    sort(compareFn?: TypedArrayCompareFn<number>): Uint8Array;
25133af6ab5fSopenharmony_ci    /**
25143af6ab5fSopenharmony_ci     * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements
25153af6ab5fSopenharmony_ci     * at begin, inclusive, up to end, exclusive.
25163af6ab5fSopenharmony_ci     *
25173af6ab5fSopenharmony_ci     * @param { number } [begin] - The index of the beginning of the array.
25183af6ab5fSopenharmony_ci     * @param { number } [end] - The index of the end of the array.
25193af6ab5fSopenharmony_ci     * @returns { Uint8Array } A new Uint8Array object.
25203af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
25213af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The subarray method cannot be bound.
25223af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
25233af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
25243af6ab5fSopenharmony_ci     * @crossplatform
25253af6ab5fSopenharmony_ci     * @atomicservice
25263af6ab5fSopenharmony_ci     * @since 12
25273af6ab5fSopenharmony_ci     */
25283af6ab5fSopenharmony_ci    subarray(begin?: number, end?: number): Uint8Array;
25293af6ab5fSopenharmony_ci    /**
25303af6ab5fSopenharmony_ci     * Returns the item located at the specified index.
25313af6ab5fSopenharmony_ci     *
25323af6ab5fSopenharmony_ci     * @param { number } index - The zero-based index of the desired code unit.<br/>
25333af6ab5fSopenharmony_ci     *     A negative index will count back from the last item.
25343af6ab5fSopenharmony_ci     * @returns { number | undefined } The element in the array matching the given index.<br/>
25353af6ab5fSopenharmony_ci     *     Always returns undefined if index < -array.length or
25363af6ab5fSopenharmony_ci     *     index >= array.length without attempting to access the corresponding property.
25373af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
25383af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The at method cannot be bound.
25393af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
25403af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
25413af6ab5fSopenharmony_ci     * @crossplatform
25423af6ab5fSopenharmony_ci     * @atomicservice
25433af6ab5fSopenharmony_ci     * @since 12
25443af6ab5fSopenharmony_ci     */
25453af6ab5fSopenharmony_ci    at(index: number): number | undefined;
25463af6ab5fSopenharmony_ci    /**
25473af6ab5fSopenharmony_ci     * Returns an iterable of key, value pairs for every entry in the array
25483af6ab5fSopenharmony_ci     *
25493af6ab5fSopenharmony_ci     * @returns { IterableIterator<[number, number]> } A new iterable iterator object.
25503af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
25513af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
25523af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
25533af6ab5fSopenharmony_ci     * @crossplatform
25543af6ab5fSopenharmony_ci     * @atomicservice
25553af6ab5fSopenharmony_ci     * @since 12
25563af6ab5fSopenharmony_ci     */
25573af6ab5fSopenharmony_ci    entries(): IterableIterator<[number, number]>;
25583af6ab5fSopenharmony_ci    /**
25593af6ab5fSopenharmony_ci     * Returns an iterable of keys in the array
25603af6ab5fSopenharmony_ci     *
25613af6ab5fSopenharmony_ci     * @returns { IterableIterator<number> } A new iterable iterator object.
25623af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
25633af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
25643af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
25653af6ab5fSopenharmony_ci     * @crossplatform
25663af6ab5fSopenharmony_ci     * @atomicservice
25673af6ab5fSopenharmony_ci     * @since 12
25683af6ab5fSopenharmony_ci     */
25693af6ab5fSopenharmony_ci    keys(): IterableIterator<number>;
25703af6ab5fSopenharmony_ci    /**
25713af6ab5fSopenharmony_ci     * Returns an iterable of values in the array
25723af6ab5fSopenharmony_ci     *
25733af6ab5fSopenharmony_ci     * @returns { IterableIterator<number> } A new iterable iterator object.
25743af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
25753af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
25763af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
25773af6ab5fSopenharmony_ci     * @crossplatform
25783af6ab5fSopenharmony_ci     * @atomicservice
25793af6ab5fSopenharmony_ci     * @since 12
25803af6ab5fSopenharmony_ci     */
25813af6ab5fSopenharmony_ci    values(): IterableIterator<number>;
25823af6ab5fSopenharmony_ci    /**
25833af6ab5fSopenharmony_ci     * Determines whether an array includes a certain element, returning true or false as appropriate.
25843af6ab5fSopenharmony_ci     *
25853af6ab5fSopenharmony_ci     * @param { number } searchElement - The element to search for.
25863af6ab5fSopenharmony_ci     * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement.
25873af6ab5fSopenharmony_ci     * @returns { boolean } A boolean value which is true if the value searchElement is found <br/>
25883af6ab5fSopenharmony_ci     *     within the typed array (or the part of the typed array indicated by the index fromIndex, if specified).
25893af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
25903af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The at method cannot be bound.
25913af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
25923af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
25933af6ab5fSopenharmony_ci     * @crossplatform
25943af6ab5fSopenharmony_ci     * @atomicservice
25953af6ab5fSopenharmony_ci     * @since 12
25963af6ab5fSopenharmony_ci     */
25973af6ab5fSopenharmony_ci    includes(searchElement: number, fromIndex?: number): boolean;
25983af6ab5fSopenharmony_ci    /**
25993af6ab5fSopenharmony_ci     * Returns the item at that index.
26003af6ab5fSopenharmony_ci     * 
26013af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
26023af6ab5fSopenharmony_ci     * @crossplatform
26033af6ab5fSopenharmony_ci     * @atomicservice
26043af6ab5fSopenharmony_ci     * @since 12
26053af6ab5fSopenharmony_ci     */
26063af6ab5fSopenharmony_ci    [index: number]: number;
26073af6ab5fSopenharmony_ci  }
26083af6ab5fSopenharmony_ci
26093af6ab5fSopenharmony_ci  /**
26103af6ab5fSopenharmony_ci   * A typed array of 16-bit integer values. The contents are initialized to 0.
26113af6ab5fSopenharmony_ci   * If multiple threads access a Int16Array instance concurrently, 
26123af6ab5fSopenharmony_ci   * and at least one of the threads modifies the array structurally,
26133af6ab5fSopenharmony_ci   * it must be synchronized externally. 
26143af6ab5fSopenharmony_ci   *
26153af6ab5fSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
26163af6ab5fSopenharmony_ci   * @crossplatform
26173af6ab5fSopenharmony_ci   * @atomicservice
26183af6ab5fSopenharmony_ci   * @since 12
26193af6ab5fSopenharmony_ci   */
26203af6ab5fSopenharmony_ci  @Sendable
26213af6ab5fSopenharmony_ci  class Int16Array {
26223af6ab5fSopenharmony_ci    /**
26233af6ab5fSopenharmony_ci     * The size in bytes of each element in the array.
26243af6ab5fSopenharmony_ci     *
26253af6ab5fSopenharmony_ci     * @type { number }
26263af6ab5fSopenharmony_ci     * @readonly
26273af6ab5fSopenharmony_ci     * @static
26283af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
26293af6ab5fSopenharmony_ci     * @crossplatform
26303af6ab5fSopenharmony_ci     * @atomicservice
26313af6ab5fSopenharmony_ci     * @since 12
26323af6ab5fSopenharmony_ci     */
26333af6ab5fSopenharmony_ci    public static readonly BYTES_PER_ELEMENT: number;
26343af6ab5fSopenharmony_ci    /**
26353af6ab5fSopenharmony_ci     * The ArrayBuffer instance referenced by the array.
26363af6ab5fSopenharmony_ci     *
26373af6ab5fSopenharmony_ci     * @type { ArrayBuffer }
26383af6ab5fSopenharmony_ci     * @readonly
26393af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
26403af6ab5fSopenharmony_ci     * @crossplatform
26413af6ab5fSopenharmony_ci     * @atomicservice
26423af6ab5fSopenharmony_ci     * @since 12
26433af6ab5fSopenharmony_ci     */
26443af6ab5fSopenharmony_ci    public readonly buffer: ArrayBuffer;
26453af6ab5fSopenharmony_ci    /**
26463af6ab5fSopenharmony_ci     * The length in bytes of the array.
26473af6ab5fSopenharmony_ci     *
26483af6ab5fSopenharmony_ci     * @type { number }
26493af6ab5fSopenharmony_ci     * @readonly
26503af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
26513af6ab5fSopenharmony_ci     * @crossplatform
26523af6ab5fSopenharmony_ci     * @atomicservice
26533af6ab5fSopenharmony_ci     * @since 12
26543af6ab5fSopenharmony_ci     */
26553af6ab5fSopenharmony_ci    public readonly byteLength: number;
26563af6ab5fSopenharmony_ci    /**
26573af6ab5fSopenharmony_ci     * The offset in bytes of the array.
26583af6ab5fSopenharmony_ci     *
26593af6ab5fSopenharmony_ci     * @type { number }
26603af6ab5fSopenharmony_ci     * @readonly
26613af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
26623af6ab5fSopenharmony_ci     * @crossplatform
26633af6ab5fSopenharmony_ci     * @atomicservice
26643af6ab5fSopenharmony_ci     * @since 12
26653af6ab5fSopenharmony_ci     */
26663af6ab5fSopenharmony_ci    public readonly byteOffset: number;
26673af6ab5fSopenharmony_ci    /**
26683af6ab5fSopenharmony_ci     * The length of the array.
26693af6ab5fSopenharmony_ci     *
26703af6ab5fSopenharmony_ci     * @type { number }
26713af6ab5fSopenharmony_ci     * @readonly
26723af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
26733af6ab5fSopenharmony_ci     * @crossplatform
26743af6ab5fSopenharmony_ci     * @atomicservice
26753af6ab5fSopenharmony_ci     * @since 12
26763af6ab5fSopenharmony_ci     */
26773af6ab5fSopenharmony_ci    public readonly length: number;
26783af6ab5fSopenharmony_ci    /**
26793af6ab5fSopenharmony_ci     * A constructor used to create an Int16Array.
26803af6ab5fSopenharmony_ci     *
26813af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Int16Array's constructor cannot be directly invoked.
26823af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
26833af6ab5fSopenharmony_ci     * @crossplatform
26843af6ab5fSopenharmony_ci     * @atomicservice
26853af6ab5fSopenharmony_ci     * @since 12
26863af6ab5fSopenharmony_ci     */
26873af6ab5fSopenharmony_ci    constructor();
26883af6ab5fSopenharmony_ci    /**
26893af6ab5fSopenharmony_ci     * A constructor used to create an Int16Array.
26903af6ab5fSopenharmony_ci     *
26913af6ab5fSopenharmony_ci     * @param { number } length - The length of the array
26923af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Int16Array's constructor cannot be directly invoked.
26933af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
26943af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
26953af6ab5fSopenharmony_ci     * @crossplatform
26963af6ab5fSopenharmony_ci     * @atomicservice
26973af6ab5fSopenharmony_ci     * @since 12
26983af6ab5fSopenharmony_ci     */
26993af6ab5fSopenharmony_ci    constructor(length: number);
27003af6ab5fSopenharmony_ci    /**
27013af6ab5fSopenharmony_ci     * A constructor used to create an Int16Array.
27023af6ab5fSopenharmony_ci     *
27033af6ab5fSopenharmony_ci     * @param { ArrayLike<number> | ArrayBuffer } array - An array is initialized with the given elements
27043af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Int16Array's constructor cannot be directly invoked.
27053af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
27063af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
27073af6ab5fSopenharmony_ci     * @crossplatform
27083af6ab5fSopenharmony_ci     * @atomicservice
27093af6ab5fSopenharmony_ci     * @since 12
27103af6ab5fSopenharmony_ci     */
27113af6ab5fSopenharmony_ci    constructor(array: ArrayLike<number> | ArrayBuffer);
27123af6ab5fSopenharmony_ci    /**
27133af6ab5fSopenharmony_ci     * A constructor used to create an Int16Array.
27143af6ab5fSopenharmony_ci     *
27153af6ab5fSopenharmony_ci     * @param { ArrayBuffer } buffer - An array is initialized with the given elements
27163af6ab5fSopenharmony_ci     * @param { number } [byteOffset] - The byteOffset (in bytes) parameter specifies the memory range
27173af6ab5fSopenharmony_ci     *     that will be exposed by the typed array view.
27183af6ab5fSopenharmony_ci     * @param { number } [length] - The length parameter specifies the memory range
27193af6ab5fSopenharmony_ci     *     that will be exposed by the typed array view.
27203af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Int16Array's constructor cannot be directly invoked.
27213af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
27223af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
27233af6ab5fSopenharmony_ci     * @crossplatform
27243af6ab5fSopenharmony_ci     * @atomicservice
27253af6ab5fSopenharmony_ci     * @since 12
27263af6ab5fSopenharmony_ci     */
27273af6ab5fSopenharmony_ci    constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number);
27283af6ab5fSopenharmony_ci    /**
27293af6ab5fSopenharmony_ci     * Creates an Int16Array from an array-like object.
27303af6ab5fSopenharmony_ci     *
27313af6ab5fSopenharmony_ci     * @param { ArrayLike<number> } arrayLike - An array-like object to convert to an Int16Array.
27323af6ab5fSopenharmony_ci     * @returns { Int16Array } A new Int16Array instance
27333af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
27343af6ab5fSopenharmony_ci     * @static
27353af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
27363af6ab5fSopenharmony_ci     * @crossplatform
27373af6ab5fSopenharmony_ci     * @atomicservice
27383af6ab5fSopenharmony_ci     * @since 12
27393af6ab5fSopenharmony_ci     */
27403af6ab5fSopenharmony_ci    static from(arrayLike: ArrayLike<number>): Int16Array;
27413af6ab5fSopenharmony_ci    /**
27423af6ab5fSopenharmony_ci     * Creates an Int16Array from an array-like object.
27433af6ab5fSopenharmony_ci     *
27443af6ab5fSopenharmony_ci     * @param { ArrayLike<T> } arrayLike - An array-like object to convert to an Int16Array.
27453af6ab5fSopenharmony_ci     * @param { TypedArrayFromMapFn<T, number> } mapFn - A mapping function to call on every element of the array.
27463af6ab5fSopenharmony_ci     * @returns { Int16Array } A new Int16Array instance
27473af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
27483af6ab5fSopenharmony_ci     * @static
27493af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
27503af6ab5fSopenharmony_ci     * @crossplatform
27513af6ab5fSopenharmony_ci     * @atomicservice
27523af6ab5fSopenharmony_ci     * @since 12
27533af6ab5fSopenharmony_ci     */
27543af6ab5fSopenharmony_ci    static from<T>(arrayLike: ArrayLike<T>, mapFn: TypedArrayFromMapFn<T, number>): Int16Array;
27553af6ab5fSopenharmony_ci    /**
27563af6ab5fSopenharmony_ci     * Creates an Int16Array from an iterable object.
27573af6ab5fSopenharmony_ci     *
27583af6ab5fSopenharmony_ci     * @param { Iterable<number> } arrayLike - An iterable object to convert to an Int16Array.
27593af6ab5fSopenharmony_ci     * @param { TypedArrayFromMapFn<number, number> } [mapFn] - A mapping function to
27603af6ab5fSopenharmony_ci     *     call on every element of the array.
27613af6ab5fSopenharmony_ci     * @returns { Int16Array } A new Int16Array instance
27623af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
27633af6ab5fSopenharmony_ci     * @static
27643af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
27653af6ab5fSopenharmony_ci     * @crossplatform
27663af6ab5fSopenharmony_ci     * @atomicservice
27673af6ab5fSopenharmony_ci     * @since 12
27683af6ab5fSopenharmony_ci     */
27693af6ab5fSopenharmony_ci    static from(arrayLike: Iterable<number>, mapFn?: TypedArrayFromMapFn<number, number>): Int16Array;
27703af6ab5fSopenharmony_ci    /**
27713af6ab5fSopenharmony_ci     * Returns the this object after copying a section of the array identified by start and end
27723af6ab5fSopenharmony_ci     * to the same array starting at position target.
27733af6ab5fSopenharmony_ci     *
27743af6ab5fSopenharmony_ci     * @param { number } target - If target is negative, it is treated as length+target where length is the
27753af6ab5fSopenharmony_ci     *     length of the array.
27763af6ab5fSopenharmony_ci     * @param { number } start - If start is negative, it is treated as length+start. If end is negative, it
27773af6ab5fSopenharmony_ci     *     is treated as length+end.
27783af6ab5fSopenharmony_ci     * @param { number } [end] - If not specified, length of the this object is used as its default value.
27793af6ab5fSopenharmony_ci     * @returns { Int16Array } The array itself.
27803af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
27813af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound.
27823af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
27833af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
27843af6ab5fSopenharmony_ci     * @crossplatform
27853af6ab5fSopenharmony_ci     * @atomicservice
27863af6ab5fSopenharmony_ci     * @since 12
27873af6ab5fSopenharmony_ci     */
27883af6ab5fSopenharmony_ci    copyWithin(target: number, start: number, end?: number): Int16Array;
27893af6ab5fSopenharmony_ci    /**
27903af6ab5fSopenharmony_ci     * Determines whether all the members of an array satisfy the specified test.
27913af6ab5fSopenharmony_ci     *
27923af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Int16Array> } predicate - A function that accepts up to three arguments.
27933af6ab5fSopenharmony_ci     *     The every method calls the predicate function for each element in the array until
27943af6ab5fSopenharmony_ci     *     the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.
27953af6ab5fSopenharmony_ci     * @returns { boolean } true unless predicate returns a false value for a typed array element,
27963af6ab5fSopenharmony_ci     *     in which case false is immediately returned.
27973af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
27983af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The every method cannot be bound.
27993af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
28003af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
28013af6ab5fSopenharmony_ci     * @crossplatform
28023af6ab5fSopenharmony_ci     * @atomicservice
28033af6ab5fSopenharmony_ci     * @since 12
28043af6ab5fSopenharmony_ci     */
28053af6ab5fSopenharmony_ci    every(predicate: TypedArrayPredicateFn<number, Int16Array>): boolean;
28063af6ab5fSopenharmony_ci    /**
28073af6ab5fSopenharmony_ci     * Returns the this object after filling the section identified by start and end with value.
28083af6ab5fSopenharmony_ci     *
28093af6ab5fSopenharmony_ci     * @param { number } value - value to fill array section with.
28103af6ab5fSopenharmony_ci     * @param { number } [start] - index to start filling the array at. If start is negative, it is treated as
28113af6ab5fSopenharmony_ci     *     length+start where length is the length of the array.
28123af6ab5fSopenharmony_ci     * @param { number } [end] - index to stop filling the array at. If end is negative, it is treated as
28133af6ab5fSopenharmony_ci     *     length+end.
28143af6ab5fSopenharmony_ci     * @returns { Int16Array } The array itself.
28153af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
28163af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The fill method cannot be bound.
28173af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
28183af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
28193af6ab5fSopenharmony_ci     * @crossplatform
28203af6ab5fSopenharmony_ci     * @atomicservice
28213af6ab5fSopenharmony_ci     * @since 12
28223af6ab5fSopenharmony_ci     */
28233af6ab5fSopenharmony_ci    fill(value: number, start?: number, end?: number): Int16Array;
28243af6ab5fSopenharmony_ci    /**
28253af6ab5fSopenharmony_ci     * Returns the elements of an array that meet the condition specified in a callback function.
28263af6ab5fSopenharmony_ci     *
28273af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Int16Array> } predicate - A function that accepts up to three arguments.
28283af6ab5fSopenharmony_ci     *     The filter method calls the predicate function one time for each element in the array.
28293af6ab5fSopenharmony_ci     * @returns { Int16Array } The array itself.
28303af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
28313af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The filter method cannot be bound.
28323af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
28333af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
28343af6ab5fSopenharmony_ci     * @crossplatform
28353af6ab5fSopenharmony_ci     * @atomicservice
28363af6ab5fSopenharmony_ci     * @since 12
28373af6ab5fSopenharmony_ci     */
28383af6ab5fSopenharmony_ci    filter(predicate: TypedArrayPredicateFn<number, Int16Array>): Int16Array;
28393af6ab5fSopenharmony_ci    /**
28403af6ab5fSopenharmony_ci     * Returns the value of the first element in the array where predicate is true, and undefined
28413af6ab5fSopenharmony_ci     * otherwise.
28423af6ab5fSopenharmony_ci     *
28433af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Int16Array> } predicate - find calls predicate once for each element of
28443af6ab5fSopenharmony_ci     *     the array, in ascending order, until it finds one where predicate returns true.
28453af6ab5fSopenharmony_ci     *     If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.
28463af6ab5fSopenharmony_ci     * @returns { number | undefined } The first element in the typed array
28473af6ab5fSopenharmony_ci     *     that satisfies the provided testing function. Otherwise, undefined is returned.
28483af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
28493af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The find method cannot be bound.
28503af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
28513af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
28523af6ab5fSopenharmony_ci     * @crossplatform
28533af6ab5fSopenharmony_ci     * @atomicservice
28543af6ab5fSopenharmony_ci     * @since 12
28553af6ab5fSopenharmony_ci     */
28563af6ab5fSopenharmony_ci    find(predicate: TypedArrayPredicateFn<number, Int16Array>): number | undefined;
28573af6ab5fSopenharmony_ci    /**
28583af6ab5fSopenharmony_ci     * Returns the index of the first element in the array where predicate is true, and -1
28593af6ab5fSopenharmony_ci     * otherwise.
28603af6ab5fSopenharmony_ci     *
28613af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Int16Array> } predicate - find calls predicate once for each element of
28623af6ab5fSopenharmony_ci     *     the array, in ascending order, until it finds one where predicate returns true. If such an element is found,
28633af6ab5fSopenharmony_ci     *     findIndex immediately returns that element index. Otherwise, findIndex returns -1.
28643af6ab5fSopenharmony_ci     * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1.
28653af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
28663af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The findIndex method cannot be bound.
28673af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
28683af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
28693af6ab5fSopenharmony_ci     * @crossplatform
28703af6ab5fSopenharmony_ci     * @atomicservice
28713af6ab5fSopenharmony_ci     * @since 12
28723af6ab5fSopenharmony_ci     */
28733af6ab5fSopenharmony_ci    findIndex(predicate: TypedArrayPredicateFn<number, Int16Array>): number;
28743af6ab5fSopenharmony_ci    /**
28753af6ab5fSopenharmony_ci     * Performs the specified action for each element in an array.
28763af6ab5fSopenharmony_ci     *
28773af6ab5fSopenharmony_ci     * @param { TypedArrayForEachCallback<number, Int16Array> } callbackFn -  A function that
28783af6ab5fSopenharmony_ci     *     accepts up to three arguments.
28793af6ab5fSopenharmony_ci     *     forEach calls the callbackfn function one time for each element in the array.
28803af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
28813af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The forEach method cannot be bound.
28823af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
28833af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
28843af6ab5fSopenharmony_ci     * @crossplatform
28853af6ab5fSopenharmony_ci     * @atomicservice
28863af6ab5fSopenharmony_ci     * @since 12
28873af6ab5fSopenharmony_ci     */
28883af6ab5fSopenharmony_ci    forEach(callbackFn: TypedArrayForEachCallback<number, Int16Array>): void;
28893af6ab5fSopenharmony_ci    /**
28903af6ab5fSopenharmony_ci     * Returns the index of the first occurrence of a value in an array.
28913af6ab5fSopenharmony_ci     *
28923af6ab5fSopenharmony_ci     * @param { number } searchElement - The value to locate in the array.
28933af6ab5fSopenharmony_ci     * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the
28943af6ab5fSopenharmony_ci     *      search starts at index 0.
28953af6ab5fSopenharmony_ci     * @returns { number } The first index of searchElement in the typed array; -1 if not found.
28963af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
28973af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The indexOf method cannot be bound.
28983af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
28993af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
29003af6ab5fSopenharmony_ci     * @crossplatform
29013af6ab5fSopenharmony_ci     * @atomicservice
29023af6ab5fSopenharmony_ci     * @since 12
29033af6ab5fSopenharmony_ci     */
29043af6ab5fSopenharmony_ci    indexOf(searchElement: number, fromIndex?: number): number;
29053af6ab5fSopenharmony_ci    /**
29063af6ab5fSopenharmony_ci     * Adds all the elements of an array separated by the specified separator string.
29073af6ab5fSopenharmony_ci     * @param { string } [separator] - A string used to separate one element of an array from the next in the
29083af6ab5fSopenharmony_ci     *     resulting String. If omitted, the array elements are separated with a comma.
29093af6ab5fSopenharmony_ci     * @returns { string } A string with all typed array elements joined.
29103af6ab5fSopenharmony_ci     *     If array.length is 0, the empty string is returned.
29113af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
29123af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The join method cannot be bound.
29133af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
29143af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
29153af6ab5fSopenharmony_ci     * @crossplatform
29163af6ab5fSopenharmony_ci     * @atomicservice
29173af6ab5fSopenharmony_ci     * @since 12
29183af6ab5fSopenharmony_ci     */
29193af6ab5fSopenharmony_ci    join(separator?: string): string;
29203af6ab5fSopenharmony_ci    /**
29213af6ab5fSopenharmony_ci     * Calls a defined callback function on each element of an array, and returns an array that
29223af6ab5fSopenharmony_ci     * contains the results.
29233af6ab5fSopenharmony_ci     *
29243af6ab5fSopenharmony_ci     * @param { TypedArrayForEachCallback<number, Int16Array> } callbackFn - A function that
29253af6ab5fSopenharmony_ci     *     accepts up to three arguments.
29263af6ab5fSopenharmony_ci     *     The map method calls the callbackfn function one time for each element in the array.
29273af6ab5fSopenharmony_ci     * @returns { Int16Array } The array itself.
29283af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
29293af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The map method cannot be bound.
29303af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
29313af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
29323af6ab5fSopenharmony_ci     * @crossplatform
29333af6ab5fSopenharmony_ci     * @atomicservice
29343af6ab5fSopenharmony_ci     * @since 12
29353af6ab5fSopenharmony_ci     */
29363af6ab5fSopenharmony_ci    map(callbackFn: TypedArrayForEachCallback<number, Int16Array>): Int16Array;
29373af6ab5fSopenharmony_ci    /**
29383af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array. The return value of
29393af6ab5fSopenharmony_ci     * the callback function is the accumulated result, and is provided as an argument in the next
29403af6ab5fSopenharmony_ci     * call to the callback function.
29413af6ab5fSopenharmony_ci     *
29423af6ab5fSopenharmony_ci     * @param { TypedArrayReduceCallback<number, number, Int16Array> } callbackFn - A function that
29433af6ab5fSopenharmony_ci     *     accepts up to four arguments.
29443af6ab5fSopenharmony_ci     *     The reduce method calls the callbackfn function one time for each element in the array.
29453af6ab5fSopenharmony_ci     * @returns { number } The value that results from running the "reducer" callback function to
29463af6ab5fSopenharmony_ci     *     completion over the entire typed array.
29473af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
29483af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
29493af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
29503af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
29513af6ab5fSopenharmony_ci     * @crossplatform
29523af6ab5fSopenharmony_ci     * @atomicservice
29533af6ab5fSopenharmony_ci     * @since 12
29543af6ab5fSopenharmony_ci     */
29553af6ab5fSopenharmony_ci    reduce(callbackFn: TypedArrayReduceCallback<number, number, Int16Array>): number;
29563af6ab5fSopenharmony_ci    /**
29573af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array. The return value of
29583af6ab5fSopenharmony_ci     * the callback function is the accumulated result, and is provided as an argument in the next
29593af6ab5fSopenharmony_ci     * call to the callback function.
29603af6ab5fSopenharmony_ci     *
29613af6ab5fSopenharmony_ci     * @param { TypedArrayReduceCallback<number, number, Int16Array> } callbackFn - A function that
29623af6ab5fSopenharmony_ci     *     accepts up to four arguments.
29633af6ab5fSopenharmony_ci     *     The reduce method calls the callbackfn function one time for each element in the array.
29643af6ab5fSopenharmony_ci     * @param { number } initialValue - If initialValue is specified, it is used as the initial value to start
29653af6ab5fSopenharmony_ci     *     the accumulation. The first call to the callbackfn function provides this value as an argument
29663af6ab5fSopenharmony_ci     *     instead of an array value.
29673af6ab5fSopenharmony_ci     * @returns { number } The value that results from running the "reducer" callback function to
29683af6ab5fSopenharmony_ci     *     completion over the entire typed array.
29693af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
29703af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
29713af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
29723af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
29733af6ab5fSopenharmony_ci     * @crossplatform
29743af6ab5fSopenharmony_ci     * @atomicservice
29753af6ab5fSopenharmony_ci     * @since 12
29763af6ab5fSopenharmony_ci     */
29773af6ab5fSopenharmony_ci    reduce(callbackFn: TypedArrayReduceCallback<number, number, Int16Array>, initialValue: number): number;
29783af6ab5fSopenharmony_ci    /**
29793af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array. The return value of
29803af6ab5fSopenharmony_ci     * the callback function is the accumulated result, and is provided as an argument in the next
29813af6ab5fSopenharmony_ci     * call to the callback function.
29823af6ab5fSopenharmony_ci     *
29833af6ab5fSopenharmony_ci     * @param { TypedArrayReduceCallback<U, number, Int16Array> } callbackFn - A function that
29843af6ab5fSopenharmony_ci     *     accepts up to four arguments.
29853af6ab5fSopenharmony_ci     *     The reduce method calls the callbackfn function one time for each element in the array.
29863af6ab5fSopenharmony_ci     * @param { U } initialValue - If initialValue is specified, it is used as the initial value to start
29873af6ab5fSopenharmony_ci     *     the accumulation. The first call to the callbackfn function provides this value as an argument
29883af6ab5fSopenharmony_ci     *     instead of an array value.
29893af6ab5fSopenharmony_ci     * @returns { U } The value that results from running the "reducer" callback function to
29903af6ab5fSopenharmony_ci     *     completion over the entire typed array.
29913af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
29923af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
29933af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
29943af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
29953af6ab5fSopenharmony_ci     * @crossplatform
29963af6ab5fSopenharmony_ci     * @atomicservice
29973af6ab5fSopenharmony_ci     * @since 12
29983af6ab5fSopenharmony_ci     */
29993af6ab5fSopenharmony_ci    reduce<U>(callbackFn: TypedArrayReduceCallback<U, number, Int16Array>, initialValue: U): U;
30003af6ab5fSopenharmony_ci    /**
30013af6ab5fSopenharmony_ci     * Reverses the elements in an Array.
30023af6ab5fSopenharmony_ci     *
30033af6ab5fSopenharmony_ci     * @returns { Int16Array } The reference to the original typed array, now reversed.
30043af6ab5fSopenharmony_ci     *     <br>Note that the typed array is reversed in place, and no copy is made.
30053af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reverse method cannot be bound.
30063af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
30073af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
30083af6ab5fSopenharmony_ci     * @crossplatform
30093af6ab5fSopenharmony_ci     * @atomicservice
30103af6ab5fSopenharmony_ci     * @since 12
30113af6ab5fSopenharmony_ci     */
30123af6ab5fSopenharmony_ci    reverse(): Int16Array;
30133af6ab5fSopenharmony_ci    /**
30143af6ab5fSopenharmony_ci     * Sets a value or an array of values.
30153af6ab5fSopenharmony_ci     *
30163af6ab5fSopenharmony_ci     * @param { ArrayLike<number> } array - A typed or untyped array of values to set.
30173af6ab5fSopenharmony_ci     * @param { number } [offset] - The index in the current array at which the values are to be written.
30183af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
30193af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The set method cannot be bound.
30203af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
30213af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
30223af6ab5fSopenharmony_ci     * @crossplatform
30233af6ab5fSopenharmony_ci     * @atomicservice
30243af6ab5fSopenharmony_ci     * @since 12
30253af6ab5fSopenharmony_ci     */
30263af6ab5fSopenharmony_ci    set(array: ArrayLike<number>, offset?: number): void;
30273af6ab5fSopenharmony_ci    /**
30283af6ab5fSopenharmony_ci     * Returns a section of an array.
30293af6ab5fSopenharmony_ci     *
30303af6ab5fSopenharmony_ci     * @param { number } [start] - The beginning of the specified portion of the array.
30313af6ab5fSopenharmony_ci     * @param { number } [end] - The end of the specified portion of the array.
30323af6ab5fSopenharmony_ci     *     This is exclusive of the element at the index 'end'.
30333af6ab5fSopenharmony_ci     * @returns { Int16Array } A new typed array containing the extracted elements.
30343af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
30353af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The slice method cannot be bound.
30363af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
30373af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
30383af6ab5fSopenharmony_ci     * @crossplatform
30393af6ab5fSopenharmony_ci     * @atomicservice
30403af6ab5fSopenharmony_ci     * @since 12
30413af6ab5fSopenharmony_ci     */
30423af6ab5fSopenharmony_ci    slice(start?: number, end?: number): Int16Array;
30433af6ab5fSopenharmony_ci    /**
30443af6ab5fSopenharmony_ci     * Determines whether the specified callback function returns true for any element of an array.
30453af6ab5fSopenharmony_ci     *
30463af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Int16Array> } predicate - A function that accepts up to three arguments.
30473af6ab5fSopenharmony_ci     *     The some method calls the predicate function for each element in the array until
30483af6ab5fSopenharmony_ci     *     the predicate returns a value which is coercible to the Boolean value true, or until the end of the array.
30493af6ab5fSopenharmony_ci     * @returns { boolean } false unless predicate returns a truthy value for a typed array element,
30503af6ab5fSopenharmony_ci     *     in which case true is immediately returned.
30513af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
30523af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The some method cannot be bound.
30533af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
30543af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
30553af6ab5fSopenharmony_ci     * @crossplatform
30563af6ab5fSopenharmony_ci     * @atomicservice
30573af6ab5fSopenharmony_ci     * @since 12
30583af6ab5fSopenharmony_ci     */
30593af6ab5fSopenharmony_ci    some(predicate: TypedArrayPredicateFn<number, Int16Array>): boolean;
30603af6ab5fSopenharmony_ci    /**
30613af6ab5fSopenharmony_ci     * Sorts an array.
30623af6ab5fSopenharmony_ci     *
30633af6ab5fSopenharmony_ci     * @param { TypedArrayCompareFn<number> } [compareFn] - Function used to determine the order of the elements.
30643af6ab5fSopenharmony_ci     *     It is expected to return a negative value if first argument is less than second argument,
30653af6ab5fSopenharmony_ci     *     zero if they're equal and a positive value otherwise.
30663af6ab5fSopenharmony_ci     *     If omitted, the elements are sorted in ascending, ASCII character order.
30673af6ab5fSopenharmony_ci     * @returns { Int16Array } The reference to the original typed array, now sorted.
30683af6ab5fSopenharmony_ci     *     Note that the typed array is sorted in place and no copy is made.
30693af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
30703af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The sort method cannot be bound.
30713af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
30723af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
30733af6ab5fSopenharmony_ci     * @crossplatform
30743af6ab5fSopenharmony_ci     * @atomicservice
30753af6ab5fSopenharmony_ci     * @since 12
30763af6ab5fSopenharmony_ci     */
30773af6ab5fSopenharmony_ci    sort(compareFn?: TypedArrayCompareFn<number>): Int16Array;
30783af6ab5fSopenharmony_ci    /**
30793af6ab5fSopenharmony_ci     * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
30803af6ab5fSopenharmony_ci     * at begin, inclusive, up to end, exclusive.
30813af6ab5fSopenharmony_ci     *
30823af6ab5fSopenharmony_ci     * @param { number } [begin] - The index of the beginning of the array.
30833af6ab5fSopenharmony_ci     * @param { number } [end] - The index of the end of the array.
30843af6ab5fSopenharmony_ci     * @returns { Int16Array } A new Int16Array object.
30853af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
30863af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The subarray method cannot be bound.
30873af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
30883af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
30893af6ab5fSopenharmony_ci     * @crossplatform
30903af6ab5fSopenharmony_ci     * @atomicservice
30913af6ab5fSopenharmony_ci     * @since 12
30923af6ab5fSopenharmony_ci     */
30933af6ab5fSopenharmony_ci    subarray(begin?: number, end?: number): Int16Array;
30943af6ab5fSopenharmony_ci    /**
30953af6ab5fSopenharmony_ci     * Returns the item located at the specified index.
30963af6ab5fSopenharmony_ci     *
30973af6ab5fSopenharmony_ci     * @param { number } index - The zero-based index of the desired code unit.<br/>
30983af6ab5fSopenharmony_ci     *     A negative index will count back from the last item.
30993af6ab5fSopenharmony_ci     * @returns { number | undefined } The element in the array matching the given index.<br/>
31003af6ab5fSopenharmony_ci     *     Always returns undefined if index < -array.length or
31013af6ab5fSopenharmony_ci     *     index >= array.length without attempting to access the corresponding property.
31023af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
31033af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The at method cannot be bound.
31043af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
31053af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
31063af6ab5fSopenharmony_ci     * @crossplatform
31073af6ab5fSopenharmony_ci     * @atomicservice
31083af6ab5fSopenharmony_ci     * @since 12
31093af6ab5fSopenharmony_ci     */
31103af6ab5fSopenharmony_ci    at(index: number): number | undefined;
31113af6ab5fSopenharmony_ci    /**
31123af6ab5fSopenharmony_ci     * Returns an iterable of key, value pairs for every entry in the array
31133af6ab5fSopenharmony_ci     *
31143af6ab5fSopenharmony_ci     * @returns { IterableIterator<[number, number]> } A new iterable iterator object.
31153af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
31163af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
31173af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
31183af6ab5fSopenharmony_ci     * @crossplatform
31193af6ab5fSopenharmony_ci     * @atomicservice
31203af6ab5fSopenharmony_ci     * @since 12
31213af6ab5fSopenharmony_ci     */
31223af6ab5fSopenharmony_ci    entries(): IterableIterator<[number, number]>;
31233af6ab5fSopenharmony_ci    /**
31243af6ab5fSopenharmony_ci     * Returns an iterable of keys in the array
31253af6ab5fSopenharmony_ci     *
31263af6ab5fSopenharmony_ci     * @returns { IterableIterator<number> } A new iterable iterator object.
31273af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
31283af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
31293af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
31303af6ab5fSopenharmony_ci     * @crossplatform
31313af6ab5fSopenharmony_ci     * @atomicservice
31323af6ab5fSopenharmony_ci     * @since 12
31333af6ab5fSopenharmony_ci     */
31343af6ab5fSopenharmony_ci    keys(): IterableIterator<number>;
31353af6ab5fSopenharmony_ci    /**
31363af6ab5fSopenharmony_ci     * Returns an iterable of values in the array
31373af6ab5fSopenharmony_ci     *
31383af6ab5fSopenharmony_ci     * @returns { IterableIterator<number> } A new iterable iterator object.
31393af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
31403af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
31413af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
31423af6ab5fSopenharmony_ci     * @crossplatform
31433af6ab5fSopenharmony_ci     * @atomicservice
31443af6ab5fSopenharmony_ci     * @since 12
31453af6ab5fSopenharmony_ci     */
31463af6ab5fSopenharmony_ci    values(): IterableIterator<number>;
31473af6ab5fSopenharmony_ci    /**
31483af6ab5fSopenharmony_ci     * Determines whether an array includes a certain element, returning true or false as appropriate.
31493af6ab5fSopenharmony_ci     *
31503af6ab5fSopenharmony_ci     * @param { number } searchElement - The element to search for.
31513af6ab5fSopenharmony_ci     * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement.
31523af6ab5fSopenharmony_ci     * @returns { boolean } A boolean value which is true if the value searchElement is found <br/>
31533af6ab5fSopenharmony_ci     *     within the typed array (or the part of the typed array indicated by the index fromIndex, if specified).
31543af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
31553af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The at method cannot be bound.
31563af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
31573af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
31583af6ab5fSopenharmony_ci     * @crossplatform
31593af6ab5fSopenharmony_ci     * @atomicservice
31603af6ab5fSopenharmony_ci     * @since 12
31613af6ab5fSopenharmony_ci     */
31623af6ab5fSopenharmony_ci    includes(searchElement: number, fromIndex?: number): boolean;
31633af6ab5fSopenharmony_ci    /**
31643af6ab5fSopenharmony_ci     * Returns the item at that index.
31653af6ab5fSopenharmony_ci     * 
31663af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
31673af6ab5fSopenharmony_ci     * @crossplatform
31683af6ab5fSopenharmony_ci     * @atomicservice
31693af6ab5fSopenharmony_ci     * @since 12
31703af6ab5fSopenharmony_ci     */
31713af6ab5fSopenharmony_ci    [index: number]: number;
31723af6ab5fSopenharmony_ci  }
31733af6ab5fSopenharmony_ci
31743af6ab5fSopenharmony_ci  /**
31753af6ab5fSopenharmony_ci   * A typed array of 16-bit unsigned integer values. The contents are initialized to 0.
31763af6ab5fSopenharmony_ci   * If multiple threads access a Uint16Array instance concurrently, 
31773af6ab5fSopenharmony_ci   * and at least one of the threads modifies the array structurally,
31783af6ab5fSopenharmony_ci   * it must be synchronized externally. 
31793af6ab5fSopenharmony_ci   *
31803af6ab5fSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
31813af6ab5fSopenharmony_ci   * @crossplatform
31823af6ab5fSopenharmony_ci   * @atomicservice
31833af6ab5fSopenharmony_ci   * @since 12
31843af6ab5fSopenharmony_ci   */
31853af6ab5fSopenharmony_ci  @Sendable
31863af6ab5fSopenharmony_ci  class Uint16Array {
31873af6ab5fSopenharmony_ci    /**
31883af6ab5fSopenharmony_ci     * The size in bytes of each element in the array.
31893af6ab5fSopenharmony_ci     *
31903af6ab5fSopenharmony_ci     * @type { number }
31913af6ab5fSopenharmony_ci     * @readonly
31923af6ab5fSopenharmony_ci     * @static
31933af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
31943af6ab5fSopenharmony_ci     * @crossplatform
31953af6ab5fSopenharmony_ci     * @atomicservice
31963af6ab5fSopenharmony_ci     * @since 12
31973af6ab5fSopenharmony_ci     */
31983af6ab5fSopenharmony_ci    public static readonly BYTES_PER_ELEMENT: number;
31993af6ab5fSopenharmony_ci    /**
32003af6ab5fSopenharmony_ci     * The ArrayBuffer instance referenced by the array.
32013af6ab5fSopenharmony_ci     *
32023af6ab5fSopenharmony_ci     * @type { ArrayBuffer }
32033af6ab5fSopenharmony_ci     * @readonly
32043af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
32053af6ab5fSopenharmony_ci     * @crossplatform
32063af6ab5fSopenharmony_ci     * @atomicservice
32073af6ab5fSopenharmony_ci     * @since 12
32083af6ab5fSopenharmony_ci     */
32093af6ab5fSopenharmony_ci    public readonly buffer: ArrayBuffer;
32103af6ab5fSopenharmony_ci    /**
32113af6ab5fSopenharmony_ci     * The length in bytes of the array.
32123af6ab5fSopenharmony_ci     *
32133af6ab5fSopenharmony_ci     * @type { number }
32143af6ab5fSopenharmony_ci     * @readonly
32153af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
32163af6ab5fSopenharmony_ci     * @crossplatform
32173af6ab5fSopenharmony_ci     * @atomicservice
32183af6ab5fSopenharmony_ci     * @since 12
32193af6ab5fSopenharmony_ci     */
32203af6ab5fSopenharmony_ci    public readonly byteLength: number;
32213af6ab5fSopenharmony_ci    /**
32223af6ab5fSopenharmony_ci     * The offset in bytes of the array.
32233af6ab5fSopenharmony_ci     *
32243af6ab5fSopenharmony_ci     * @type { number }
32253af6ab5fSopenharmony_ci     * @readonly
32263af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
32273af6ab5fSopenharmony_ci     * @crossplatform
32283af6ab5fSopenharmony_ci     * @atomicservice
32293af6ab5fSopenharmony_ci     * @since 12
32303af6ab5fSopenharmony_ci     */
32313af6ab5fSopenharmony_ci    public readonly byteOffset: number;
32323af6ab5fSopenharmony_ci    /**
32333af6ab5fSopenharmony_ci     * The length of the array.
32343af6ab5fSopenharmony_ci     *
32353af6ab5fSopenharmony_ci     * @type { number }
32363af6ab5fSopenharmony_ci     * @readonly
32373af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
32383af6ab5fSopenharmony_ci     * @crossplatform
32393af6ab5fSopenharmony_ci     * @atomicservice
32403af6ab5fSopenharmony_ci     * @since 12
32413af6ab5fSopenharmony_ci     */
32423af6ab5fSopenharmony_ci    public readonly length: number;
32433af6ab5fSopenharmony_ci    /**
32443af6ab5fSopenharmony_ci     * A constructor used to create an Uint16Array.
32453af6ab5fSopenharmony_ci     *
32463af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Uint16Array's constructor cannot be directly invoked.
32473af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
32483af6ab5fSopenharmony_ci     * @crossplatform
32493af6ab5fSopenharmony_ci     * @atomicservice
32503af6ab5fSopenharmony_ci     * @since 12
32513af6ab5fSopenharmony_ci     */
32523af6ab5fSopenharmony_ci    constructor();
32533af6ab5fSopenharmony_ci    /**
32543af6ab5fSopenharmony_ci     * A constructor used to create an Uint16Array.
32553af6ab5fSopenharmony_ci     *
32563af6ab5fSopenharmony_ci     * @param { number } length - The length of the array
32573af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Uint16Array's constructor cannot be directly invoked.
32583af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
32593af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
32603af6ab5fSopenharmony_ci     * @crossplatform
32613af6ab5fSopenharmony_ci     * @atomicservice
32623af6ab5fSopenharmony_ci     * @since 12
32633af6ab5fSopenharmony_ci     */
32643af6ab5fSopenharmony_ci    constructor(length: number);
32653af6ab5fSopenharmony_ci    /**
32663af6ab5fSopenharmony_ci     * A constructor used to create an Uint16Array.
32673af6ab5fSopenharmony_ci     *
32683af6ab5fSopenharmony_ci     * @param { ArrayLike<number> | ArrayBuffer } array - An array is initialized with the given elements
32693af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Uint16Array's constructor cannot be directly invoked.
32703af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
32713af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
32723af6ab5fSopenharmony_ci     * @crossplatform
32733af6ab5fSopenharmony_ci     * @atomicservice
32743af6ab5fSopenharmony_ci     * @since 12
32753af6ab5fSopenharmony_ci     */
32763af6ab5fSopenharmony_ci    constructor(array: ArrayLike<number> | ArrayBuffer);
32773af6ab5fSopenharmony_ci    /**
32783af6ab5fSopenharmony_ci     * A constructor used to create an Uint16Array.
32793af6ab5fSopenharmony_ci     *
32803af6ab5fSopenharmony_ci     * @param { ArrayBuffer } buffer - An array is initialized with the given elements
32813af6ab5fSopenharmony_ci     * @param { number } [byteOffset] - The byteOffset (in bytes) parameter specifies the memory range
32823af6ab5fSopenharmony_ci     *     that will be exposed by the typed array view.
32833af6ab5fSopenharmony_ci     * @param { number } [length] - The length parameter specifies the memory range
32843af6ab5fSopenharmony_ci     *     that will be exposed by the typed array view.
32853af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Uint16Array's constructor cannot be directly invoked.
32863af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
32873af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
32883af6ab5fSopenharmony_ci     * @crossplatform
32893af6ab5fSopenharmony_ci     * @atomicservice
32903af6ab5fSopenharmony_ci     * @since 12
32913af6ab5fSopenharmony_ci     */
32923af6ab5fSopenharmony_ci    constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number);
32933af6ab5fSopenharmony_ci    /**
32943af6ab5fSopenharmony_ci     * Creates an Uint16Array from an array-like object.
32953af6ab5fSopenharmony_ci     *
32963af6ab5fSopenharmony_ci     * @param { ArrayLike<number> } arrayLike - An array-like object to convert to an Uint16Array.
32973af6ab5fSopenharmony_ci     * @returns { Uint16Array } A new Uint16Array instance
32983af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
32993af6ab5fSopenharmony_ci     * @static
33003af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
33013af6ab5fSopenharmony_ci     * @crossplatform
33023af6ab5fSopenharmony_ci     * @atomicservice
33033af6ab5fSopenharmony_ci     * @since 12
33043af6ab5fSopenharmony_ci     */
33053af6ab5fSopenharmony_ci    static from(arrayLike: ArrayLike<number>): Uint16Array;
33063af6ab5fSopenharmony_ci    /**
33073af6ab5fSopenharmony_ci     * Creates an Uint16Array from an array-like object.
33083af6ab5fSopenharmony_ci     *
33093af6ab5fSopenharmony_ci     * @param { ArrayLike<T> } arrayLike - An array-like object to convert to an Uint16Array.
33103af6ab5fSopenharmony_ci     * @param { TypedArrayFromMapFn<T, number> } mapFn - A mapping function to call on every element of the array.
33113af6ab5fSopenharmony_ci     * @returns { Uint16Array } A new Uint16Array instance
33123af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
33133af6ab5fSopenharmony_ci     * @static
33143af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
33153af6ab5fSopenharmony_ci     * @crossplatform
33163af6ab5fSopenharmony_ci     * @atomicservice
33173af6ab5fSopenharmony_ci     * @since 12
33183af6ab5fSopenharmony_ci     */
33193af6ab5fSopenharmony_ci    static from<T>(arrayLike: ArrayLike<T>, mapFn: TypedArrayFromMapFn<T, number>): Uint16Array;
33203af6ab5fSopenharmony_ci    /**
33213af6ab5fSopenharmony_ci     * Creates an Uint16Array from an iterable object.
33223af6ab5fSopenharmony_ci     *
33233af6ab5fSopenharmony_ci     * @param { Iterable<number> } arrayLike - An iterable object to convert to an Uint16Array.
33243af6ab5fSopenharmony_ci     * @param { TypedArrayFromMapFn<number, number> } [mapFn] - A mapping function to
33253af6ab5fSopenharmony_ci     *     call on every element of the array.
33263af6ab5fSopenharmony_ci     * @returns { Uint16Array } A new Uint16Array instance
33273af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
33283af6ab5fSopenharmony_ci     * @static
33293af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
33303af6ab5fSopenharmony_ci     * @crossplatform
33313af6ab5fSopenharmony_ci     * @atomicservice
33323af6ab5fSopenharmony_ci     * @since 12
33333af6ab5fSopenharmony_ci     */
33343af6ab5fSopenharmony_ci    static from(arrayLike: Iterable<number>, mapFn?: TypedArrayFromMapFn<number, number>): Uint16Array;
33353af6ab5fSopenharmony_ci    /**
33363af6ab5fSopenharmony_ci     * Returns the this object after copying a section of the array identified by start and end
33373af6ab5fSopenharmony_ci     * to the same array starting at position target.
33383af6ab5fSopenharmony_ci     *
33393af6ab5fSopenharmony_ci     * @param { number } target - If target is negative, it is treated as length+target where length is the
33403af6ab5fSopenharmony_ci     *     length of the array.
33413af6ab5fSopenharmony_ci     * @param { number } start - If start is negative, it is treated as length+start. If end is negative, it
33423af6ab5fSopenharmony_ci     *     is treated as length+end.
33433af6ab5fSopenharmony_ci     * @param { number } [end] - If not specified, length of the this object is used as its default value.
33443af6ab5fSopenharmony_ci     * @returns { Uint16Array } The array itself.
33453af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
33463af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound.
33473af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
33483af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
33493af6ab5fSopenharmony_ci     * @crossplatform
33503af6ab5fSopenharmony_ci     * @atomicservice
33513af6ab5fSopenharmony_ci     * @since 12
33523af6ab5fSopenharmony_ci     */
33533af6ab5fSopenharmony_ci    copyWithin(target: number, start: number, end?: number): Uint16Array;
33543af6ab5fSopenharmony_ci    /**
33553af6ab5fSopenharmony_ci     * Determines whether all the members of an array satisfy the specified test.
33563af6ab5fSopenharmony_ci     *
33573af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Uint16Array> } predicate - A function that accepts up to three arguments.
33583af6ab5fSopenharmony_ci     *     The every method calls the predicate function for each element in the array until
33593af6ab5fSopenharmony_ci     *     the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.
33603af6ab5fSopenharmony_ci     * @returns { boolean } true unless predicate returns a false value for a typed array element,
33613af6ab5fSopenharmony_ci     *     in which case false is immediately returned.
33623af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
33633af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The every method cannot be bound.
33643af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
33653af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
33663af6ab5fSopenharmony_ci     * @crossplatform
33673af6ab5fSopenharmony_ci     * @atomicservice
33683af6ab5fSopenharmony_ci     * @since 12
33693af6ab5fSopenharmony_ci     */
33703af6ab5fSopenharmony_ci    every(predicate: TypedArrayPredicateFn<number, Uint16Array>): boolean;
33713af6ab5fSopenharmony_ci    /**
33723af6ab5fSopenharmony_ci     * Returns the this object after filling the section identified by start and end with value.
33733af6ab5fSopenharmony_ci     *
33743af6ab5fSopenharmony_ci     * @param { number } value - value to fill array section with.
33753af6ab5fSopenharmony_ci     * @param { number } [start] - index to start filling the array at. If start is negative, it is treated as
33763af6ab5fSopenharmony_ci     *     length+start where length is the length of the array.
33773af6ab5fSopenharmony_ci     * @param { number } [end] - index to stop filling the array at. If end is negative, it is treated as
33783af6ab5fSopenharmony_ci     *     length+end.
33793af6ab5fSopenharmony_ci     * @returns { Uint16Array } The array itself.
33803af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
33813af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The fill method cannot be bound.
33823af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
33833af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
33843af6ab5fSopenharmony_ci     * @crossplatform
33853af6ab5fSopenharmony_ci     * @atomicservice
33863af6ab5fSopenharmony_ci     * @since 12
33873af6ab5fSopenharmony_ci     */
33883af6ab5fSopenharmony_ci    fill(value: number, start?: number, end?: number): Uint16Array;
33893af6ab5fSopenharmony_ci    /**
33903af6ab5fSopenharmony_ci     * Returns the elements of an array that meet the condition specified in a callback function.
33913af6ab5fSopenharmony_ci     *
33923af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Uint16Array> } predicate - A function that accepts up to three arguments.
33933af6ab5fSopenharmony_ci     *     The filter method calls the predicate function one time for each element in the array.
33943af6ab5fSopenharmony_ci     * @returns { Uint16Array } The array itself.
33953af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
33963af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The filter method cannot be bound.
33973af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
33983af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
33993af6ab5fSopenharmony_ci     * @crossplatform
34003af6ab5fSopenharmony_ci     * @atomicservice
34013af6ab5fSopenharmony_ci     * @since 12
34023af6ab5fSopenharmony_ci     */
34033af6ab5fSopenharmony_ci    filter(predicate: TypedArrayPredicateFn<number, Uint16Array>): Uint16Array;
34043af6ab5fSopenharmony_ci    /**
34053af6ab5fSopenharmony_ci     * Returns the value of the first element in the array where predicate is true, and undefined
34063af6ab5fSopenharmony_ci     * otherwise.
34073af6ab5fSopenharmony_ci     *
34083af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Uint16Array> } predicate - find calls predicate once for each element of
34093af6ab5fSopenharmony_ci     *     the array, in ascending order, until it finds one where predicate returns true.
34103af6ab5fSopenharmony_ci     *     If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.
34113af6ab5fSopenharmony_ci     * @returns { number | undefined } The first element in the typed array
34123af6ab5fSopenharmony_ci     *     that satisfies the provided testing function. Otherwise, undefined is returned.
34133af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
34143af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The find method cannot be bound.
34153af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
34163af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
34173af6ab5fSopenharmony_ci     * @crossplatform
34183af6ab5fSopenharmony_ci     * @atomicservice
34193af6ab5fSopenharmony_ci     * @since 12
34203af6ab5fSopenharmony_ci     */
34213af6ab5fSopenharmony_ci    find(predicate: TypedArrayPredicateFn<number, Uint16Array>): number | undefined;
34223af6ab5fSopenharmony_ci    /**
34233af6ab5fSopenharmony_ci     * Returns the index of the first element in the array where predicate is true, and -1
34243af6ab5fSopenharmony_ci     * otherwise.
34253af6ab5fSopenharmony_ci     *
34263af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Uint16Array> } predicate - find calls predicate once for each element of
34273af6ab5fSopenharmony_ci     *     the array, in ascending order, until it finds one where predicate returns true. If such an element is found,
34283af6ab5fSopenharmony_ci     *     findIndex immediately returns that element index. Otherwise, findIndex returns -1.
34293af6ab5fSopenharmony_ci     * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1.
34303af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
34313af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The findIndex method cannot be bound.
34323af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
34333af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
34343af6ab5fSopenharmony_ci     * @crossplatform
34353af6ab5fSopenharmony_ci     * @atomicservice
34363af6ab5fSopenharmony_ci     * @since 12
34373af6ab5fSopenharmony_ci     */
34383af6ab5fSopenharmony_ci    findIndex(predicate: TypedArrayPredicateFn<number, Uint16Array>): number;
34393af6ab5fSopenharmony_ci    /**
34403af6ab5fSopenharmony_ci     * Performs the specified action for each element in an array.
34413af6ab5fSopenharmony_ci     *
34423af6ab5fSopenharmony_ci     * @param { TypedArrayForEachCallback<number, Uint16Array> } callbackFn -  A function that
34433af6ab5fSopenharmony_ci     *     accepts up to three arguments.
34443af6ab5fSopenharmony_ci     *     forEach calls the callbackfn function one time for each element in the array.
34453af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
34463af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The forEach method cannot be bound.
34473af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
34483af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
34493af6ab5fSopenharmony_ci     * @crossplatform
34503af6ab5fSopenharmony_ci     * @atomicservice
34513af6ab5fSopenharmony_ci     * @since 12
34523af6ab5fSopenharmony_ci     */
34533af6ab5fSopenharmony_ci    forEach(callbackFn: TypedArrayForEachCallback<number, Uint16Array>): void;
34543af6ab5fSopenharmony_ci    /**
34553af6ab5fSopenharmony_ci     * Returns the index of the first occurrence of a value in an array.
34563af6ab5fSopenharmony_ci     *
34573af6ab5fSopenharmony_ci     * @param { number } searchElement - The value to locate in the array.
34583af6ab5fSopenharmony_ci     * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the
34593af6ab5fSopenharmony_ci     *      search starts at index 0.
34603af6ab5fSopenharmony_ci     * @returns { number } The first index of searchElement in the typed array; -1 if not found.
34613af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
34623af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The indexOf method cannot be bound.
34633af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
34643af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
34653af6ab5fSopenharmony_ci     * @crossplatform
34663af6ab5fSopenharmony_ci     * @atomicservice
34673af6ab5fSopenharmony_ci     * @since 12
34683af6ab5fSopenharmony_ci     */
34693af6ab5fSopenharmony_ci    indexOf(searchElement: number, fromIndex?: number): number;
34703af6ab5fSopenharmony_ci    /**
34713af6ab5fSopenharmony_ci     * Adds all the elements of an array separated by the specified separator string.
34723af6ab5fSopenharmony_ci     * @param { string } [separator] - A string used to separate one element of an array from the next in the
34733af6ab5fSopenharmony_ci     *     resulting String. If omitted, the array elements are separated with a comma.
34743af6ab5fSopenharmony_ci     * @returns { string } A string with all typed array elements joined.
34753af6ab5fSopenharmony_ci     *     If array.length is 0, the empty string is returned.
34763af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
34773af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The join method cannot be bound.
34783af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
34793af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
34803af6ab5fSopenharmony_ci     * @crossplatform
34813af6ab5fSopenharmony_ci     * @atomicservice
34823af6ab5fSopenharmony_ci     * @since 12
34833af6ab5fSopenharmony_ci     */
34843af6ab5fSopenharmony_ci    join(separator?: string): string;
34853af6ab5fSopenharmony_ci    /**
34863af6ab5fSopenharmony_ci     * Calls a defined callback function on each element of an array, and returns an array that
34873af6ab5fSopenharmony_ci     * contains the results.
34883af6ab5fSopenharmony_ci     *
34893af6ab5fSopenharmony_ci     * @param { TypedArrayForEachCallback<number, Uint16Array> } callbackFn - A function that accepts up to
34903af6ab5fSopenharmony_ci     *     three arguments. The map method calls the callbackfn function one time for each element in the array.
34913af6ab5fSopenharmony_ci     * @returns { Uint16Array } The array itself.
34923af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
34933af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The map method cannot be bound.
34943af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
34953af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
34963af6ab5fSopenharmony_ci     * @crossplatform
34973af6ab5fSopenharmony_ci     * @atomicservice
34983af6ab5fSopenharmony_ci     * @since 12
34993af6ab5fSopenharmony_ci     */
35003af6ab5fSopenharmony_ci    map(callbackFn: TypedArrayForEachCallback<number, Uint16Array>): Uint16Array;
35013af6ab5fSopenharmony_ci    /**
35023af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array. The return value of
35033af6ab5fSopenharmony_ci     * the callback function is the accumulated result, and is provided as an argument in the next
35043af6ab5fSopenharmony_ci     * call to the callback function.
35053af6ab5fSopenharmony_ci     *
35063af6ab5fSopenharmony_ci     * @param { TypedArrayReduceCallback<number, number, Uint16Array> } callbackFn - A function that
35073af6ab5fSopenharmony_ci     *     accepts up to four arguments.
35083af6ab5fSopenharmony_ci     *     The reduce method calls the callbackfn function one time for each element in the array.
35093af6ab5fSopenharmony_ci     * @returns { number } The value that results from running the "reducer" callback function to
35103af6ab5fSopenharmony_ci     *     completion over the entire typed array.
35113af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
35123af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
35133af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
35143af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
35153af6ab5fSopenharmony_ci     * @crossplatform
35163af6ab5fSopenharmony_ci     * @atomicservice
35173af6ab5fSopenharmony_ci     * @since 12
35183af6ab5fSopenharmony_ci     */
35193af6ab5fSopenharmony_ci    reduce(callbackFn: TypedArrayReduceCallback<number, number, Uint16Array>): number;
35203af6ab5fSopenharmony_ci    /**
35213af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array. The return value of
35223af6ab5fSopenharmony_ci     * the callback function is the accumulated result, and is provided as an argument in the next
35233af6ab5fSopenharmony_ci     * call to the callback function.
35243af6ab5fSopenharmony_ci     *
35253af6ab5fSopenharmony_ci     * @param { TypedArrayReduceCallback<number, number, Uint16Array> } callbackFn - A function that
35263af6ab5fSopenharmony_ci     *     accepts up to four arguments.
35273af6ab5fSopenharmony_ci     *     The reduce method calls the callbackfn function one time for each element in the array.
35283af6ab5fSopenharmony_ci     * @param { number } initialValue - If initialValue is specified, it is used as the initial value to start
35293af6ab5fSopenharmony_ci     *     the accumulation. The first call to the callbackfn function provides this value as an argument
35303af6ab5fSopenharmony_ci     *     instead of an array value.
35313af6ab5fSopenharmony_ci     * @returns { number } The value that results from running the "reducer" callback function to
35323af6ab5fSopenharmony_ci     *     completion over the entire typed array.
35333af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
35343af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
35353af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
35363af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
35373af6ab5fSopenharmony_ci     * @crossplatform
35383af6ab5fSopenharmony_ci     * @atomicservice
35393af6ab5fSopenharmony_ci     * @since 12
35403af6ab5fSopenharmony_ci     */
35413af6ab5fSopenharmony_ci    reduce(callbackFn: TypedArrayReduceCallback<number, number, Uint16Array>, initialValue: number): number;
35423af6ab5fSopenharmony_ci    /**
35433af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array. The return value of
35443af6ab5fSopenharmony_ci     * the callback function is the accumulated result, and is provided as an argument in the next
35453af6ab5fSopenharmony_ci     * call to the callback function.
35463af6ab5fSopenharmony_ci     *
35473af6ab5fSopenharmony_ci     * @param { TypedArrayReduceCallback<U, number, Uint16Array> } callbackFn - A function that
35483af6ab5fSopenharmony_ci     *     accepts up to four arguments.
35493af6ab5fSopenharmony_ci     *     The reduce method calls the callbackfn function one time for each element in the array.
35503af6ab5fSopenharmony_ci     * @param { U } initialValue - If initialValue is specified, it is used as the initial value to start
35513af6ab5fSopenharmony_ci     *     the accumulation. The first call to the callbackfn function provides this value as an argument
35523af6ab5fSopenharmony_ci     *     instead of an array value.
35533af6ab5fSopenharmony_ci     * @returns { U } The value that results from running the "reducer" callback function to
35543af6ab5fSopenharmony_ci     *     completion over the entire typed array.
35553af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
35563af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
35573af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
35583af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
35593af6ab5fSopenharmony_ci     * @crossplatform
35603af6ab5fSopenharmony_ci     * @atomicservice
35613af6ab5fSopenharmony_ci     * @since 12
35623af6ab5fSopenharmony_ci     */
35633af6ab5fSopenharmony_ci    reduce<U>(callbackFn: TypedArrayReduceCallback<U, number, Uint16Array>, initialValue: U): U;
35643af6ab5fSopenharmony_ci    /**
35653af6ab5fSopenharmony_ci     * Reverses the elements in an Array.
35663af6ab5fSopenharmony_ci     *
35673af6ab5fSopenharmony_ci     * @returns { Uint16Array } The reference to the original typed array, now reversed.
35683af6ab5fSopenharmony_ci     *     <br/>Note that the typed array is reversed in place, and no copy is made.
35693af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reverse method cannot be bound.
35703af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
35713af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
35723af6ab5fSopenharmony_ci     * @crossplatform
35733af6ab5fSopenharmony_ci     * @atomicservice
35743af6ab5fSopenharmony_ci     * @since 12
35753af6ab5fSopenharmony_ci     */
35763af6ab5fSopenharmony_ci    reverse(): Uint16Array;
35773af6ab5fSopenharmony_ci    /**
35783af6ab5fSopenharmony_ci     * Sets a value or an array of values.
35793af6ab5fSopenharmony_ci     *
35803af6ab5fSopenharmony_ci     * @param { ArrayLike<number> } array - A typed or untyped array of values to set.
35813af6ab5fSopenharmony_ci     * @param { number } [offset] - The index in the current array at which the values are to be written.
35823af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
35833af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The set method cannot be bound.
35843af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
35853af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
35863af6ab5fSopenharmony_ci     * @crossplatform
35873af6ab5fSopenharmony_ci     * @atomicservice
35883af6ab5fSopenharmony_ci     * @since 12
35893af6ab5fSopenharmony_ci     */
35903af6ab5fSopenharmony_ci    set(array: ArrayLike<number>, offset?: number): void;
35913af6ab5fSopenharmony_ci    /**
35923af6ab5fSopenharmony_ci     * Returns a section of an array.
35933af6ab5fSopenharmony_ci     *
35943af6ab5fSopenharmony_ci     * @param { number } [start] - The beginning of the specified portion of the array.
35953af6ab5fSopenharmony_ci     * @param { number } [end] - The end of the specified portion of the array.
35963af6ab5fSopenharmony_ci     *     This is exclusive of the element at the index 'end'.
35973af6ab5fSopenharmony_ci     * @returns { Uint16Array } A new typed array containing the extracted elements.
35983af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
35993af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The slice method cannot be bound.
36003af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
36013af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
36023af6ab5fSopenharmony_ci     * @crossplatform
36033af6ab5fSopenharmony_ci     * @atomicservice
36043af6ab5fSopenharmony_ci     * @since 12
36053af6ab5fSopenharmony_ci     */
36063af6ab5fSopenharmony_ci    slice(start?: number, end?: number): Uint16Array;
36073af6ab5fSopenharmony_ci    /**
36083af6ab5fSopenharmony_ci     * Determines whether the specified callback function returns true for any element of an array.
36093af6ab5fSopenharmony_ci     *
36103af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Uint16Array> } predicate - A function that accepts up to three arguments.
36113af6ab5fSopenharmony_ci     *     The some method calls the predicate function for each element in the array until
36123af6ab5fSopenharmony_ci     *     the predicate returns a value which is coercible to the Boolean value true, or until the end of the array.
36133af6ab5fSopenharmony_ci     * @returns { boolean } false unless predicate returns a truthy value for a typed array element,
36143af6ab5fSopenharmony_ci     *     in which case true is immediately returned.
36153af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
36163af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The some method cannot be bound.
36173af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
36183af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
36193af6ab5fSopenharmony_ci     * @crossplatform
36203af6ab5fSopenharmony_ci     * @atomicservice
36213af6ab5fSopenharmony_ci     * @since 12
36223af6ab5fSopenharmony_ci     */
36233af6ab5fSopenharmony_ci    some(predicate: TypedArrayPredicateFn<number, Uint16Array>): boolean;
36243af6ab5fSopenharmony_ci    /**
36253af6ab5fSopenharmony_ci     * Sorts an array.
36263af6ab5fSopenharmony_ci     *
36273af6ab5fSopenharmony_ci     * @param { TypedArrayCompareFn<number> } [compareFn] - Function used to determine the order of the elements.
36283af6ab5fSopenharmony_ci     *     It is expected to return a negative value if first argument is less than second argument,
36293af6ab5fSopenharmony_ci     *     zero if they're equal and a positive value otherwise.
36303af6ab5fSopenharmony_ci     *     If omitted, the elements are sorted in ascending, ASCII character order.
36313af6ab5fSopenharmony_ci     * @returns { Uint16Array } The reference to the original typed array, now sorted.
36323af6ab5fSopenharmony_ci     *     Note that the typed array is sorted in place and no copy is made.
36333af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
36343af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The sort method cannot be bound.
36353af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
36363af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
36373af6ab5fSopenharmony_ci     * @crossplatform
36383af6ab5fSopenharmony_ci     * @atomicservice
36393af6ab5fSopenharmony_ci     * @since 12
36403af6ab5fSopenharmony_ci     */
36413af6ab5fSopenharmony_ci    sort(compareFn?: TypedArrayCompareFn<number>): Uint16Array;
36423af6ab5fSopenharmony_ci    /**
36433af6ab5fSopenharmony_ci     * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements
36443af6ab5fSopenharmony_ci     * at begin, inclusive, up to end, exclusive.
36453af6ab5fSopenharmony_ci     *
36463af6ab5fSopenharmony_ci     * @param { number } [begin] - The index of the beginning of the array.
36473af6ab5fSopenharmony_ci     * @param { number } [end] - The index of the end of the array.
36483af6ab5fSopenharmony_ci     * @returns { Uint16Array } A new Uint16Array object.
36493af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
36503af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The subarray method cannot be bound.
36513af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
36523af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
36533af6ab5fSopenharmony_ci     * @crossplatform
36543af6ab5fSopenharmony_ci     * @atomicservice
36553af6ab5fSopenharmony_ci     * @since 12
36563af6ab5fSopenharmony_ci     */
36573af6ab5fSopenharmony_ci    subarray(begin?: number, end?: number): Uint16Array;
36583af6ab5fSopenharmony_ci    /**
36593af6ab5fSopenharmony_ci     * Returns the item located at the specified index.
36603af6ab5fSopenharmony_ci     *
36613af6ab5fSopenharmony_ci     * @param { number } index - The zero-based index of the desired code unit.<br/>
36623af6ab5fSopenharmony_ci     *     A negative index will count back from the last item.
36633af6ab5fSopenharmony_ci     * @returns { number | undefined } The element in the array matching the given index.<br/>
36643af6ab5fSopenharmony_ci     *     Always returns undefined if index < -array.length or
36653af6ab5fSopenharmony_ci     *     index >= array.length without attempting to access the corresponding property.
36663af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
36673af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The at method cannot be bound.
36683af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
36693af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
36703af6ab5fSopenharmony_ci     * @crossplatform
36713af6ab5fSopenharmony_ci     * @atomicservice
36723af6ab5fSopenharmony_ci     * @since 12
36733af6ab5fSopenharmony_ci     */
36743af6ab5fSopenharmony_ci    at(index: number): number | undefined;
36753af6ab5fSopenharmony_ci    /**
36763af6ab5fSopenharmony_ci     * Returns an iterable of key, value pairs for every entry in the array
36773af6ab5fSopenharmony_ci     *
36783af6ab5fSopenharmony_ci     * @returns { IterableIterator<[number, number]> } A new iterable iterator object.
36793af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
36803af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
36813af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
36823af6ab5fSopenharmony_ci     * @crossplatform
36833af6ab5fSopenharmony_ci     * @atomicservice
36843af6ab5fSopenharmony_ci     * @since 12
36853af6ab5fSopenharmony_ci     */
36863af6ab5fSopenharmony_ci    entries(): IterableIterator<[number, number]>;
36873af6ab5fSopenharmony_ci    /**
36883af6ab5fSopenharmony_ci     * Returns an iterable of keys in the array
36893af6ab5fSopenharmony_ci     *
36903af6ab5fSopenharmony_ci     * @returns { IterableIterator<number> } A new iterable iterator object.
36913af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
36923af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
36933af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
36943af6ab5fSopenharmony_ci     * @crossplatform
36953af6ab5fSopenharmony_ci     * @atomicservice
36963af6ab5fSopenharmony_ci     * @since 12
36973af6ab5fSopenharmony_ci     */
36983af6ab5fSopenharmony_ci    keys(): IterableIterator<number>;
36993af6ab5fSopenharmony_ci    /**
37003af6ab5fSopenharmony_ci     * Returns an iterable of values in the array
37013af6ab5fSopenharmony_ci     *
37023af6ab5fSopenharmony_ci     * @returns { IterableIterator<number> } A new iterable iterator object.
37033af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
37043af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
37053af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
37063af6ab5fSopenharmony_ci     * @crossplatform
37073af6ab5fSopenharmony_ci     * @atomicservice
37083af6ab5fSopenharmony_ci     * @since 12
37093af6ab5fSopenharmony_ci     */
37103af6ab5fSopenharmony_ci    values(): IterableIterator<number>;
37113af6ab5fSopenharmony_ci    /**
37123af6ab5fSopenharmony_ci     * Determines whether an array includes a certain element, returning true or false as appropriate.
37133af6ab5fSopenharmony_ci     *
37143af6ab5fSopenharmony_ci     * @param { number } searchElement - The element to search for.
37153af6ab5fSopenharmony_ci     * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement.
37163af6ab5fSopenharmony_ci     * @returns { boolean } A boolean value which is true if the value searchElement is found <br/>
37173af6ab5fSopenharmony_ci     *     within the typed array (or the part of the typed array indicated by the index fromIndex, if specified).
37183af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
37193af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The at method cannot be bound.
37203af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
37213af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
37223af6ab5fSopenharmony_ci     * @crossplatform
37233af6ab5fSopenharmony_ci     * @atomicservice
37243af6ab5fSopenharmony_ci     * @since 12
37253af6ab5fSopenharmony_ci     */
37263af6ab5fSopenharmony_ci    includes(searchElement: number, fromIndex?: number): boolean;
37273af6ab5fSopenharmony_ci    /**
37283af6ab5fSopenharmony_ci     * Returns the item at that index.
37293af6ab5fSopenharmony_ci     * 
37303af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
37313af6ab5fSopenharmony_ci     * @crossplatform
37323af6ab5fSopenharmony_ci     * @atomicservice
37333af6ab5fSopenharmony_ci     * @since 12
37343af6ab5fSopenharmony_ci     */
37353af6ab5fSopenharmony_ci    [index: number]: number;
37363af6ab5fSopenharmony_ci  }
37373af6ab5fSopenharmony_ci
37383af6ab5fSopenharmony_ci  /**
37393af6ab5fSopenharmony_ci   * A typed array of 32-bit integer values. The contents are initialized to 0.
37403af6ab5fSopenharmony_ci   * If multiple threads access a Int32Array instance concurrently, 
37413af6ab5fSopenharmony_ci   * and at least one of the threads modifies the array structurally,
37423af6ab5fSopenharmony_ci   * it must be synchronized externally. 
37433af6ab5fSopenharmony_ci   *
37443af6ab5fSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
37453af6ab5fSopenharmony_ci   * @crossplatform
37463af6ab5fSopenharmony_ci   * @atomicservice
37473af6ab5fSopenharmony_ci   * @since 12
37483af6ab5fSopenharmony_ci   */
37493af6ab5fSopenharmony_ci  @Sendable
37503af6ab5fSopenharmony_ci  class Int32Array {
37513af6ab5fSopenharmony_ci    /**
37523af6ab5fSopenharmony_ci     * The size in bytes of each element in the array.
37533af6ab5fSopenharmony_ci     *
37543af6ab5fSopenharmony_ci     * @type { number }
37553af6ab5fSopenharmony_ci     * @readonly
37563af6ab5fSopenharmony_ci     * @static
37573af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
37583af6ab5fSopenharmony_ci     * @crossplatform
37593af6ab5fSopenharmony_ci     * @atomicservice
37603af6ab5fSopenharmony_ci     * @since 12
37613af6ab5fSopenharmony_ci     */
37623af6ab5fSopenharmony_ci    public static readonly BYTES_PER_ELEMENT: number;
37633af6ab5fSopenharmony_ci    /**
37643af6ab5fSopenharmony_ci     * The ArrayBuffer instance referenced by the array.
37653af6ab5fSopenharmony_ci     *
37663af6ab5fSopenharmony_ci     * @type { ArrayBuffer }
37673af6ab5fSopenharmony_ci     * @readonly
37683af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
37693af6ab5fSopenharmony_ci     * @crossplatform
37703af6ab5fSopenharmony_ci     * @atomicservice
37713af6ab5fSopenharmony_ci     * @since 12
37723af6ab5fSopenharmony_ci     */
37733af6ab5fSopenharmony_ci    public readonly buffer: ArrayBuffer;
37743af6ab5fSopenharmony_ci    /**
37753af6ab5fSopenharmony_ci     * The length in bytes of the array.
37763af6ab5fSopenharmony_ci     *
37773af6ab5fSopenharmony_ci     * @type { number }
37783af6ab5fSopenharmony_ci     * @readonly
37793af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
37803af6ab5fSopenharmony_ci     * @crossplatform
37813af6ab5fSopenharmony_ci     * @atomicservice
37823af6ab5fSopenharmony_ci     * @since 12
37833af6ab5fSopenharmony_ci     */
37843af6ab5fSopenharmony_ci    public readonly byteLength: number;
37853af6ab5fSopenharmony_ci    /**
37863af6ab5fSopenharmony_ci     * The offset in bytes of the array.
37873af6ab5fSopenharmony_ci     *
37883af6ab5fSopenharmony_ci     * @type { number }
37893af6ab5fSopenharmony_ci     * @readonly
37903af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
37913af6ab5fSopenharmony_ci     * @crossplatform
37923af6ab5fSopenharmony_ci     * @atomicservice
37933af6ab5fSopenharmony_ci     * @since 12
37943af6ab5fSopenharmony_ci     */
37953af6ab5fSopenharmony_ci    public readonly byteOffset: number;
37963af6ab5fSopenharmony_ci    /**
37973af6ab5fSopenharmony_ci     * The length of the array.
37983af6ab5fSopenharmony_ci     *
37993af6ab5fSopenharmony_ci     * @type { number }
38003af6ab5fSopenharmony_ci     * @readonly
38013af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
38023af6ab5fSopenharmony_ci     * @crossplatform
38033af6ab5fSopenharmony_ci     * @atomicservice
38043af6ab5fSopenharmony_ci     * @since 12
38053af6ab5fSopenharmony_ci     */
38063af6ab5fSopenharmony_ci    public readonly length: number;
38073af6ab5fSopenharmony_ci    /**
38083af6ab5fSopenharmony_ci     * A constructor used to create an Int32Array.
38093af6ab5fSopenharmony_ci     *
38103af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Int32Array's constructor cannot be directly invoked.
38113af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
38123af6ab5fSopenharmony_ci     * @crossplatform
38133af6ab5fSopenharmony_ci     * @atomicservice
38143af6ab5fSopenharmony_ci     * @since 12
38153af6ab5fSopenharmony_ci     */
38163af6ab5fSopenharmony_ci    constructor();
38173af6ab5fSopenharmony_ci    /**
38183af6ab5fSopenharmony_ci     * A constructor used to create an Int32Array.
38193af6ab5fSopenharmony_ci     *
38203af6ab5fSopenharmony_ci     * @param { number } length - The length of the array
38213af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Int32Array's constructor cannot be directly invoked.
38223af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
38233af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
38243af6ab5fSopenharmony_ci     * @crossplatform
38253af6ab5fSopenharmony_ci     * @atomicservice
38263af6ab5fSopenharmony_ci     * @since 12
38273af6ab5fSopenharmony_ci     */
38283af6ab5fSopenharmony_ci    constructor(length: number);
38293af6ab5fSopenharmony_ci    /**
38303af6ab5fSopenharmony_ci     * A constructor used to create an Int32Array.
38313af6ab5fSopenharmony_ci     *
38323af6ab5fSopenharmony_ci     * @param { ArrayLike<number> | ArrayBuffer } array - An array is initialized with the given elements
38333af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Int32Array's constructor cannot be directly invoked.
38343af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
38353af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
38363af6ab5fSopenharmony_ci     * @crossplatform
38373af6ab5fSopenharmony_ci     * @atomicservice
38383af6ab5fSopenharmony_ci     * @since 12
38393af6ab5fSopenharmony_ci     */
38403af6ab5fSopenharmony_ci    constructor(array: ArrayLike<number> | ArrayBuffer);
38413af6ab5fSopenharmony_ci    /**
38423af6ab5fSopenharmony_ci     * A constructor used to create an Int32Array.
38433af6ab5fSopenharmony_ci     *
38443af6ab5fSopenharmony_ci     * @param { ArrayBuffer } buffer - An array is initialized with the given elements
38453af6ab5fSopenharmony_ci     * @param { number } [byteOffset] - The byteOffset (in bytes) parameter specifies the memory range
38463af6ab5fSopenharmony_ci     *     that will be exposed by the typed array view.
38473af6ab5fSopenharmony_ci     * @param { number } [length] - The length parameter specifies the memory range
38483af6ab5fSopenharmony_ci     *     that will be exposed by the typed array view.
38493af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Int32Array's constructor cannot be directly invoked.
38503af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
38513af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
38523af6ab5fSopenharmony_ci     * @crossplatform
38533af6ab5fSopenharmony_ci     * @atomicservice
38543af6ab5fSopenharmony_ci     * @since 12
38553af6ab5fSopenharmony_ci     */
38563af6ab5fSopenharmony_ci    constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number);
38573af6ab5fSopenharmony_ci    /**
38583af6ab5fSopenharmony_ci     * Creates an Int32Array from an array-like object.
38593af6ab5fSopenharmony_ci     *
38603af6ab5fSopenharmony_ci     * @param { ArrayLike<number> } arrayLike - An array-like object to convert to an Int32Array.
38613af6ab5fSopenharmony_ci     * @returns { Int32Array } A new Int32Array instance
38623af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
38633af6ab5fSopenharmony_ci     * @static
38643af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
38653af6ab5fSopenharmony_ci     * @crossplatform
38663af6ab5fSopenharmony_ci     * @atomicservice
38673af6ab5fSopenharmony_ci     * @since 12
38683af6ab5fSopenharmony_ci     */
38693af6ab5fSopenharmony_ci    static from(arrayLike: ArrayLike<number>): Int32Array;
38703af6ab5fSopenharmony_ci    /**
38713af6ab5fSopenharmony_ci     * Creates an Int32Array from an array-like object.
38723af6ab5fSopenharmony_ci     *
38733af6ab5fSopenharmony_ci     * @param { ArrayLike<T> } arrayLike - An array-like object to convert to an Int32Array.
38743af6ab5fSopenharmony_ci     * @param { TypedArrayFromMapFn<T, number> } mapFn - A mapping function to call on every element of the array.
38753af6ab5fSopenharmony_ci     * @returns { Int32Array } A new Int32Array instance
38763af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
38773af6ab5fSopenharmony_ci     * @static
38783af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
38793af6ab5fSopenharmony_ci     * @crossplatform
38803af6ab5fSopenharmony_ci     * @atomicservice
38813af6ab5fSopenharmony_ci     * @since 12
38823af6ab5fSopenharmony_ci     */
38833af6ab5fSopenharmony_ci    static from<T>(arrayLike: ArrayLike<T>, mapFn: TypedArrayFromMapFn<T, number>): Int32Array;
38843af6ab5fSopenharmony_ci    /**
38853af6ab5fSopenharmony_ci     * Creates an Int32Array from an iterable object.
38863af6ab5fSopenharmony_ci     *
38873af6ab5fSopenharmony_ci     * @param { Iterable<number> } arrayLike - An iterable object to convert to an Int32Array.
38883af6ab5fSopenharmony_ci     * @param { TypedArrayFromMapFn<number, number> } [mapFn] - A mapping function to
38893af6ab5fSopenharmony_ci     *     call on every element of the array.
38903af6ab5fSopenharmony_ci     * @returns { Int32Array } A new Int32Array instance
38913af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
38923af6ab5fSopenharmony_ci     * @static
38933af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
38943af6ab5fSopenharmony_ci     * @crossplatform
38953af6ab5fSopenharmony_ci     * @atomicservice
38963af6ab5fSopenharmony_ci     * @since 12
38973af6ab5fSopenharmony_ci     */
38983af6ab5fSopenharmony_ci    static from(arrayLike: Iterable<number>, mapFn?: TypedArrayFromMapFn<number, number>): Int32Array;
38993af6ab5fSopenharmony_ci    /**
39003af6ab5fSopenharmony_ci     * Returns the this object after copying a section of the array identified by start and end
39013af6ab5fSopenharmony_ci     * to the same array starting at position target.
39023af6ab5fSopenharmony_ci     *
39033af6ab5fSopenharmony_ci     * @param { number } target - If target is negative, it is treated as length+target where length is the
39043af6ab5fSopenharmony_ci     *     length of the array.
39053af6ab5fSopenharmony_ci     * @param { number } start - If start is negative, it is treated as length+start. If end is negative, it
39063af6ab5fSopenharmony_ci     *     is treated as length+end.
39073af6ab5fSopenharmony_ci     * @param { number } [end] - If not specified, length of the this object is used as its default value.
39083af6ab5fSopenharmony_ci     * @returns { Int32Array } The array itself.
39093af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
39103af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound.
39113af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
39123af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
39133af6ab5fSopenharmony_ci     * @crossplatform
39143af6ab5fSopenharmony_ci     * @atomicservice
39153af6ab5fSopenharmony_ci     * @since 12
39163af6ab5fSopenharmony_ci     */
39173af6ab5fSopenharmony_ci    copyWithin(target: number, start: number, end?: number): Int32Array;
39183af6ab5fSopenharmony_ci    /**
39193af6ab5fSopenharmony_ci     * Determines whether all the members of an array satisfy the specified test.
39203af6ab5fSopenharmony_ci     *
39213af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Int32Array> } predicate - A function that accepts up to three arguments.
39223af6ab5fSopenharmony_ci     *     The every method calls the predicate function for each element in the array until
39233af6ab5fSopenharmony_ci     *     the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.
39243af6ab5fSopenharmony_ci     * @returns { boolean } true unless predicate returns a false value for a typed array element,
39253af6ab5fSopenharmony_ci     *     in which case false is immediately returned.
39263af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
39273af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The every method cannot be bound.
39283af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
39293af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
39303af6ab5fSopenharmony_ci     * @crossplatform
39313af6ab5fSopenharmony_ci     * @atomicservice
39323af6ab5fSopenharmony_ci     * @since 12
39333af6ab5fSopenharmony_ci     */
39343af6ab5fSopenharmony_ci    every(predicate: TypedArrayPredicateFn<number, Int32Array>): boolean;
39353af6ab5fSopenharmony_ci    /**
39363af6ab5fSopenharmony_ci     * Returns the this object after filling the section identified by start and end with value.
39373af6ab5fSopenharmony_ci     *
39383af6ab5fSopenharmony_ci     * @param { number } value - value to fill array section with.
39393af6ab5fSopenharmony_ci     * @param { number } [start] - index to start filling the array at. If start is negative, it is treated as
39403af6ab5fSopenharmony_ci     *     length+start where length is the length of the array.
39413af6ab5fSopenharmony_ci     * @param { number } [end] - index to stop filling the array at. If end is negative, it is treated as
39423af6ab5fSopenharmony_ci     *     length+end.
39433af6ab5fSopenharmony_ci     * @returns { Int32Array } The array itself.
39443af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
39453af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The fill method cannot be bound.
39463af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
39473af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
39483af6ab5fSopenharmony_ci     * @crossplatform
39493af6ab5fSopenharmony_ci     * @atomicservice
39503af6ab5fSopenharmony_ci     * @since 12
39513af6ab5fSopenharmony_ci     */
39523af6ab5fSopenharmony_ci    fill(value: number, start?: number, end?: number): Int32Array;
39533af6ab5fSopenharmony_ci    /**
39543af6ab5fSopenharmony_ci     * Returns the elements of an array that meet the condition specified in a callback function.
39553af6ab5fSopenharmony_ci     *
39563af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Int32Array> } predicate - A function that accepts up to three arguments.
39573af6ab5fSopenharmony_ci     *     The filter method calls the predicate function one time for each element in the array.
39583af6ab5fSopenharmony_ci     * @returns { Int32Array } The array itself.
39593af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
39603af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The filter method cannot be bound.
39613af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
39623af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
39633af6ab5fSopenharmony_ci     * @crossplatform
39643af6ab5fSopenharmony_ci     * @atomicservice
39653af6ab5fSopenharmony_ci     * @since 12
39663af6ab5fSopenharmony_ci     */
39673af6ab5fSopenharmony_ci    filter(predicate: TypedArrayPredicateFn<number, Int32Array>): Int32Array;
39683af6ab5fSopenharmony_ci    /**
39693af6ab5fSopenharmony_ci     * Returns the value of the first element in the array where predicate is true, and undefined
39703af6ab5fSopenharmony_ci     * otherwise.
39713af6ab5fSopenharmony_ci     *
39723af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Int32Array> } predicate - find calls predicate once for each element of
39733af6ab5fSopenharmony_ci     *     the array, in ascending order, until it finds one where predicate returns true.
39743af6ab5fSopenharmony_ci     *     If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.
39753af6ab5fSopenharmony_ci     * @returns { number | undefined } The first element in the typed array
39763af6ab5fSopenharmony_ci     *     that satisfies the provided testing function. Otherwise, undefined is returned.
39773af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
39783af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The find method cannot be bound.
39793af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
39803af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
39813af6ab5fSopenharmony_ci     * @crossplatform
39823af6ab5fSopenharmony_ci     * @atomicservice
39833af6ab5fSopenharmony_ci     * @since 12
39843af6ab5fSopenharmony_ci     */
39853af6ab5fSopenharmony_ci    find(predicate: TypedArrayPredicateFn<number, Int32Array>): number | undefined;
39863af6ab5fSopenharmony_ci    /**
39873af6ab5fSopenharmony_ci     * Returns the index of the first element in the array where predicate is true, and -1
39883af6ab5fSopenharmony_ci     * otherwise.
39893af6ab5fSopenharmony_ci     *
39903af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Int32Array> } predicate - find calls predicate once for each element of
39913af6ab5fSopenharmony_ci     *     the array, in ascending order, until it finds one where predicate returns true. If such an element is found,
39923af6ab5fSopenharmony_ci     *     findIndex immediately returns that element index. Otherwise, findIndex returns -1.
39933af6ab5fSopenharmony_ci     * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1.
39943af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
39953af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The findIndex method cannot be bound.
39963af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
39973af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
39983af6ab5fSopenharmony_ci     * @crossplatform
39993af6ab5fSopenharmony_ci     * @atomicservice
40003af6ab5fSopenharmony_ci     * @since 12
40013af6ab5fSopenharmony_ci     */
40023af6ab5fSopenharmony_ci    findIndex(predicate: TypedArrayPredicateFn<number, Int32Array>): number;
40033af6ab5fSopenharmony_ci    /**
40043af6ab5fSopenharmony_ci     * Performs the specified action for each element in an array.
40053af6ab5fSopenharmony_ci     *
40063af6ab5fSopenharmony_ci     * @param { TypedArrayForEachCallback<number, Int32Array> } callbackFn -  A function that
40073af6ab5fSopenharmony_ci     *     accepts up to three arguments.
40083af6ab5fSopenharmony_ci     *     forEach calls the callbackfn function one time for each element in the array.
40093af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
40103af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The forEach method cannot be bound.
40113af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
40123af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
40133af6ab5fSopenharmony_ci     * @crossplatform
40143af6ab5fSopenharmony_ci     * @atomicservice
40153af6ab5fSopenharmony_ci     * @since 12
40163af6ab5fSopenharmony_ci     */
40173af6ab5fSopenharmony_ci    forEach(callbackFn: TypedArrayForEachCallback<number, Int32Array>): void;
40183af6ab5fSopenharmony_ci    /**
40193af6ab5fSopenharmony_ci     * Returns the index of the first occurrence of a value in an array.
40203af6ab5fSopenharmony_ci     *
40213af6ab5fSopenharmony_ci     * @param { number } searchElement - The value to locate in the array.
40223af6ab5fSopenharmony_ci     * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the
40233af6ab5fSopenharmony_ci     *      search starts at index 0.
40243af6ab5fSopenharmony_ci     * @returns { number } The first index of searchElement in the typed array; -1 if not found.
40253af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
40263af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The indexOf method cannot be bound.
40273af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
40283af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
40293af6ab5fSopenharmony_ci     * @crossplatform
40303af6ab5fSopenharmony_ci     * @atomicservice
40313af6ab5fSopenharmony_ci     * @since 12
40323af6ab5fSopenharmony_ci     */
40333af6ab5fSopenharmony_ci    indexOf(searchElement: number, fromIndex?: number): number;
40343af6ab5fSopenharmony_ci    /**
40353af6ab5fSopenharmony_ci     * Adds all the elements of an array separated by the specified separator string.
40363af6ab5fSopenharmony_ci     * @param { string } [separator] - A string used to separate one element of an array from the next in the
40373af6ab5fSopenharmony_ci     *     resulting String. If omitted, the array elements are separated with a comma.
40383af6ab5fSopenharmony_ci     * @returns { string } A string with all typed array elements joined.
40393af6ab5fSopenharmony_ci     *     If array.length is 0, the empty string is returned.
40403af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
40413af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The join method cannot be bound.
40423af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
40433af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
40443af6ab5fSopenharmony_ci     * @crossplatform
40453af6ab5fSopenharmony_ci     * @atomicservice
40463af6ab5fSopenharmony_ci     * @since 12
40473af6ab5fSopenharmony_ci     */
40483af6ab5fSopenharmony_ci    join(separator?: string): string;
40493af6ab5fSopenharmony_ci    /**
40503af6ab5fSopenharmony_ci     * Calls a defined callback function on each element of an array, and returns an array that
40513af6ab5fSopenharmony_ci     * contains the results.
40523af6ab5fSopenharmony_ci     *
40533af6ab5fSopenharmony_ci     * @param { TypedArrayForEachCallback<number, Int32Array> } callbackFn - A function that
40543af6ab5fSopenharmony_ci     *     accepts up to three arguments.
40553af6ab5fSopenharmony_ci     *     The map method calls the callbackfn function one time for each element in the array.
40563af6ab5fSopenharmony_ci     * @returns { Int32Array } The array itself.
40573af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
40583af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The map method cannot be bound.
40593af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
40603af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
40613af6ab5fSopenharmony_ci     * @crossplatform
40623af6ab5fSopenharmony_ci     * @atomicservice
40633af6ab5fSopenharmony_ci     * @since 12
40643af6ab5fSopenharmony_ci     */
40653af6ab5fSopenharmony_ci    map(callbackFn: TypedArrayForEachCallback<number, Int32Array>): Int32Array;
40663af6ab5fSopenharmony_ci    /**
40673af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array. The return value of
40683af6ab5fSopenharmony_ci     * the callback function is the accumulated result, and is provided as an argument in the next
40693af6ab5fSopenharmony_ci     * call to the callback function.
40703af6ab5fSopenharmony_ci     *
40713af6ab5fSopenharmony_ci     * @param { TypedArrayReduceCallback<number, number, Int32Array> } callbackFn - A function that
40723af6ab5fSopenharmony_ci     *     accepts up to four arguments.
40733af6ab5fSopenharmony_ci     *     The reduce method calls the callbackfn function one time for each element in the array.
40743af6ab5fSopenharmony_ci     * @returns { number } The value that results from running the "reducer" callback function to
40753af6ab5fSopenharmony_ci     *     completion over the entire typed array.
40763af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
40773af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
40783af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
40793af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
40803af6ab5fSopenharmony_ci     * @crossplatform
40813af6ab5fSopenharmony_ci     * @atomicservice
40823af6ab5fSopenharmony_ci     * @since 12
40833af6ab5fSopenharmony_ci     */
40843af6ab5fSopenharmony_ci    reduce(callbackFn: TypedArrayReduceCallback<number, number, Int32Array>): number;
40853af6ab5fSopenharmony_ci    /**
40863af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array. The return value of
40873af6ab5fSopenharmony_ci     * the callback function is the accumulated result, and is provided as an argument in the next
40883af6ab5fSopenharmony_ci     * call to the callback function.
40893af6ab5fSopenharmony_ci     *
40903af6ab5fSopenharmony_ci     * @param { TypedArrayReduceCallback<number, number, Int32Array> } callbackFn - A function that
40913af6ab5fSopenharmony_ci     *     accepts up to four arguments.
40923af6ab5fSopenharmony_ci     *     The reduce method calls the callbackfn function one time for each element in the array.
40933af6ab5fSopenharmony_ci     * @param { number } initialValue - If initialValue is specified, it is used as the initial value to start
40943af6ab5fSopenharmony_ci     *     the accumulation. The first call to the callbackfn function provides this value as an argument
40953af6ab5fSopenharmony_ci     *     instead of an array value.
40963af6ab5fSopenharmony_ci     * @returns { number } The value that results from running the "reducer" callback function to
40973af6ab5fSopenharmony_ci     *     completion over the entire typed array.
40983af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
40993af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
41003af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
41013af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
41023af6ab5fSopenharmony_ci     * @crossplatform
41033af6ab5fSopenharmony_ci     * @atomicservice
41043af6ab5fSopenharmony_ci     * @since 12
41053af6ab5fSopenharmony_ci     */
41063af6ab5fSopenharmony_ci    reduce(callbackFn: TypedArrayReduceCallback<number, number, Int32Array>, initialValue: number): number;
41073af6ab5fSopenharmony_ci    /**
41083af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array. The return value of
41093af6ab5fSopenharmony_ci     * the callback function is the accumulated result, and is provided as an argument in the next
41103af6ab5fSopenharmony_ci     * call to the callback function.
41113af6ab5fSopenharmony_ci     *
41123af6ab5fSopenharmony_ci     * @param { TypedArrayReduceCallback<U, number, Int32Array> } callbackFn - A function that
41133af6ab5fSopenharmony_ci     *     accepts up to four arguments.
41143af6ab5fSopenharmony_ci     *     The reduce method calls the callbackfn function one time for each element in the array.
41153af6ab5fSopenharmony_ci     * @param { U } initialValue - If initialValue is specified, it is used as the initial value to start
41163af6ab5fSopenharmony_ci     *     the accumulation. The first call to the callbackfn function provides this value as an argument
41173af6ab5fSopenharmony_ci     *     instead of an array value.
41183af6ab5fSopenharmony_ci     * @returns { U } The value that results from running the "reducer" callback function to
41193af6ab5fSopenharmony_ci     *     completion over the entire typed array.
41203af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
41213af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
41223af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
41233af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
41243af6ab5fSopenharmony_ci     * @crossplatform
41253af6ab5fSopenharmony_ci     * @atomicservice
41263af6ab5fSopenharmony_ci     * @since 12
41273af6ab5fSopenharmony_ci     */
41283af6ab5fSopenharmony_ci    reduce<U>(callbackFn: TypedArrayReduceCallback<U, number, Int32Array>, initialValue: U): U;
41293af6ab5fSopenharmony_ci    /**
41303af6ab5fSopenharmony_ci     * Reverses the elements in an Array.
41313af6ab5fSopenharmony_ci     *
41323af6ab5fSopenharmony_ci     * @returns { Int32Array } The reference to the original typed array, now reversed.
41333af6ab5fSopenharmony_ci     *     <br/>Note that the typed array is reversed in place, and no copy is made.
41343af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reverse method cannot be bound.
41353af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
41363af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
41373af6ab5fSopenharmony_ci     * @crossplatform
41383af6ab5fSopenharmony_ci     * @atomicservice
41393af6ab5fSopenharmony_ci     * @since 12
41403af6ab5fSopenharmony_ci     */
41413af6ab5fSopenharmony_ci    reverse(): Int32Array;
41423af6ab5fSopenharmony_ci    /**
41433af6ab5fSopenharmony_ci     * Sets a value or an array of values.
41443af6ab5fSopenharmony_ci     *
41453af6ab5fSopenharmony_ci     * @param { ArrayLike<number> } array - A typed or untyped array of values to set.
41463af6ab5fSopenharmony_ci     * @param { number } [offset] - The index in the current array at which the values are to be written.
41473af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
41483af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The set method cannot be bound.
41493af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
41503af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
41513af6ab5fSopenharmony_ci     * @crossplatform
41523af6ab5fSopenharmony_ci     * @atomicservice
41533af6ab5fSopenharmony_ci     * @since 12
41543af6ab5fSopenharmony_ci     */
41553af6ab5fSopenharmony_ci    set(array: ArrayLike<number>, offset?: number): void;
41563af6ab5fSopenharmony_ci    /**
41573af6ab5fSopenharmony_ci     * Returns a section of an array.
41583af6ab5fSopenharmony_ci     *
41593af6ab5fSopenharmony_ci     * @param { number } [start] - The beginning of the specified portion of the array.
41603af6ab5fSopenharmony_ci     * @param { number } [end] - The end of the specified portion of the array.
41613af6ab5fSopenharmony_ci     *     This is exclusive of the element at the index 'end'.
41623af6ab5fSopenharmony_ci     * @returns { Int32Array } A new typed array containing the extracted elements.
41633af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
41643af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The slice method cannot be bound.
41653af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
41663af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
41673af6ab5fSopenharmony_ci     * @crossplatform
41683af6ab5fSopenharmony_ci     * @atomicservice
41693af6ab5fSopenharmony_ci     * @since 12
41703af6ab5fSopenharmony_ci     */
41713af6ab5fSopenharmony_ci    slice(start?: number, end?: number): Int32Array;
41723af6ab5fSopenharmony_ci    /**
41733af6ab5fSopenharmony_ci     * Determines whether the specified callback function returns true for any element of an array.
41743af6ab5fSopenharmony_ci     *
41753af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Int32Array> } predicate - A function that accepts up to three arguments.
41763af6ab5fSopenharmony_ci     *     The some method calls the predicate function for each element in the array until
41773af6ab5fSopenharmony_ci     *     the predicate returns a value which is coercible to the Boolean value true, or until the end of the array.
41783af6ab5fSopenharmony_ci     * @returns { boolean } false unless predicate returns a truthy value for a typed array element,
41793af6ab5fSopenharmony_ci     *     in which case true is immediately returned.
41803af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
41813af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The some method cannot be bound.
41823af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
41833af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
41843af6ab5fSopenharmony_ci     * @crossplatform
41853af6ab5fSopenharmony_ci     * @atomicservice
41863af6ab5fSopenharmony_ci     * @since 12
41873af6ab5fSopenharmony_ci     */
41883af6ab5fSopenharmony_ci    some(predicate: TypedArrayPredicateFn<number, Int32Array>): boolean;
41893af6ab5fSopenharmony_ci    /**
41903af6ab5fSopenharmony_ci     * Sorts an array.
41913af6ab5fSopenharmony_ci     *
41923af6ab5fSopenharmony_ci     * @param { TypedArrayCompareFn<number> } [compareFn] - Function used to determine the order of the elements.
41933af6ab5fSopenharmony_ci     *     It is expected to return a negative value if first argument is less than second argument,
41943af6ab5fSopenharmony_ci     *     zero if they're equal and a positive value otherwise.
41953af6ab5fSopenharmony_ci     *     If omitted, the elements are sorted in ascending, ASCII character order.
41963af6ab5fSopenharmony_ci     * @returns { Int32Array } The reference to the original typed array, now sorted.
41973af6ab5fSopenharmony_ci     *     Note that the typed array is sorted in place and no copy is made.
41983af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
41993af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The sort method cannot be bound.
42003af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
42013af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
42023af6ab5fSopenharmony_ci     * @crossplatform
42033af6ab5fSopenharmony_ci     * @atomicservice
42043af6ab5fSopenharmony_ci     * @since 12
42053af6ab5fSopenharmony_ci     */
42063af6ab5fSopenharmony_ci    sort(compareFn?: TypedArrayCompareFn<number>): Int32Array;
42073af6ab5fSopenharmony_ci    /**
42083af6ab5fSopenharmony_ci     * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements
42093af6ab5fSopenharmony_ci     * at begin, inclusive, up to end, exclusive.
42103af6ab5fSopenharmony_ci     *
42113af6ab5fSopenharmony_ci     * @param { number } [begin] - The index of the beginning of the array.
42123af6ab5fSopenharmony_ci     * @param { number } [end] - The index of the end of the array.
42133af6ab5fSopenharmony_ci     * @returns { Int32Array } A new Int32Array object.
42143af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
42153af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The subarray method cannot be bound.
42163af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
42173af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
42183af6ab5fSopenharmony_ci     * @crossplatform
42193af6ab5fSopenharmony_ci     * @atomicservice
42203af6ab5fSopenharmony_ci     * @since 12
42213af6ab5fSopenharmony_ci     */
42223af6ab5fSopenharmony_ci    subarray(begin?: number, end?: number): Int32Array;
42233af6ab5fSopenharmony_ci    /**
42243af6ab5fSopenharmony_ci     * Returns the item located at the specified index.
42253af6ab5fSopenharmony_ci     *
42263af6ab5fSopenharmony_ci     * @param { number } index - The zero-based index of the desired code unit.<br/>
42273af6ab5fSopenharmony_ci     *     A negative index will count back from the last item.
42283af6ab5fSopenharmony_ci     * @returns { number | undefined } The element in the array matching the given index.<br/>
42293af6ab5fSopenharmony_ci     *     Always returns undefined if index < -array.length or
42303af6ab5fSopenharmony_ci     *     index >= array.length without attempting to access the corresponding property.
42313af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
42323af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The at method cannot be bound.
42333af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
42343af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
42353af6ab5fSopenharmony_ci     * @crossplatform
42363af6ab5fSopenharmony_ci     * @atomicservice
42373af6ab5fSopenharmony_ci     * @since 12
42383af6ab5fSopenharmony_ci     */
42393af6ab5fSopenharmony_ci    at(index: number): number | undefined;
42403af6ab5fSopenharmony_ci    /**
42413af6ab5fSopenharmony_ci     * Returns an iterable of key, value pairs for every entry in the array
42423af6ab5fSopenharmony_ci     *
42433af6ab5fSopenharmony_ci     * @returns { IterableIterator<[number, number]> } A new iterable iterator object.
42443af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
42453af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
42463af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
42473af6ab5fSopenharmony_ci     * @crossplatform
42483af6ab5fSopenharmony_ci     * @atomicservice
42493af6ab5fSopenharmony_ci     * @since 12
42503af6ab5fSopenharmony_ci     */
42513af6ab5fSopenharmony_ci    entries(): IterableIterator<[number, number]>;
42523af6ab5fSopenharmony_ci    /**
42533af6ab5fSopenharmony_ci     * Returns an iterable of keys in the array
42543af6ab5fSopenharmony_ci     *
42553af6ab5fSopenharmony_ci     * @returns { IterableIterator<number> } A new iterable iterator object.
42563af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
42573af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
42583af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
42593af6ab5fSopenharmony_ci     * @crossplatform
42603af6ab5fSopenharmony_ci     * @atomicservice
42613af6ab5fSopenharmony_ci     * @since 12
42623af6ab5fSopenharmony_ci     */
42633af6ab5fSopenharmony_ci    keys(): IterableIterator<number>;
42643af6ab5fSopenharmony_ci    /**
42653af6ab5fSopenharmony_ci     * Returns an iterable of values in the array
42663af6ab5fSopenharmony_ci     *
42673af6ab5fSopenharmony_ci     * @returns { IterableIterator<number> } A new iterable iterator object.
42683af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
42693af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
42703af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
42713af6ab5fSopenharmony_ci     * @crossplatform
42723af6ab5fSopenharmony_ci     * @atomicservice
42733af6ab5fSopenharmony_ci     * @since 12
42743af6ab5fSopenharmony_ci     */
42753af6ab5fSopenharmony_ci    values(): IterableIterator<number>;
42763af6ab5fSopenharmony_ci    /**
42773af6ab5fSopenharmony_ci     * Determines whether an array includes a certain element, returning true or false as appropriate.
42783af6ab5fSopenharmony_ci     *
42793af6ab5fSopenharmony_ci     * @param { number } searchElement - The element to search for.
42803af6ab5fSopenharmony_ci     * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement.
42813af6ab5fSopenharmony_ci     * @returns { boolean } A boolean value which is true if the value searchElement is found <br/>
42823af6ab5fSopenharmony_ci     *     within the typed array (or the part of the typed array indicated by the index fromIndex, if specified).
42833af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
42843af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The at method cannot be bound.
42853af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
42863af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
42873af6ab5fSopenharmony_ci     * @crossplatform
42883af6ab5fSopenharmony_ci     * @atomicservice
42893af6ab5fSopenharmony_ci     * @since 12
42903af6ab5fSopenharmony_ci     */
42913af6ab5fSopenharmony_ci    includes(searchElement: number, fromIndex?: number): boolean;
42923af6ab5fSopenharmony_ci    /**
42933af6ab5fSopenharmony_ci     * Returns the item at that index.
42943af6ab5fSopenharmony_ci     * 
42953af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
42963af6ab5fSopenharmony_ci     * @crossplatform
42973af6ab5fSopenharmony_ci     * @atomicservice
42983af6ab5fSopenharmony_ci     * @since 12
42993af6ab5fSopenharmony_ci     */
43003af6ab5fSopenharmony_ci    [index: number]: number;
43013af6ab5fSopenharmony_ci  }
43023af6ab5fSopenharmony_ci
43033af6ab5fSopenharmony_ci  /**
43043af6ab5fSopenharmony_ci   * A typed array of 32-bit unsigned integer values. The contents are initialized to 0.
43053af6ab5fSopenharmony_ci   * If multiple threads access a Uint32Array instance concurrently, 
43063af6ab5fSopenharmony_ci   * and at least one of the threads modifies the array structurally,
43073af6ab5fSopenharmony_ci   * it must be synchronized externally. 
43083af6ab5fSopenharmony_ci   *
43093af6ab5fSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
43103af6ab5fSopenharmony_ci   * @crossplatform
43113af6ab5fSopenharmony_ci   * @atomicservice
43123af6ab5fSopenharmony_ci   * @since 12
43133af6ab5fSopenharmony_ci   */
43143af6ab5fSopenharmony_ci  @Sendable
43153af6ab5fSopenharmony_ci  class Uint32Array {
43163af6ab5fSopenharmony_ci    /**
43173af6ab5fSopenharmony_ci     * The size in bytes of each element in the array.
43183af6ab5fSopenharmony_ci     *
43193af6ab5fSopenharmony_ci     * @type { number }
43203af6ab5fSopenharmony_ci     * @readonly
43213af6ab5fSopenharmony_ci     * @static
43223af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
43233af6ab5fSopenharmony_ci     * @crossplatform
43243af6ab5fSopenharmony_ci     * @atomicservice
43253af6ab5fSopenharmony_ci     * @since 12
43263af6ab5fSopenharmony_ci     */
43273af6ab5fSopenharmony_ci    public static readonly BYTES_PER_ELEMENT: number;
43283af6ab5fSopenharmony_ci    /**
43293af6ab5fSopenharmony_ci     * The ArrayBuffer instance referenced by the array.
43303af6ab5fSopenharmony_ci     *
43313af6ab5fSopenharmony_ci     * @type { ArrayBuffer }
43323af6ab5fSopenharmony_ci     * @readonly
43333af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
43343af6ab5fSopenharmony_ci     * @crossplatform
43353af6ab5fSopenharmony_ci     * @atomicservice
43363af6ab5fSopenharmony_ci     * @since 12
43373af6ab5fSopenharmony_ci     */
43383af6ab5fSopenharmony_ci    public readonly buffer: ArrayBuffer;
43393af6ab5fSopenharmony_ci    /**
43403af6ab5fSopenharmony_ci     * The length in bytes of the array.
43413af6ab5fSopenharmony_ci     *
43423af6ab5fSopenharmony_ci     * @type { number }
43433af6ab5fSopenharmony_ci     * @readonly
43443af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
43453af6ab5fSopenharmony_ci     * @crossplatform
43463af6ab5fSopenharmony_ci     * @atomicservice
43473af6ab5fSopenharmony_ci     * @since 12
43483af6ab5fSopenharmony_ci     */
43493af6ab5fSopenharmony_ci    public readonly byteLength: number;
43503af6ab5fSopenharmony_ci    /**
43513af6ab5fSopenharmony_ci     * The offset in bytes of the array.
43523af6ab5fSopenharmony_ci     *
43533af6ab5fSopenharmony_ci     * @type { number }
43543af6ab5fSopenharmony_ci     * @readonly
43553af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
43563af6ab5fSopenharmony_ci     * @crossplatform
43573af6ab5fSopenharmony_ci     * @atomicservice
43583af6ab5fSopenharmony_ci     * @since 12
43593af6ab5fSopenharmony_ci     */
43603af6ab5fSopenharmony_ci    public readonly byteOffset: number;
43613af6ab5fSopenharmony_ci    /**
43623af6ab5fSopenharmony_ci     * The length of the array.
43633af6ab5fSopenharmony_ci     *
43643af6ab5fSopenharmony_ci     * @type { number }
43653af6ab5fSopenharmony_ci     * @readonly
43663af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
43673af6ab5fSopenharmony_ci     * @crossplatform
43683af6ab5fSopenharmony_ci     * @atomicservice
43693af6ab5fSopenharmony_ci     * @since 12
43703af6ab5fSopenharmony_ci     */
43713af6ab5fSopenharmony_ci    public readonly length: number;
43723af6ab5fSopenharmony_ci    /**
43733af6ab5fSopenharmony_ci     * A constructor used to create an Uint32Array.
43743af6ab5fSopenharmony_ci     *
43753af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Uint32Array's constructor cannot be directly invoked.
43763af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
43773af6ab5fSopenharmony_ci     * @crossplatform
43783af6ab5fSopenharmony_ci     * @atomicservice
43793af6ab5fSopenharmony_ci     * @since 12
43803af6ab5fSopenharmony_ci     */
43813af6ab5fSopenharmony_ci    constructor();
43823af6ab5fSopenharmony_ci    /**
43833af6ab5fSopenharmony_ci     * A constructor used to create an Uint32Array.
43843af6ab5fSopenharmony_ci     *
43853af6ab5fSopenharmony_ci     * @param { number } length - The length of the array
43863af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Uint32Array's constructor cannot be directly invoked.
43873af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
43883af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
43893af6ab5fSopenharmony_ci     * @crossplatform
43903af6ab5fSopenharmony_ci     * @atomicservice
43913af6ab5fSopenharmony_ci     * @since 12
43923af6ab5fSopenharmony_ci     */
43933af6ab5fSopenharmony_ci    constructor(length: number);
43943af6ab5fSopenharmony_ci    /**
43953af6ab5fSopenharmony_ci     * A constructor used to create an Uint32Array.
43963af6ab5fSopenharmony_ci     *
43973af6ab5fSopenharmony_ci     * @param { ArrayLike<number> | ArrayBuffer } array - An array is initialized with the given elements
43983af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Uint32Array's constructor cannot be directly invoked.
43993af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
44003af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
44013af6ab5fSopenharmony_ci     * @crossplatform
44023af6ab5fSopenharmony_ci     * @atomicservice
44033af6ab5fSopenharmony_ci     * @since 12
44043af6ab5fSopenharmony_ci     */
44053af6ab5fSopenharmony_ci    constructor(array: ArrayLike<number> | ArrayBuffer);
44063af6ab5fSopenharmony_ci    /**
44073af6ab5fSopenharmony_ci     * A constructor used to create an Uint32Array.
44083af6ab5fSopenharmony_ci     *
44093af6ab5fSopenharmony_ci     * @param { ArrayBuffer } buffer - An array is initialized with the given elements
44103af6ab5fSopenharmony_ci     * @param { number } [byteOffset] - The byteOffset (in bytes) parameter specifies the memory range
44113af6ab5fSopenharmony_ci     *     that will be exposed by the typed array view.
44123af6ab5fSopenharmony_ci     * @param { number } [length] - The length parameter specifies the memory range
44133af6ab5fSopenharmony_ci     *     that will be exposed by the typed array view.
44143af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200012 - The Uint32Array's constructor cannot be directly invoked.
44153af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
44163af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
44173af6ab5fSopenharmony_ci     * @crossplatform
44183af6ab5fSopenharmony_ci     * @atomicservice
44193af6ab5fSopenharmony_ci     * @since 12
44203af6ab5fSopenharmony_ci     */
44213af6ab5fSopenharmony_ci    constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number);
44223af6ab5fSopenharmony_ci    /**
44233af6ab5fSopenharmony_ci     * Creates an Uint32Array from an array-like object.
44243af6ab5fSopenharmony_ci     *
44253af6ab5fSopenharmony_ci     * @param { ArrayLike<number> } arrayLike - An array-like object to convert to an Uint32Array.
44263af6ab5fSopenharmony_ci     * @returns { Uint32Array } A new Uint32Array instance
44273af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
44283af6ab5fSopenharmony_ci     * @static
44293af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
44303af6ab5fSopenharmony_ci     * @crossplatform
44313af6ab5fSopenharmony_ci     * @atomicservice
44323af6ab5fSopenharmony_ci     * @since 12
44333af6ab5fSopenharmony_ci     */
44343af6ab5fSopenharmony_ci    static from(arrayLike: ArrayLike<number>): Uint32Array;
44353af6ab5fSopenharmony_ci    /**
44363af6ab5fSopenharmony_ci     * Creates an Uint32Array from an array-like object.
44373af6ab5fSopenharmony_ci     *
44383af6ab5fSopenharmony_ci     * @param { ArrayLike<T> } arrayLike - An array-like object to convert to an Uint32Array.
44393af6ab5fSopenharmony_ci     * @param { TypedArrayFromMapFn<T, number> } mapFn - A mapping function to call on every element of the array.
44403af6ab5fSopenharmony_ci     * @returns { Uint32Array } A new Uint32Array instance
44413af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
44423af6ab5fSopenharmony_ci     * @static
44433af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
44443af6ab5fSopenharmony_ci     * @crossplatform
44453af6ab5fSopenharmony_ci     * @atomicservice
44463af6ab5fSopenharmony_ci     * @since 12
44473af6ab5fSopenharmony_ci     */
44483af6ab5fSopenharmony_ci    static from<T>(arrayLike: ArrayLike<T>, mapFn: TypedArrayFromMapFn<T, number>): Uint32Array;
44493af6ab5fSopenharmony_ci    /**
44503af6ab5fSopenharmony_ci     * Creates an Uint32Array from an iterable object.
44513af6ab5fSopenharmony_ci     *
44523af6ab5fSopenharmony_ci     * @param { Iterable<number> } arrayLike - An iterable object to convert to an Uint32Array.
44533af6ab5fSopenharmony_ci     * @param { TypedArrayFromMapFn<number, number> } [mapFn] - A mapping function to
44543af6ab5fSopenharmony_ci     *     call on every element of the array.
44553af6ab5fSopenharmony_ci     * @returns { Uint32Array } A new Uint32Array instance
44563af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
44573af6ab5fSopenharmony_ci     * @static
44583af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
44593af6ab5fSopenharmony_ci     * @crossplatform
44603af6ab5fSopenharmony_ci     * @atomicservice
44613af6ab5fSopenharmony_ci     * @since 12
44623af6ab5fSopenharmony_ci     */
44633af6ab5fSopenharmony_ci    static from(arrayLike: Iterable<number>, mapFn?: TypedArrayFromMapFn<number, number>): Uint32Array;
44643af6ab5fSopenharmony_ci    /**
44653af6ab5fSopenharmony_ci     * Returns the this object after copying a section of the array identified by start and end
44663af6ab5fSopenharmony_ci     * to the same array starting at position target.
44673af6ab5fSopenharmony_ci     *
44683af6ab5fSopenharmony_ci     * @param { number } target - If target is negative, it is treated as length+target where length is the
44693af6ab5fSopenharmony_ci     *     length of the array.
44703af6ab5fSopenharmony_ci     * @param { number } start - If start is negative, it is treated as length+start. If end is negative, it
44713af6ab5fSopenharmony_ci     *     is treated as length+end.
44723af6ab5fSopenharmony_ci     * @param { number } [end] - If not specified, length of the this object is used as its default value.
44733af6ab5fSopenharmony_ci     * @returns { Uint32Array } The array itself.
44743af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
44753af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound.
44763af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
44773af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
44783af6ab5fSopenharmony_ci     * @crossplatform
44793af6ab5fSopenharmony_ci     * @atomicservice
44803af6ab5fSopenharmony_ci     * @since 12
44813af6ab5fSopenharmony_ci     */
44823af6ab5fSopenharmony_ci    copyWithin(target: number, start: number, end?: number): Uint32Array;
44833af6ab5fSopenharmony_ci    /**
44843af6ab5fSopenharmony_ci     * Determines whether all the members of an array satisfy the specified test.
44853af6ab5fSopenharmony_ci     *
44863af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Uint32Array> } predicate - A function that accepts up to three arguments.
44873af6ab5fSopenharmony_ci     *     The every method calls the predicate function for each element in the array until
44883af6ab5fSopenharmony_ci     *     the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.
44893af6ab5fSopenharmony_ci     * @returns { boolean } true unless predicate returns a false value for a typed array element,
44903af6ab5fSopenharmony_ci     *     in which case false is immediately returned.
44913af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
44923af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The every method cannot be bound.
44933af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
44943af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
44953af6ab5fSopenharmony_ci     * @crossplatform
44963af6ab5fSopenharmony_ci     * @atomicservice
44973af6ab5fSopenharmony_ci     * @since 12
44983af6ab5fSopenharmony_ci     */
44993af6ab5fSopenharmony_ci    every(predicate: TypedArrayPredicateFn<number, Uint32Array>): boolean;
45003af6ab5fSopenharmony_ci    /**
45013af6ab5fSopenharmony_ci     * Returns the this object after filling the section identified by start and end with value.
45023af6ab5fSopenharmony_ci     *
45033af6ab5fSopenharmony_ci     * @param { number } value - value to fill array section with.
45043af6ab5fSopenharmony_ci     * @param { number } [start] - index to start filling the array at. If start is negative, it is treated as
45053af6ab5fSopenharmony_ci     *     length+start where length is the length of the array.
45063af6ab5fSopenharmony_ci     * @param { number } [end] - index to stop filling the array at. If end is negative, it is treated as
45073af6ab5fSopenharmony_ci     *     length+end.
45083af6ab5fSopenharmony_ci     * @returns { Uint32Array } The array itself.
45093af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
45103af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The fill method cannot be bound.
45113af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
45123af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
45133af6ab5fSopenharmony_ci     * @crossplatform
45143af6ab5fSopenharmony_ci     * @atomicservice
45153af6ab5fSopenharmony_ci     * @since 12
45163af6ab5fSopenharmony_ci     */
45173af6ab5fSopenharmony_ci    fill(value: number, start?: number, end?: number): Uint32Array;
45183af6ab5fSopenharmony_ci    /**
45193af6ab5fSopenharmony_ci     * Returns the elements of an array that meet the condition specified in a callback function.
45203af6ab5fSopenharmony_ci     *
45213af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Uint32Array> } predicate - A function that accepts up to three arguments.
45223af6ab5fSopenharmony_ci     *     The filter method calls the predicate function one time for each element in the array.
45233af6ab5fSopenharmony_ci     * @returns { Uint32Array } The array itself.
45243af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
45253af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The filter method cannot be bound.
45263af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
45273af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
45283af6ab5fSopenharmony_ci     * @crossplatform
45293af6ab5fSopenharmony_ci     * @atomicservice
45303af6ab5fSopenharmony_ci     * @since 12
45313af6ab5fSopenharmony_ci     */
45323af6ab5fSopenharmony_ci    filter(predicate: TypedArrayPredicateFn<number, Uint32Array>): Uint32Array;
45333af6ab5fSopenharmony_ci    /**
45343af6ab5fSopenharmony_ci     * Returns the value of the first element in the array where predicate is true, and undefined
45353af6ab5fSopenharmony_ci     * otherwise.
45363af6ab5fSopenharmony_ci     *
45373af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Uint32Array> } predicate - find calls predicate once for each element of
45383af6ab5fSopenharmony_ci     *     the array, in ascending order, until it finds one where predicate returns true.
45393af6ab5fSopenharmony_ci     *     If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.
45403af6ab5fSopenharmony_ci     * @returns { number | undefined } The first element in the typed array
45413af6ab5fSopenharmony_ci     *     that satisfies the provided testing function. Otherwise, undefined is returned.
45423af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
45433af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The find method cannot be bound.
45443af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
45453af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
45463af6ab5fSopenharmony_ci     * @crossplatform
45473af6ab5fSopenharmony_ci     * @atomicservice
45483af6ab5fSopenharmony_ci     * @since 12
45493af6ab5fSopenharmony_ci     */
45503af6ab5fSopenharmony_ci    find(predicate: TypedArrayPredicateFn<number, Uint32Array>): number | undefined;
45513af6ab5fSopenharmony_ci    /**
45523af6ab5fSopenharmony_ci     * Returns the index of the first element in the array where predicate is true, and -1
45533af6ab5fSopenharmony_ci     * otherwise.
45543af6ab5fSopenharmony_ci     *
45553af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Uint32Array> } predicate - find calls predicate once for each element of
45563af6ab5fSopenharmony_ci     *     the array, in ascending order, until it finds one where predicate returns true. If such an element is found,
45573af6ab5fSopenharmony_ci     *     findIndex immediately returns that element index. Otherwise, findIndex returns -1.
45583af6ab5fSopenharmony_ci     * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1.
45593af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
45603af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The findIndex method cannot be bound.
45613af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
45623af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
45633af6ab5fSopenharmony_ci     * @crossplatform
45643af6ab5fSopenharmony_ci     * @atomicservice
45653af6ab5fSopenharmony_ci     * @since 12
45663af6ab5fSopenharmony_ci     */
45673af6ab5fSopenharmony_ci    findIndex(predicate: TypedArrayPredicateFn<number, Uint32Array>): number;
45683af6ab5fSopenharmony_ci    /**
45693af6ab5fSopenharmony_ci     * Performs the specified action for each element in an array.
45703af6ab5fSopenharmony_ci     *
45713af6ab5fSopenharmony_ci     * @param { TypedArrayForEachCallback<number, Uint32Array> } callbackFn -  A function that
45723af6ab5fSopenharmony_ci     *     accepts up to three arguments.
45733af6ab5fSopenharmony_ci     *     forEach calls the callbackfn function one time for each element in the array.
45743af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
45753af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The forEach method cannot be bound.
45763af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
45773af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
45783af6ab5fSopenharmony_ci     * @crossplatform
45793af6ab5fSopenharmony_ci     * @atomicservice
45803af6ab5fSopenharmony_ci     * @since 12
45813af6ab5fSopenharmony_ci     */
45823af6ab5fSopenharmony_ci    forEach(callbackFn: TypedArrayForEachCallback<number, Uint32Array>): void;
45833af6ab5fSopenharmony_ci    /**
45843af6ab5fSopenharmony_ci     * Returns the index of the first occurrence of a value in an array.
45853af6ab5fSopenharmony_ci     *
45863af6ab5fSopenharmony_ci     * @param { number } searchElement - The value to locate in the array.
45873af6ab5fSopenharmony_ci     * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the
45883af6ab5fSopenharmony_ci     *      search starts at index 0.
45893af6ab5fSopenharmony_ci     * @returns { number } The first index of searchElement in the typed array; -1 if not found.
45903af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
45913af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The indexOf method cannot be bound.
45923af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
45933af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
45943af6ab5fSopenharmony_ci     * @crossplatform
45953af6ab5fSopenharmony_ci     * @atomicservice
45963af6ab5fSopenharmony_ci     * @since 12
45973af6ab5fSopenharmony_ci     */
45983af6ab5fSopenharmony_ci    indexOf(searchElement: number, fromIndex?: number): number;
45993af6ab5fSopenharmony_ci    /**
46003af6ab5fSopenharmony_ci     * Adds all the elements of an array separated by the specified separator string.
46013af6ab5fSopenharmony_ci     * @param { string } [separator] - A string used to separate one element of an array from the next in the
46023af6ab5fSopenharmony_ci     *     resulting String. If omitted, the array elements are separated with a comma.
46033af6ab5fSopenharmony_ci     * @returns { string } A string with all typed array elements joined.
46043af6ab5fSopenharmony_ci     *     If array.length is 0, the empty string is returned.
46053af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
46063af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The join method cannot be bound.
46073af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
46083af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
46093af6ab5fSopenharmony_ci     * @crossplatform
46103af6ab5fSopenharmony_ci     * @atomicservice
46113af6ab5fSopenharmony_ci     * @since 12
46123af6ab5fSopenharmony_ci     */
46133af6ab5fSopenharmony_ci    join(separator?: string): string;
46143af6ab5fSopenharmony_ci    /**
46153af6ab5fSopenharmony_ci     * Calls a defined callback function on each element of an array, and returns an array that
46163af6ab5fSopenharmony_ci     * contains the results.
46173af6ab5fSopenharmony_ci     *
46183af6ab5fSopenharmony_ci     * @param { TypedArrayForEachCallback<number, Uint32Array> } callbackFn - A function that accepts up to
46193af6ab5fSopenharmony_ci     *     three arguments. The map method calls the callbackfn function one time for each element in the array.
46203af6ab5fSopenharmony_ci     * @returns { Uint32Array } The array itself.
46213af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
46223af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The map method cannot be bound.
46233af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
46243af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
46253af6ab5fSopenharmony_ci     * @crossplatform
46263af6ab5fSopenharmony_ci     * @atomicservice
46273af6ab5fSopenharmony_ci     * @since 12
46283af6ab5fSopenharmony_ci     */
46293af6ab5fSopenharmony_ci    map(callbackFn: TypedArrayForEachCallback<number, Uint32Array>): Uint32Array;
46303af6ab5fSopenharmony_ci    /**
46313af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array. The return value of
46323af6ab5fSopenharmony_ci     * the callback function is the accumulated result, and is provided as an argument in the next
46333af6ab5fSopenharmony_ci     * call to the callback function.
46343af6ab5fSopenharmony_ci     *
46353af6ab5fSopenharmony_ci     * @param { TypedArrayReduceCallback<number, number, Uint32Array> } callbackFn - A function that
46363af6ab5fSopenharmony_ci     *     accepts up to four arguments.
46373af6ab5fSopenharmony_ci     *     The reduce method calls the callbackfn function one time for each element in the array.
46383af6ab5fSopenharmony_ci     * @returns { number } The value that results from running the "reducer" callback function to
46393af6ab5fSopenharmony_ci     *     completion over the entire typed array.
46403af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
46413af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
46423af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
46433af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
46443af6ab5fSopenharmony_ci     * @crossplatform
46453af6ab5fSopenharmony_ci     * @atomicservice
46463af6ab5fSopenharmony_ci     * @since 12
46473af6ab5fSopenharmony_ci     */
46483af6ab5fSopenharmony_ci    reduce(callbackFn: TypedArrayReduceCallback<number, number, Uint32Array>): number;
46493af6ab5fSopenharmony_ci    /**
46503af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array. The return value of
46513af6ab5fSopenharmony_ci     * the callback function is the accumulated result, and is provided as an argument in the next
46523af6ab5fSopenharmony_ci     * call to the callback function.
46533af6ab5fSopenharmony_ci     *
46543af6ab5fSopenharmony_ci     * @param { TypedArrayReduceCallback<number, number, Uint32Array> } callbackFn - A function that
46553af6ab5fSopenharmony_ci     *     accepts up to four arguments.
46563af6ab5fSopenharmony_ci     *     The reduce method calls the callbackfn function one time for each element in the array.
46573af6ab5fSopenharmony_ci     * @param { number } initialValue - If initialValue is specified, it is used as the initial value to start
46583af6ab5fSopenharmony_ci     *     the accumulation. The first call to the callbackfn function provides this value as an argument
46593af6ab5fSopenharmony_ci     *     instead of an array value.
46603af6ab5fSopenharmony_ci     * @returns { number } The value that results from running the "reducer" callback function to
46613af6ab5fSopenharmony_ci     *     completion over the entire typed array.
46623af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
46633af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
46643af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
46653af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
46663af6ab5fSopenharmony_ci     * @crossplatform
46673af6ab5fSopenharmony_ci     * @atomicservice
46683af6ab5fSopenharmony_ci     * @since 12
46693af6ab5fSopenharmony_ci     */
46703af6ab5fSopenharmony_ci    reduce(callbackFn: TypedArrayReduceCallback<number, number, Uint32Array>, initialValue: number): number;
46713af6ab5fSopenharmony_ci    /**
46723af6ab5fSopenharmony_ci     * Calls the specified callback function for all the elements in an array. The return value of
46733af6ab5fSopenharmony_ci     * the callback function is the accumulated result, and is provided as an argument in the next
46743af6ab5fSopenharmony_ci     * call to the callback function.
46753af6ab5fSopenharmony_ci     *
46763af6ab5fSopenharmony_ci     * @param { TypedArrayReduceCallback<U, number, Uint32Array> } callbackFn - A function that
46773af6ab5fSopenharmony_ci     *     accepts up to four arguments.
46783af6ab5fSopenharmony_ci     *     The reduce method calls the callbackfn function one time for each element in the array.
46793af6ab5fSopenharmony_ci     * @param { U } initialValue - If initialValue is specified, it is used as the initial value to start
46803af6ab5fSopenharmony_ci     *     the accumulation. The first call to the callbackfn function provides this value as an argument
46813af6ab5fSopenharmony_ci     *     instead of an array value.
46823af6ab5fSopenharmony_ci     * @returns { U } The value that results from running the "reducer" callback function to
46833af6ab5fSopenharmony_ci     *     completion over the entire typed array.
46843af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
46853af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reduce method cannot be bound.
46863af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
46873af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
46883af6ab5fSopenharmony_ci     * @crossplatform
46893af6ab5fSopenharmony_ci     * @atomicservice
46903af6ab5fSopenharmony_ci     * @since 12
46913af6ab5fSopenharmony_ci     */
46923af6ab5fSopenharmony_ci    reduce<U>(callbackFn: TypedArrayReduceCallback<U, number, Uint32Array>, initialValue: U): U;
46933af6ab5fSopenharmony_ci    /**
46943af6ab5fSopenharmony_ci     * Reverses the elements in an Array.
46953af6ab5fSopenharmony_ci     *
46963af6ab5fSopenharmony_ci     * @returns { Uint32Array } The reference to the original typed array, now reversed.
46973af6ab5fSopenharmony_ci     *     <br>Note that the typed array is reversed in place, and no copy is made.
46983af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The reverse method cannot be bound.
46993af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
47003af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
47013af6ab5fSopenharmony_ci     * @crossplatform
47023af6ab5fSopenharmony_ci     * @atomicservice
47033af6ab5fSopenharmony_ci     * @since 12
47043af6ab5fSopenharmony_ci     */
47053af6ab5fSopenharmony_ci    reverse(): Uint32Array;
47063af6ab5fSopenharmony_ci    /**
47073af6ab5fSopenharmony_ci     * Sets a value or an array of values.
47083af6ab5fSopenharmony_ci     *
47093af6ab5fSopenharmony_ci     * @param { ArrayLike<number> } array - A typed or untyped array of values to set.
47103af6ab5fSopenharmony_ci     * @param { number } [offset] - The index in the current array at which the values are to be written.
47113af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
47123af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The set method cannot be bound.
47133af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
47143af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
47153af6ab5fSopenharmony_ci     * @crossplatform
47163af6ab5fSopenharmony_ci     * @atomicservice
47173af6ab5fSopenharmony_ci     * @since 12
47183af6ab5fSopenharmony_ci     */
47193af6ab5fSopenharmony_ci    set(array: ArrayLike<number>, offset?: number): void;
47203af6ab5fSopenharmony_ci    /**
47213af6ab5fSopenharmony_ci     * Returns a section of an array.
47223af6ab5fSopenharmony_ci     *
47233af6ab5fSopenharmony_ci     * @param { number } [start] - The beginning of the specified portion of the array.
47243af6ab5fSopenharmony_ci     * @param { number } [end] - The end of the specified portion of the array.
47253af6ab5fSopenharmony_ci     *     This is exclusive of the element at the index 'end'.
47263af6ab5fSopenharmony_ci     * @returns { Uint32Array } A new typed array containing the extracted elements.
47273af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
47283af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The slice method cannot be bound.
47293af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
47303af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
47313af6ab5fSopenharmony_ci     * @crossplatform
47323af6ab5fSopenharmony_ci     * @atomicservice
47333af6ab5fSopenharmony_ci     * @since 12
47343af6ab5fSopenharmony_ci     */
47353af6ab5fSopenharmony_ci    slice(start?: number, end?: number): Uint32Array;
47363af6ab5fSopenharmony_ci    /**
47373af6ab5fSopenharmony_ci     * Determines whether the specified callback function returns true for any element of an array.
47383af6ab5fSopenharmony_ci     *
47393af6ab5fSopenharmony_ci     * @param { TypedArrayPredicateFn<number, Uint32Array> } predicate - A function that accepts up to three arguments.
47403af6ab5fSopenharmony_ci     *     The some method calls the predicate function for each element in the array until
47413af6ab5fSopenharmony_ci     *     the predicate returns a value which is coercible to the Boolean value true, or until the end of the array.
47423af6ab5fSopenharmony_ci     * @returns { boolean } false unless predicate returns a truthy value for a typed array element,
47433af6ab5fSopenharmony_ci     *     in which case true is immediately returned.
47443af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
47453af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The some method cannot be bound.
47463af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
47473af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
47483af6ab5fSopenharmony_ci     * @crossplatform
47493af6ab5fSopenharmony_ci     * @atomicservice
47503af6ab5fSopenharmony_ci     * @since 12
47513af6ab5fSopenharmony_ci     */
47523af6ab5fSopenharmony_ci    some(predicate: TypedArrayPredicateFn<number, Uint32Array>): boolean;
47533af6ab5fSopenharmony_ci    /**
47543af6ab5fSopenharmony_ci     * Sorts an array.
47553af6ab5fSopenharmony_ci     *
47563af6ab5fSopenharmony_ci     * @param { TypedArrayCompareFn<number> } [compareFn] - Function used to determine the order of the elements.
47573af6ab5fSopenharmony_ci     *     It is expected to return a negative value if first argument is less than second argument,
47583af6ab5fSopenharmony_ci     *     zero if they're equal and a positive value otherwise.
47593af6ab5fSopenharmony_ci     *     If omitted, the elements are sorted in ascending, ASCII character order.
47603af6ab5fSopenharmony_ci     * @returns { Uint32Array } The reference to the original typed array, now sorted.
47613af6ab5fSopenharmony_ci     *     Note that the typed array is sorted in place and no copy is made.
47623af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
47633af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The sort method cannot be bound.
47643af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
47653af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
47663af6ab5fSopenharmony_ci     * @crossplatform
47673af6ab5fSopenharmony_ci     * @atomicservice
47683af6ab5fSopenharmony_ci     * @since 12
47693af6ab5fSopenharmony_ci     */
47703af6ab5fSopenharmony_ci    sort(compareFn?: TypedArrayCompareFn<number>): Uint32Array;
47713af6ab5fSopenharmony_ci    /**
47723af6ab5fSopenharmony_ci     * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements
47733af6ab5fSopenharmony_ci     * at begin, inclusive, up to end, exclusive.
47743af6ab5fSopenharmony_ci     *
47753af6ab5fSopenharmony_ci     * @param { number } [begin] - The index of the beginning of the array.
47763af6ab5fSopenharmony_ci     * @param { number } [end] - The index of the end of the array.
47773af6ab5fSopenharmony_ci     * @returns { Uint32Array } A new Uint32Array object.
47783af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
47793af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The subarray method cannot be bound.
47803af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
47813af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
47823af6ab5fSopenharmony_ci     * @crossplatform
47833af6ab5fSopenharmony_ci     * @atomicservice
47843af6ab5fSopenharmony_ci     * @since 12
47853af6ab5fSopenharmony_ci     */
47863af6ab5fSopenharmony_ci    subarray(begin?: number, end?: number): Uint32Array;
47873af6ab5fSopenharmony_ci    /**
47883af6ab5fSopenharmony_ci     * Returns the item located at the specified index.
47893af6ab5fSopenharmony_ci     *
47903af6ab5fSopenharmony_ci     * @param { number } index - The zero-based index of the desired code unit.<br/>
47913af6ab5fSopenharmony_ci     *     A negative index will count back from the last item.
47923af6ab5fSopenharmony_ci     * @returns { number | undefined } The element in the array matching the given index.<br/>
47933af6ab5fSopenharmony_ci     *     Always returns undefined if index < -array.length or
47943af6ab5fSopenharmony_ci     *     index >= array.length without attempting to access the corresponding property.
47953af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
47963af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The at method cannot be bound.
47973af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
47983af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
47993af6ab5fSopenharmony_ci     * @crossplatform
48003af6ab5fSopenharmony_ci     * @atomicservice
48013af6ab5fSopenharmony_ci     * @since 12
48023af6ab5fSopenharmony_ci     */
48033af6ab5fSopenharmony_ci    at(index: number): number | undefined;
48043af6ab5fSopenharmony_ci    /**
48053af6ab5fSopenharmony_ci     * Returns an iterable of key, value pairs for every entry in the array
48063af6ab5fSopenharmony_ci     *
48073af6ab5fSopenharmony_ci     * @returns { IterableIterator<[number, number]> } A new iterable iterator object.
48083af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
48093af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
48103af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
48113af6ab5fSopenharmony_ci     * @crossplatform
48123af6ab5fSopenharmony_ci     * @atomicservice
48133af6ab5fSopenharmony_ci     * @since 12
48143af6ab5fSopenharmony_ci     */
48153af6ab5fSopenharmony_ci    entries(): IterableIterator<[number, number]>;
48163af6ab5fSopenharmony_ci    /**
48173af6ab5fSopenharmony_ci     * Returns an iterable of keys in the array
48183af6ab5fSopenharmony_ci     *
48193af6ab5fSopenharmony_ci     * @returns { IterableIterator<number> } A new iterable iterator object.
48203af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
48213af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
48223af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
48233af6ab5fSopenharmony_ci     * @crossplatform
48243af6ab5fSopenharmony_ci     * @atomicservice
48253af6ab5fSopenharmony_ci     * @since 12
48263af6ab5fSopenharmony_ci     */
48273af6ab5fSopenharmony_ci    keys(): IterableIterator<number>;
48283af6ab5fSopenharmony_ci    /**
48293af6ab5fSopenharmony_ci     * Returns an iterable of values in the array
48303af6ab5fSopenharmony_ci     *
48313af6ab5fSopenharmony_ci     * @returns { IterableIterator<number> } A new iterable iterator object.
48323af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The method cannot be bound.
48333af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
48343af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
48353af6ab5fSopenharmony_ci     * @crossplatform
48363af6ab5fSopenharmony_ci     * @atomicservice
48373af6ab5fSopenharmony_ci     * @since 12
48383af6ab5fSopenharmony_ci     */
48393af6ab5fSopenharmony_ci    values(): IterableIterator<number>;
48403af6ab5fSopenharmony_ci    /**
48413af6ab5fSopenharmony_ci     * Determines whether an array includes a certain element, returning true or false as appropriate.
48423af6ab5fSopenharmony_ci     *
48433af6ab5fSopenharmony_ci     * @param { number } searchElement - The element to search for.
48443af6ab5fSopenharmony_ci     * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement.
48453af6ab5fSopenharmony_ci     * @returns { boolean } A boolean value which is true if the value searchElement is found <br/>
48463af6ab5fSopenharmony_ci     *     within the typed array (or the part of the typed array indicated by the index fromIndex, if specified).
48473af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error.
48483af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The at method cannot be bound.
48493af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
48503af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
48513af6ab5fSopenharmony_ci     * @crossplatform
48523af6ab5fSopenharmony_ci     * @atomicservice
48533af6ab5fSopenharmony_ci     * @since 12
48543af6ab5fSopenharmony_ci     */
48553af6ab5fSopenharmony_ci    includes(searchElement: number, fromIndex?: number): boolean;
48563af6ab5fSopenharmony_ci    /**
48573af6ab5fSopenharmony_ci     * Returns the item at that index.
48583af6ab5fSopenharmony_ci     * 
48593af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
48603af6ab5fSopenharmony_ci     * @crossplatform
48613af6ab5fSopenharmony_ci     * @atomicservice
48623af6ab5fSopenharmony_ci     * @since 12
48633af6ab5fSopenharmony_ci     */
48643af6ab5fSopenharmony_ci    [index: number]: number;
48653af6ab5fSopenharmony_ci  }
48663af6ab5fSopenharmony_ci  /**
48673af6ab5fSopenharmony_ci   * An ordered collections of bit values, which are either 0 or 1.
48683af6ab5fSopenharmony_ci   * If multiple threads access a BitVector instance concurrently, 
48693af6ab5fSopenharmony_ci   * and at least one of the threads modifies the array structurally,
48703af6ab5fSopenharmony_ci   * it must be synchronized externally. 
48713af6ab5fSopenharmony_ci   *
48723af6ab5fSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
48733af6ab5fSopenharmony_ci   * @crossplatform
48743af6ab5fSopenharmony_ci   * @atomicservice
48753af6ab5fSopenharmony_ci   * @since 12
48763af6ab5fSopenharmony_ci   */
48773af6ab5fSopenharmony_ci  @Sendable
48783af6ab5fSopenharmony_ci  class BitVector {
48793af6ab5fSopenharmony_ci    /**
48803af6ab5fSopenharmony_ci     * A constructor used to create a BitVector object.
48813af6ab5fSopenharmony_ci     *
48823af6ab5fSopenharmony_ci     * @param { number } length - The length of BitVector object.
48833af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
48843af6ab5fSopenharmony_ci     * @crossplatform
48853af6ab5fSopenharmony_ci     * @atomicservice
48863af6ab5fSopenharmony_ci     * @since 12
48873af6ab5fSopenharmony_ci     */
48883af6ab5fSopenharmony_ci    constructor(length: number);
48893af6ab5fSopenharmony_ci    /**
48903af6ab5fSopenharmony_ci     * Gets the element number of the BitVector. This is a number one higher than the highest index in the bit vector.
48913af6ab5fSopenharmony_ci     * It can be changed by resize().
48923af6ab5fSopenharmony_ci     *
48933af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
48943af6ab5fSopenharmony_ci     * @readonly
48953af6ab5fSopenharmony_ci     * @crossplatform
48963af6ab5fSopenharmony_ci     * @atomicservice
48973af6ab5fSopenharmony_ci     * @since 12
48983af6ab5fSopenharmony_ci     */
48993af6ab5fSopenharmony_ci    public readonly length: number;
49003af6ab5fSopenharmony_ci    /**
49013af6ab5fSopenharmony_ci     * Appends the bit element to the end of this bit vector.
49023af6ab5fSopenharmony_ci     *
49033af6ab5fSopenharmony_ci     * @param { number } element - Element to be appended to this bit vector (0 means 0, else means 1).
49043af6ab5fSopenharmony_ci     * @returns { boolean } The boolean type, returns true if the addition is successful, and returns false if it fails.
49053af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
49063af6ab5fSopenharmony_ci     *                                    1.Mandatory parameters are left unspecified.
49073af6ab5fSopenharmony_ci     *                                    2.Incorrect parameter types.
49083af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The push method cannot be bound.
49093af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
49103af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
49113af6ab5fSopenharmony_ci     * @crossplatform
49123af6ab5fSopenharmony_ci     * @atomicservice
49133af6ab5fSopenharmony_ci     * @since 12
49143af6ab5fSopenharmony_ci     */
49153af6ab5fSopenharmony_ci    push(element: number): boolean;
49163af6ab5fSopenharmony_ci    /**
49173af6ab5fSopenharmony_ci     * Retrieves and removes the bit element to the end of this bit vector.
49183af6ab5fSopenharmony_ci     *
49193af6ab5fSopenharmony_ci     * @returns { number } The boolean type, if the bit push successfully, return true, else return false.
49203af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The pop method cannot be bound.
49213af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
49223af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
49233af6ab5fSopenharmony_ci     * @crossplatform
49243af6ab5fSopenharmony_ci     * @atomicservice
49253af6ab5fSopenharmony_ci     * @since 12
49263af6ab5fSopenharmony_ci     */
49273af6ab5fSopenharmony_ci    pop(): number;
49283af6ab5fSopenharmony_ci    /**
49293af6ab5fSopenharmony_ci     * Check if bit vector contains a particular bit element.
49303af6ab5fSopenharmony_ci     *
49313af6ab5fSopenharmony_ci     * @param { number } element - Element to be contained (0 means 0, else means 1).
49323af6ab5fSopenharmony_ci     * @param { number } fromIndex - The starting position of the index, containing the value at that index position.
49333af6ab5fSopenharmony_ci     * @param { number } toIndex - The end of the index, excluding the value at that index.
49343af6ab5fSopenharmony_ci     * @returns { boolean } The boolean type, if bit vector contains the specified element, return true,
49353af6ab5fSopenharmony_ci                            else return false.
49363af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
49373af6ab5fSopenharmony_ci     *                                    1.Mandatory parameters are left unspecified.
49383af6ab5fSopenharmony_ci     *                                    2.Incorrect parameter types.
49393af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range.
49403af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The has method cannot be bound.
49413af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
49423af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
49433af6ab5fSopenharmony_ci     * @crossplatform
49443af6ab5fSopenharmony_ci     * @atomicservice
49453af6ab5fSopenharmony_ci     * @since 12
49463af6ab5fSopenharmony_ci     */
49473af6ab5fSopenharmony_ci    has(element: number, fromIndex: number, toIndex: number): boolean;
49483af6ab5fSopenharmony_ci    /**
49493af6ab5fSopenharmony_ci     * Sets a range of bits in a bit vector to a particular element.
49503af6ab5fSopenharmony_ci     *
49513af6ab5fSopenharmony_ci     * @param { number } element - Element to be set (0 means 0, else means 1).
49523af6ab5fSopenharmony_ci     * @param { number } fromIndex - The starting position of the index, containing the value at that index position.
49533af6ab5fSopenharmony_ci     * @param { number } toIndex - The end of the index, excluding the value at that index.
49543af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
49553af6ab5fSopenharmony_ci     *                                    1.Mandatory parameters are left unspecified.
49563af6ab5fSopenharmony_ci     *                                    2.Incorrect parameter types.
49573af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range.
49583af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The setBitsByRange method cannot be bound.
49593af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
49603af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
49613af6ab5fSopenharmony_ci     * @crossplatform
49623af6ab5fSopenharmony_ci     * @atomicservice
49633af6ab5fSopenharmony_ci     * @since 12
49643af6ab5fSopenharmony_ci     */
49653af6ab5fSopenharmony_ci    setBitsByRange(element: number, fromIndex: number, toIndex: number): void;
49663af6ab5fSopenharmony_ci    /**
49673af6ab5fSopenharmony_ci     * Sets all of bits in a bit vector to a particular element.
49683af6ab5fSopenharmony_ci     *
49693af6ab5fSopenharmony_ci     * @param { number } element - Element to be set (0 means 0, else means 1).
49703af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
49713af6ab5fSopenharmony_ci     *                                    1.Mandatory parameters are left unspecified.
49723af6ab5fSopenharmony_ci     *                                    2.Incorrect parameter types.
49733af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The setAllBits method cannot be bound.
49743af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
49753af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
49763af6ab5fSopenharmony_ci     * @crossplatform
49773af6ab5fSopenharmony_ci     * @atomicservice
49783af6ab5fSopenharmony_ci     * @since 12
49793af6ab5fSopenharmony_ci     */
49803af6ab5fSopenharmony_ci    setAllBits(element: number): void;
49813af6ab5fSopenharmony_ci    /**
49823af6ab5fSopenharmony_ci     * Returns the bit values in a range of indices in a bit vector.
49833af6ab5fSopenharmony_ci     *
49843af6ab5fSopenharmony_ci     * @param { number } fromIndex - The starting position of the index, containing the value at that index position.
49853af6ab5fSopenharmony_ci     * @param { number } toIndex - The end of the index, excluding the value at that index.
49863af6ab5fSopenharmony_ci     * @returns { BitVector } The BitVector type, returns the bit values in a range of indices in a bit vector.
49873af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
49883af6ab5fSopenharmony_ci     *                                    1.Mandatory parameters are left unspecified.
49893af6ab5fSopenharmony_ci     *                                    2.Incorrect parameter types.
49903af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range.
49913af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The getBitsByRange method cannot be bound.
49923af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
49933af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
49943af6ab5fSopenharmony_ci     * @crossplatform
49953af6ab5fSopenharmony_ci     * @atomicservice
49963af6ab5fSopenharmony_ci     * @since 12
49973af6ab5fSopenharmony_ci     */
49983af6ab5fSopenharmony_ci    getBitsByRange(fromIndex: number, toIndex: number): BitVector;
49993af6ab5fSopenharmony_ci    /**
50003af6ab5fSopenharmony_ci     * Resize the bitVector's length.
50013af6ab5fSopenharmony_ci     *
50023af6ab5fSopenharmony_ci     * @param { number } size - The new size for bitVector. If count is greater than the current size of bitVector,
50033af6ab5fSopenharmony_ci     * the additional bit elements are set to 0.
50043af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
50053af6ab5fSopenharmony_ci     *                                    1.Mandatory parameters are left unspecified.
50063af6ab5fSopenharmony_ci     *                                    2.Incorrect parameter types.
50073af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The resize method cannot be bound.
50083af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
50093af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
50103af6ab5fSopenharmony_ci     * @crossplatform
50113af6ab5fSopenharmony_ci     * @atomicservice
50123af6ab5fSopenharmony_ci     * @since 12
50133af6ab5fSopenharmony_ci     */
50143af6ab5fSopenharmony_ci    resize(size: number): void;
50153af6ab5fSopenharmony_ci    /**
50163af6ab5fSopenharmony_ci     * Counts the number of times a certain bit element occurs within a range of bits in a bit vector.
50173af6ab5fSopenharmony_ci     *
50183af6ab5fSopenharmony_ci     * @param { number } element - Element to be counted (0 means 0, else means 1).
50193af6ab5fSopenharmony_ci     * @param { number } fromIndex - The starting position of the index, containing the value at that index position.
50203af6ab5fSopenharmony_ci     * @param { number } toIndex - The end of the index, excluding the value at that index.
50213af6ab5fSopenharmony_ci     * @returns { number } The number type, return the number of times a certain bit element
50223af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
50233af6ab5fSopenharmony_ci     *                                    1.Mandatory parameters are left unspecified.
50243af6ab5fSopenharmony_ci     *                                    2.Incorrect parameter types.
50253af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range.
50263af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The getBitCountByRange method cannot be bound.
50273af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
50283af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
50293af6ab5fSopenharmony_ci     * @crossplatform
50303af6ab5fSopenharmony_ci     * @atomicservice
50313af6ab5fSopenharmony_ci     * @since 12
50323af6ab5fSopenharmony_ci     */
50333af6ab5fSopenharmony_ci    getBitCountByRange(element: number, fromIndex: number, toIndex: number): number;
50343af6ab5fSopenharmony_ci    /**
50353af6ab5fSopenharmony_ci     * Locates the first occurrence of a certain bit value within a range of bits in a bit vector.
50363af6ab5fSopenharmony_ci     *
50373af6ab5fSopenharmony_ci     * @param { number } element - Element to be Located (0 means 0, else means 1).
50383af6ab5fSopenharmony_ci     * @param { number } fromIndex - The starting position of the index, containing the value at that index position.
50393af6ab5fSopenharmony_ci     * @param { number } toIndex - The end of the index, excluding the value at that index.
50403af6ab5fSopenharmony_ci     * @returns { number } The number type, return the first index of specified bit within a range,
50413af6ab5fSopenharmony_ci     * or -1 if this range of the bitVector does not contain the element.
50423af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
50433af6ab5fSopenharmony_ci     *                                    1.Mandatory parameters are left unspecified.
50443af6ab5fSopenharmony_ci     *                                    2.Incorrect parameter types.
50453af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range.
50463af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The getIndexOf method cannot be bound.
50473af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
50483af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
50493af6ab5fSopenharmony_ci     * @crossplatform
50503af6ab5fSopenharmony_ci     * @atomicservice
50513af6ab5fSopenharmony_ci     * @since 12
50523af6ab5fSopenharmony_ci     */
50533af6ab5fSopenharmony_ci    getIndexOf(element: number, fromIndex: number, toIndex: number): number;
50543af6ab5fSopenharmony_ci    /**
50553af6ab5fSopenharmony_ci     * Locates the last occurrence of a certain bit value within a range of bits in a bit vector.
50563af6ab5fSopenharmony_ci     *
50573af6ab5fSopenharmony_ci     * @param { number } element - Element to be Located (0 means 0, else means 1).
50583af6ab5fSopenharmony_ci     * @param { number } fromIndex - The starting position of the index, containing the value at that index position.
50593af6ab5fSopenharmony_ci     * @param { number } toIndex - The end of the index, excluding the value at that index.
50603af6ab5fSopenharmony_ci     * @returns { number } The number type, return the last index of specified bit within a range,
50613af6ab5fSopenharmony_ci     * or -1 if this range of the bitVector does not contain the element.
50623af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
50633af6ab5fSopenharmony_ci     *                                    1.Mandatory parameters are left unspecified.
50643af6ab5fSopenharmony_ci     *                                    2.Incorrect parameter types.
50653af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range.
50663af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The getLastIndexOf method cannot be bound.
50673af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
50683af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
50693af6ab5fSopenharmony_ci     * @crossplatform
50703af6ab5fSopenharmony_ci     * @atomicservice
50713af6ab5fSopenharmony_ci     * @since 12
50723af6ab5fSopenharmony_ci     */
50733af6ab5fSopenharmony_ci    getLastIndexOf(element: number, fromIndex: number, toIndex: number): number;
50743af6ab5fSopenharmony_ci    /**
50753af6ab5fSopenharmony_ci     * Flips the bit value by index in a bit vector.(Flip 0 to 1, flip 1 to 0)
50763af6ab5fSopenharmony_ci     *
50773af6ab5fSopenharmony_ci     * @param { number } index - The index in the bit vector.
50783af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
50793af6ab5fSopenharmony_ci     *                                    1.Mandatory parameters are left unspecified.
50803af6ab5fSopenharmony_ci     *                                    2.Incorrect parameter types.
50813af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of index is out of range.
50823af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The flipBitByIndex method cannot be bound.
50833af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
50843af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
50853af6ab5fSopenharmony_ci     * @crossplatform
50863af6ab5fSopenharmony_ci     * @atomicservice
50873af6ab5fSopenharmony_ci     * @since 12
50883af6ab5fSopenharmony_ci     */
50893af6ab5fSopenharmony_ci    flipBitByIndex(index: number): void;
50903af6ab5fSopenharmony_ci    /**
50913af6ab5fSopenharmony_ci     * Flips a range of bit values in a bit vector.(Flip 0 to 1, flip 1 to 0).
50923af6ab5fSopenharmony_ci     *
50933af6ab5fSopenharmony_ci     * @param { number } fromIndex - The starting position of the index, containing the value at that index position.
50943af6ab5fSopenharmony_ci     * @param { number } toIndex - The end of the index, excluding the value at that index.
50953af6ab5fSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
50963af6ab5fSopenharmony_ci     *                                    1.Mandatory parameters are left unspecified.
50973af6ab5fSopenharmony_ci     *                                    2.Incorrect parameter types.
50983af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range.
50993af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The flipBitsByRange method cannot be bound.
51003af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
51013af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
51023af6ab5fSopenharmony_ci     * @crossplatform
51033af6ab5fSopenharmony_ci     * @atomicservice
51043af6ab5fSopenharmony_ci     * @since 12
51053af6ab5fSopenharmony_ci     */
51063af6ab5fSopenharmony_ci    flipBitsByRange(fromIndex: number, toIndex: number): void;
51073af6ab5fSopenharmony_ci    /**
51083af6ab5fSopenharmony_ci     * Returns an iterable of values in the bit vector
51093af6ab5fSopenharmony_ci     *
51103af6ab5fSopenharmony_ci     * @returns { IterableIterator<number> }  A new iterable iterator object.
51113af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200011 - The values method cannot be bound.
51123af6ab5fSopenharmony_ci     * @throws { BusinessError } 10200201 - Concurrent modification error.
51133af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
51143af6ab5fSopenharmony_ci     * @crossplatform
51153af6ab5fSopenharmony_ci     * @atomicservice
51163af6ab5fSopenharmony_ci     * @since 12
51173af6ab5fSopenharmony_ci     */
51183af6ab5fSopenharmony_ci    values(): IterableIterator<number>;
51193af6ab5fSopenharmony_ci    /**
51203af6ab5fSopenharmony_ci     * Returns the item at that index.
51213af6ab5fSopenharmony_ci     * 
51223af6ab5fSopenharmony_ci     * @syscap SystemCapability.Utils.Lang
51233af6ab5fSopenharmony_ci     * @crossplatform
51243af6ab5fSopenharmony_ci     * @atomicservice
51253af6ab5fSopenharmony_ci     * @since 12
51263af6ab5fSopenharmony_ci     */
51273af6ab5fSopenharmony_ci    [index: number]: number;
51283af6ab5fSopenharmony_ci  }
51293af6ab5fSopenharmony_ci}
51303af6ab5fSopenharmony_ci
51313af6ab5fSopenharmony_ciexport default collections;