161847f8eSopenharmony_ci/* 261847f8eSopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd. 361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 461847f8eSopenharmony_ci * you may not use this file except in compliance with the License. 561847f8eSopenharmony_ci * You may obtain a copy of the License at 661847f8eSopenharmony_ci * 761847f8eSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 861847f8eSopenharmony_ci * 961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and 1361847f8eSopenharmony_ci * limitations under the License. 1461847f8eSopenharmony_ci */ 1561847f8eSopenharmony_ci 1661847f8eSopenharmony_ci/** 1761847f8eSopenharmony_ci * @file Defines the collections for ArkTS 1861847f8eSopenharmony_ci * @kit ArkTS 1961847f8eSopenharmony_ci */ 2061847f8eSopenharmony_ci 2161847f8eSopenharmony_ciimport lang from './@arkts.lang' 2261847f8eSopenharmony_ci 2361847f8eSopenharmony_ci/** 2461847f8eSopenharmony_ci * ArkTS collections. 2561847f8eSopenharmony_ci * 2661847f8eSopenharmony_ci * @namespace collections 2761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 2861847f8eSopenharmony_ci * @atomicservice 2961847f8eSopenharmony_ci * @since 12 3061847f8eSopenharmony_ci */ 3161847f8eSopenharmony_cideclare namespace collections { 3261847f8eSopenharmony_ci /** 3361847f8eSopenharmony_ci * Callback function used in the typed Array's 'from' function. 3461847f8eSopenharmony_ci * 3561847f8eSopenharmony_ci * @typedef { function } TypedArrayFromMapFn 3661847f8eSopenharmony_ci * @param { FromElementType } value - The value in the original array. 3761847f8eSopenharmony_ci * @param { number } index - The index in the original array. 3861847f8eSopenharmony_ci * @returns { ToElementType } The transformed value. 3961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 4061847f8eSopenharmony_ci * @atomicservice 4161847f8eSopenharmony_ci * @since 12 4261847f8eSopenharmony_ci */ 4361847f8eSopenharmony_ci type TypedArrayFromMapFn<FromElementType, ToElementType> = (value: FromElementType, index: number) => ToElementType; 4461847f8eSopenharmony_ci /** 4561847f8eSopenharmony_ci * Callback function used in typed Array functions which needs to determine 4661847f8eSopenharmony_ci * whether some element satisfies the specified predicate test 4761847f8eSopenharmony_ci * 4861847f8eSopenharmony_ci * @typedef { function } TypedArrayPredicateFn 4961847f8eSopenharmony_ci * @param { ElementType } value - The value of the element. 5061847f8eSopenharmony_ci * @param { number } index - The index of the element. 5161847f8eSopenharmony_ci * @param { ArrayType } array - The array that the element belongs to. 5261847f8eSopenharmony_ci * @returns { boolean } True if the value meets the predicate, otherwise false. 5361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 5461847f8eSopenharmony_ci * @atomicservice 5561847f8eSopenharmony_ci * @since 12 5661847f8eSopenharmony_ci */ 5761847f8eSopenharmony_ci type TypedArrayPredicateFn<ElementType, ArrayType> = 5861847f8eSopenharmony_ci (value: ElementType, index: number, array: ArrayType) => boolean; 5961847f8eSopenharmony_ci /** 6061847f8eSopenharmony_ci * Callback function used in typed Array functions that perform specific action for each element. 6161847f8eSopenharmony_ci * 6261847f8eSopenharmony_ci * @typedef { function } TypedArrayForEachCallback 6361847f8eSopenharmony_ci * @param { ElementType } value - The value of the element. 6461847f8eSopenharmony_ci * @param { number } index - The index of the element. 6561847f8eSopenharmony_ci * @param { ArrayType } array - The array that the element belongs to. 6661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 6761847f8eSopenharmony_ci * @atomicservice 6861847f8eSopenharmony_ci * @since 12 6961847f8eSopenharmony_ci */ 7061847f8eSopenharmony_ci type TypedArrayForEachCallback<ElementType, ArrayType> = 7161847f8eSopenharmony_ci (value: ElementType, index: number, array: ArrayType) => void; 7261847f8eSopenharmony_ci /** 7361847f8eSopenharmony_ci * Callback function used in typed Array functions that perform specific action for each element and 7461847f8eSopenharmony_ci * produce corresponding new element. 7561847f8eSopenharmony_ci * 7661847f8eSopenharmony_ci * @typedef { function } TypedArrayMapCallback 7761847f8eSopenharmony_ci * @param { ElementType } value - The value of the element. 7861847f8eSopenharmony_ci * @param { number } index - The index of the element. 7961847f8eSopenharmony_ci * @param { ArrayType } array - The array that the element belongs to. 8061847f8eSopenharmony_ci * @returns { ElementType } The result of the mapping. 8161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 8261847f8eSopenharmony_ci * @atomicservice 8361847f8eSopenharmony_ci * @since 12 8461847f8eSopenharmony_ci */ 8561847f8eSopenharmony_ci type TypedArrayMapCallback<ElementType, ArrayType> = 8661847f8eSopenharmony_ci (value: ElementType, index: number, array: ArrayType) => ElementType; 8761847f8eSopenharmony_ci /** 8861847f8eSopenharmony_ci * Callback function used in typed Array functions that require a reduction. 8961847f8eSopenharmony_ci * 9061847f8eSopenharmony_ci * @typedef { function } TypedArrayReduceCallback 9161847f8eSopenharmony_ci * @param { AccType } previousValue - The accumulator value. 9261847f8eSopenharmony_ci * @param { ElementType } currentValue - The current element being processed in the array. 9361847f8eSopenharmony_ci * @param { number } currentIndex - The index of the current element being processed in the array. 9461847f8eSopenharmony_ci * @param { ArrayType } array - The array that the element belongs to. 9561847f8eSopenharmony_ci * @returns { AccType } The result of the reduction. 9661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 9761847f8eSopenharmony_ci * @atomicservice 9861847f8eSopenharmony_ci * @since 12 9961847f8eSopenharmony_ci */ 10061847f8eSopenharmony_ci type TypedArrayReduceCallback<AccType, ElementType, ArrayType> = 10161847f8eSopenharmony_ci (previousValue: AccType, currentValue: ElementType, currentIndex: number, array: ArrayType) => AccType; 10261847f8eSopenharmony_ci /** 10361847f8eSopenharmony_ci * Callback function used in the typed Array's 'sort' function. 10461847f8eSopenharmony_ci * 10561847f8eSopenharmony_ci * @typedef { function } TypedArrayCompareFn 10661847f8eSopenharmony_ci * @param { ElementType } first - The first element of the comparison. 10761847f8eSopenharmony_ci * @param { ElementType } second - The second element of the comparison. 10861847f8eSopenharmony_ci * @returns { number } The result of the comparison. 10961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 11061847f8eSopenharmony_ci * @atomicservice 11161847f8eSopenharmony_ci * @since 12 11261847f8eSopenharmony_ci */ 11361847f8eSopenharmony_ci type TypedArrayCompareFn<ElementType> = (first: ElementType, second: ElementType) => number; 11461847f8eSopenharmony_ci /** 11561847f8eSopenharmony_ci * Redefines ISendable for convenience. 11661847f8eSopenharmony_ci * 11761847f8eSopenharmony_ci * @typedef { lang.ISendable } ISendable 11861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 11961847f8eSopenharmony_ci * @atomicservice 12061847f8eSopenharmony_ci * @since 12 12161847f8eSopenharmony_ci */ 12261847f8eSopenharmony_ci type ISendable = lang.ISendable; 12361847f8eSopenharmony_ci /** 12461847f8eSopenharmony_ci * Represents an array-like object that can be concatenated. 12561847f8eSopenharmony_ci * 12661847f8eSopenharmony_ci * @interface ConcatArray 12761847f8eSopenharmony_ci * @extends ISendable 12861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 12961847f8eSopenharmony_ci * @atomicservice 13061847f8eSopenharmony_ci * @since 12 13161847f8eSopenharmony_ci */ 13261847f8eSopenharmony_ci interface ConcatArray<T> extends ISendable { 13361847f8eSopenharmony_ci /** 13461847f8eSopenharmony_ci * Gets the length of the ArkTS ConcatArray. This is a number one higher than the highest index in the array. 13561847f8eSopenharmony_ci * 13661847f8eSopenharmony_ci * @type { number } 13761847f8eSopenharmony_ci * @readonly 13861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 13961847f8eSopenharmony_ci * @atomicservice 14061847f8eSopenharmony_ci * @since 12 14161847f8eSopenharmony_ci */ 14261847f8eSopenharmony_ci readonly length: number; 14361847f8eSopenharmony_ci /** 14461847f8eSopenharmony_ci * Returns the item at that index. 14561847f8eSopenharmony_ci * 14661847f8eSopenharmony_ci * @param { number } index - The zero-based index of the desired code unit. 14761847f8eSopenharmony_ci * Throws error if index < 0 or index >= array.length. 14861847f8eSopenharmony_ci * @returns { T } The element in the ConcatArray matching the given index. 14961847f8eSopenharmony_ci * @readonly 15061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Illegal index. 15161847f8eSopenharmony_ci * @throws { BusinessError } 10200001 - The value of index is out of range. 15261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 15361847f8eSopenharmony_ci * @since 12 15461847f8eSopenharmony_ci */ 15561847f8eSopenharmony_ci readonly [index: number]: T; 15661847f8eSopenharmony_ci /** 15761847f8eSopenharmony_ci * Adds all the elements of an ArkTS ConcatArray into a string, separated by the specified separator string. 15861847f8eSopenharmony_ci * 15961847f8eSopenharmony_ci * @param { string } [separator] - A string used to separate one element of the array from 16061847f8eSopenharmony_ci * the next in the resulting string. If omitted, the array elements are separated with a comma. 16161847f8eSopenharmony_ci * @returns { string } A string with all array elements joined. 16261847f8eSopenharmony_ci * If ConcatArray.length is 0, the empty string is returned. 16361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Invalid separator. 16461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 16561847f8eSopenharmony_ci * @atomicservice 16661847f8eSopenharmony_ci * @since 12 16761847f8eSopenharmony_ci */ 16861847f8eSopenharmony_ci join(separator?: string): string; 16961847f8eSopenharmony_ci /** 17061847f8eSopenharmony_ci * Returns a copy of a section of an ArkTS ConcatArray. 17161847f8eSopenharmony_ci * 17261847f8eSopenharmony_ci * @param { number } [start] - The beginning index of the specified portion of the array. 17361847f8eSopenharmony_ci * If start is undefined, then the slice begins at index 0. 17461847f8eSopenharmony_ci * @param { number } [end] - The end index of the specified portion of the array. 17561847f8eSopenharmony_ci * This is exclusive of the element at the index 'end'. 17661847f8eSopenharmony_ci * If end is undefined, then the slice extends to the end of the array. 17761847f8eSopenharmony_ci * @returns { ConcatArray<T> } A new ConcatArray containing the extracted elements. 17861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Invalid `start` or `end` parameters. 17961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 18061847f8eSopenharmony_ci * @atomicservice 18161847f8eSopenharmony_ci * @since 12 18261847f8eSopenharmony_ci */ 18361847f8eSopenharmony_ci slice(start?: number, end?: number): ConcatArray<T>; 18461847f8eSopenharmony_ci } 18561847f8eSopenharmony_ci /** 18661847f8eSopenharmony_ci * Array is a data structure that stores a collection of elements. 18761847f8eSopenharmony_ci * If multiple threads access a Array instance concurrently, 18861847f8eSopenharmony_ci * and at least one of the threads modifies the array structurally, 18961847f8eSopenharmony_ci * it must be synchronized externally. 19061847f8eSopenharmony_ci * 19161847f8eSopenharmony_ci * @implements ConcatArray<T> 19261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 19361847f8eSopenharmony_ci * @atomicservice 19461847f8eSopenharmony_ci * @since 12 19561847f8eSopenharmony_ci */ 19661847f8eSopenharmony_ci @Sendable 19761847f8eSopenharmony_ci class Array<T> implements ConcatArray<T> { 19861847f8eSopenharmony_ci /** 19961847f8eSopenharmony_ci * Gets the length of the ArkTS array. This is a number one higher than the highest index in the ArkTS array. 20061847f8eSopenharmony_ci * 20161847f8eSopenharmony_ci * @type { number } 20261847f8eSopenharmony_ci * @readonly 20361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 20461847f8eSopenharmony_ci * @atomicservice 20561847f8eSopenharmony_ci * @since 12 20661847f8eSopenharmony_ci */ 20761847f8eSopenharmony_ci readonly length: number; 20861847f8eSopenharmony_ci /** 20961847f8eSopenharmony_ci * Creates an ArkTS Array with arrayLength elements initialized to initialValue. 21061847f8eSopenharmony_ci * 21161847f8eSopenharmony_ci * @param { number } arrayLength - The length of the array. 21261847f8eSopenharmony_ci * @param { T } initialValue - Element initial value that will be filled into the Array. 21361847f8eSopenharmony_ci * @returns { Array<T> } A new Array instance 21461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 21561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The create method cannot be bound. 21661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 21761847f8eSopenharmony_ci * @atomicservice 21861847f8eSopenharmony_ci * @since 12 21961847f8eSopenharmony_ci */ 22061847f8eSopenharmony_ci static create<T>(arrayLength: number, initialValue: T): Array<T>; 22161847f8eSopenharmony_ci /** 22261847f8eSopenharmony_ci * Creates an ArkTS Array from an array-like object. 22361847f8eSopenharmony_ci * 22461847f8eSopenharmony_ci * @param { ArrayLike<T> } arrayLike - An array-like object to convert to an ArkTS Array. 22561847f8eSopenharmony_ci * @returns { Array<T> } A new Array instance 22661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 22761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The from method cannot be bound. 22861847f8eSopenharmony_ci * @static 22961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 23061847f8eSopenharmony_ci * @atomicservice 23161847f8eSopenharmony_ci * @since 12 23261847f8eSopenharmony_ci */ 23361847f8eSopenharmony_ci static from<T>(arrayLike: ArrayLike<T>): Array<T>; 23461847f8eSopenharmony_ci /** 23561847f8eSopenharmony_ci * Creates an ArkTS Array from an iterable object. 23661847f8eSopenharmony_ci * 23761847f8eSopenharmony_ci * @param { Iterable<T> } iterable - An iterable object to convert to an ArkTS Array. 23861847f8eSopenharmony_ci * @returns { Array<T> } A new Array instance 23961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 24061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The from method cannot be bound. 24161847f8eSopenharmony_ci * @static 24261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 24361847f8eSopenharmony_ci * @atomicservice 24461847f8eSopenharmony_ci * @since 12 24561847f8eSopenharmony_ci */ 24661847f8eSopenharmony_ci static from<T>(iterable: Iterable<T>): Array<T>; 24761847f8eSopenharmony_ci /** 24861847f8eSopenharmony_ci * A constructor used to create an ArkTS Array. 24961847f8eSopenharmony_ci * 25061847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Array's constructor cannot be directly invoked. 25161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 25261847f8eSopenharmony_ci * @atomicservice 25361847f8eSopenharmony_ci * @since 12 25461847f8eSopenharmony_ci */ 25561847f8eSopenharmony_ci constructor(); 25661847f8eSopenharmony_ci /** 25761847f8eSopenharmony_ci * A constructor used to create an ArkTS Array. 25861847f8eSopenharmony_ci * 25961847f8eSopenharmony_ci * @param { T } first - First element when initializing an ArkTS Array. 26061847f8eSopenharmony_ci * @param { T[] } left - Left elements when initializing an ArkTS Array. 26161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 26261847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Array's constructor cannot be directly invoked. 26361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 26461847f8eSopenharmony_ci * @atomicservice 26561847f8eSopenharmony_ci * @since 12 26661847f8eSopenharmony_ci */ 26761847f8eSopenharmony_ci constructor(first: T, ...left: T[]); 26861847f8eSopenharmony_ci /** 26961847f8eSopenharmony_ci * A constructor used to create an ArkTS Array. 27061847f8eSopenharmony_ci * 27161847f8eSopenharmony_ci * @param { T[] } items - Elements when initializing an ArkTS Array. 27261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 27361847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Array's constructor cannot be directly invoked. 27461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 27561847f8eSopenharmony_ci * @atomicservice 27661847f8eSopenharmony_ci * @since 12 27761847f8eSopenharmony_ci */ 27861847f8eSopenharmony_ci constructor(...items: T[]); 27961847f8eSopenharmony_ci /** 28061847f8eSopenharmony_ci * Removes the last element from an ArkTS array and returns it. 28161847f8eSopenharmony_ci * If the array is empty, undefined is returned and the array is not modified. 28261847f8eSopenharmony_ci * 28361847f8eSopenharmony_ci * @returns { T | undefined } - The removed element from the array; undefined if the array is empty. 28461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The pop method cannot be bound. 28561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 28661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 28761847f8eSopenharmony_ci * @atomicservice 28861847f8eSopenharmony_ci * @since 12 28961847f8eSopenharmony_ci */ 29061847f8eSopenharmony_ci pop(): T | undefined; 29161847f8eSopenharmony_ci /** 29261847f8eSopenharmony_ci * Appends new elements to the end of an ArkTS Array, and returns the new length of the array. 29361847f8eSopenharmony_ci * 29461847f8eSopenharmony_ci * @param { T[] } items - New elements to add to the ArkTS array. 29561847f8eSopenharmony_ci * @returns { number } - The new length property of the object upon which the method was called. 29661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 29761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The push method cannot be bound. 29861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 29961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 30061847f8eSopenharmony_ci * @atomicservice 30161847f8eSopenharmony_ci * @since 12 30261847f8eSopenharmony_ci */ 30361847f8eSopenharmony_ci push(...items: T[]): number; 30461847f8eSopenharmony_ci /** 30561847f8eSopenharmony_ci * Adds all the elements of an ArkTS Array into a string, separated by the specified separator string. 30661847f8eSopenharmony_ci * 30761847f8eSopenharmony_ci * @param { string } [separator] - A string used to separate one element of the array from 30861847f8eSopenharmony_ci * the next in the resulting string. If omitted, the array elements are separated with a comma. 30961847f8eSopenharmony_ci * @returns { string } A string with all array elements joined. If Array.length is 0, the empty string is returned. 31061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 31161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The join method cannot be bound. 31261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 31361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 31461847f8eSopenharmony_ci * @atomicservice 31561847f8eSopenharmony_ci * @since 12 31661847f8eSopenharmony_ci */ 31761847f8eSopenharmony_ci join(separator?: string): string; 31861847f8eSopenharmony_ci /** 31961847f8eSopenharmony_ci * Removes the first element from an ArkTS Array and returns it. 32061847f8eSopenharmony_ci * If the array is empty, undefined is returned and the array is not modified. 32161847f8eSopenharmony_ci * 32261847f8eSopenharmony_ci * @returns { T | undefined } The removed element from the array; undefined if the array is empty 32361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The shift method cannot be bound. 32461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 32561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 32661847f8eSopenharmony_ci * @atomicservice 32761847f8eSopenharmony_ci * @since 12 32861847f8eSopenharmony_ci */ 32961847f8eSopenharmony_ci shift(): T | undefined; 33061847f8eSopenharmony_ci /** 33161847f8eSopenharmony_ci * Inserts new elements at the start of an array, and returns the new length of the array. 33261847f8eSopenharmony_ci * 33361847f8eSopenharmony_ci * @param { T[] } items - Elements to insert at the start of the array. 33461847f8eSopenharmony_ci * @returns { number } The new length property of the object upon which the method was called. 33561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 33661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The unshift method cannot be bound. 33761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 33861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 33961847f8eSopenharmony_ci * @atomicservice 34061847f8eSopenharmony_ci * @since 12 34161847f8eSopenharmony_ci */ 34261847f8eSopenharmony_ci unshift(...items: T[]): number; 34361847f8eSopenharmony_ci /** 34461847f8eSopenharmony_ci * Returns a copy of a section of an ArkTS Array. 34561847f8eSopenharmony_ci * For both start and end, a negative index can be used to indicate an offset from the end of the array. 34661847f8eSopenharmony_ci * For example, -2 refers to the second to last element of the array. 34761847f8eSopenharmony_ci * 34861847f8eSopenharmony_ci * @param { number } [start] - The beginning index of the specified portion of the array. 34961847f8eSopenharmony_ci * If start is undefined, then the slice begins at index 0. 35061847f8eSopenharmony_ci * @param { number } [end] - The end index of the specified portion of the array. 35161847f8eSopenharmony_ci * This is exclusive of the element at the index 'end'. 35261847f8eSopenharmony_ci * If end is undefined, then the slice extends to the end of the array. 35361847f8eSopenharmony_ci * @returns { Array<T> } A new array containing the extracted elements. 35461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 35561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The slice method cannot be bound. 35661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 35761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 35861847f8eSopenharmony_ci * @atomicservice 35961847f8eSopenharmony_ci * @since 12 36061847f8eSopenharmony_ci */ 36161847f8eSopenharmony_ci slice(start?: number, end?: number): Array<T>; 36261847f8eSopenharmony_ci /** 36361847f8eSopenharmony_ci * Sorts an array in place. This method mutates the array and returns a reference to the same array. 36461847f8eSopenharmony_ci * 36561847f8eSopenharmony_ci * @param { function } [compareFn] - Function used to determine the order of the elements. It is expected to return 36661847f8eSopenharmony_ci * a negative value if the first argument is less than the second argument, zero if they're equal, 36761847f8eSopenharmony_ci * and a positive value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. 36861847f8eSopenharmony_ci * @returns { Array<T> } The reference to the original array, now sorted. 36961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 37061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The sort method cannot be bound. 37161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 37261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 37361847f8eSopenharmony_ci * @atomicservice 37461847f8eSopenharmony_ci * @since 12 37561847f8eSopenharmony_ci */ 37661847f8eSopenharmony_ci sort(compareFn?: (a: T, b: T) => number): Array<T>; 37761847f8eSopenharmony_ci /** 37861847f8eSopenharmony_ci * Returns the index of the first occurrence of a value in an ArkTS Array, or -1 if it is not present. 37961847f8eSopenharmony_ci * 38061847f8eSopenharmony_ci * @param { T } searchElement - The value to locate in the array. 38161847f8eSopenharmony_ci * @param { number } [fromIndex] - The array index at which to begin the search. 38261847f8eSopenharmony_ci * If fromIndex is omitted, the search starts at index 0. 38361847f8eSopenharmony_ci * @returns { number } The first index of searchElement in the array; -1 if not found. 38461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 38561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The indexOf method cannot be bound. 38661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 38761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 38861847f8eSopenharmony_ci * @atomicservice 38961847f8eSopenharmony_ci * @since 12 39061847f8eSopenharmony_ci */ 39161847f8eSopenharmony_ci indexOf(searchElement: T, fromIndex?: number): number; 39261847f8eSopenharmony_ci /** 39361847f8eSopenharmony_ci * Executes a provided function once for each value in the Array object. 39461847f8eSopenharmony_ci * 39561847f8eSopenharmony_ci * @param { function } callbackFn - A function that accepts up to three arguments. 39661847f8eSopenharmony_ci * The function to be called for each element. 39761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 39861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The forEach method cannot be bound. 39961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 40061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 40161847f8eSopenharmony_ci * @atomicservice 40261847f8eSopenharmony_ci * @since 12 40361847f8eSopenharmony_ci */ 40461847f8eSopenharmony_ci forEach(callbackFn: (value: T, index: number, array: Array<T>) => void): void; 40561847f8eSopenharmony_ci /** 40661847f8eSopenharmony_ci * Calls a defined callback function on each element of an ArkTS Array, 40761847f8eSopenharmony_ci * and returns an array that contains the results. 40861847f8eSopenharmony_ci * 40961847f8eSopenharmony_ci * @param { function } callbackFn - A function that accepts up to three arguments. 41061847f8eSopenharmony_ci * The map method calls the callbackFn function one time for each element in the array. 41161847f8eSopenharmony_ci * @returns { Array<U> } A new array with each element being the result of the callback function. 41261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 41361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The map method cannot be bound. 41461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 41561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 41661847f8eSopenharmony_ci * @atomicservice 41761847f8eSopenharmony_ci * @since 12 41861847f8eSopenharmony_ci */ 41961847f8eSopenharmony_ci map<U>(callbackFn: (value: T, index: number, array: Array<T>) => U): Array<U>; 42061847f8eSopenharmony_ci /** 42161847f8eSopenharmony_ci * Returns the elements of an ArkTS Array that meet the condition specified in a callback function. 42261847f8eSopenharmony_ci * 42361847f8eSopenharmony_ci * @param { function } predicate - A function that accepts up to three arguments. 42461847f8eSopenharmony_ci * The filter method calls the predicate function one time for each element in the array. 42561847f8eSopenharmony_ci * @returns { Array<T> } A shallow copy of the given containing just the elements that pass the test. 42661847f8eSopenharmony_ci * If no elements pass the test, an empty array is returned. 42761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 42861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The filter method cannot be bound. 42961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 43061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 43161847f8eSopenharmony_ci * @atomicservice 43261847f8eSopenharmony_ci * @since 12 43361847f8eSopenharmony_ci */ 43461847f8eSopenharmony_ci filter(predicate: (value: T, index: number, array: Array<T>) => boolean): Array<T>; 43561847f8eSopenharmony_ci /** 43661847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an ArkTS Array. 43761847f8eSopenharmony_ci * The return value of the callback function is the accumulated result, 43861847f8eSopenharmony_ci * and is provided as an argument in the next call to the callback function. 43961847f8eSopenharmony_ci * 44061847f8eSopenharmony_ci * @param { function } callbackFn - A function that accepts up to four arguments. 44161847f8eSopenharmony_ci * The reduce method calls the callbackFn function one time for each element in the array. 44261847f8eSopenharmony_ci * @returns { T } The value that results from running the "reducer" callback function to 44361847f8eSopenharmony_ci * completion over the entire array. 44461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 44561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 44661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 44761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 44861847f8eSopenharmony_ci * @atomicservice 44961847f8eSopenharmony_ci * @since 12 45061847f8eSopenharmony_ci */ 45161847f8eSopenharmony_ci reduce(callbackFn: (previousValue: T, currentValue: T, currentIndex: number, array: Array<T>) => T): T; 45261847f8eSopenharmony_ci /** 45361847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. 45461847f8eSopenharmony_ci * The return value of the callback function is the accumulated result, 45561847f8eSopenharmony_ci * and is provided as an argument in the next call to the callback function. 45661847f8eSopenharmony_ci * 45761847f8eSopenharmony_ci * @param { function } callbackFn - A function that accepts up to four arguments. 45861847f8eSopenharmony_ci * The reduce method calls the callbackFn function one time for each element in the array. 45961847f8eSopenharmony_ci * @param { U } initialValue - If initialValue is specified, 46061847f8eSopenharmony_ci * it is used as the initial value to start the accumulation. 46161847f8eSopenharmony_ci * The first call to the callbackFn function provides this value as an argument instead of an array value. 46261847f8eSopenharmony_ci * @returns { U } The value that results from running the "reducer" callback function to 46361847f8eSopenharmony_ci * completion over the entire array. 46461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 46561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 46661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 46761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 46861847f8eSopenharmony_ci * @atomicservice 46961847f8eSopenharmony_ci * @since 12 47061847f8eSopenharmony_ci */ 47161847f8eSopenharmony_ci reduce<U>( 47261847f8eSopenharmony_ci callbackFn: (previousValue: U, currentValue: T, currentIndex: number, array: Array<T>) => U, 47361847f8eSopenharmony_ci initialValue: U 47461847f8eSopenharmony_ci ): U; 47561847f8eSopenharmony_ci /** 47661847f8eSopenharmony_ci * Returns the item located at the specified index. 47761847f8eSopenharmony_ci * 47861847f8eSopenharmony_ci * @param { number } index - The zero-based index of the desired code unit. 47961847f8eSopenharmony_ci * A negative index will count back from the last item. 48061847f8eSopenharmony_ci * @returns { T | undefined } The element in the array matching the given index. 48161847f8eSopenharmony_ci * Always returns undefined if index < -array.length or index >= array.length without 48261847f8eSopenharmony_ci * attempting to access the corresponding property. 48361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 48461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The at method cannot be bound. 48561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 48661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 48761847f8eSopenharmony_ci * @atomicservice 48861847f8eSopenharmony_ci * @since 12 48961847f8eSopenharmony_ci */ 49061847f8eSopenharmony_ci at(index: number): T | undefined; 49161847f8eSopenharmony_ci /** 49261847f8eSopenharmony_ci * Returns an iterator that can be used to iterate over elements of type T. 49361847f8eSopenharmony_ci * 49461847f8eSopenharmony_ci * @returns { IterableIterator<T> } Iterator object. 49561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. 49661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 49761847f8eSopenharmony_ci * @atomicservice 49861847f8eSopenharmony_ci * @since 12 49961847f8eSopenharmony_ci */ 50061847f8eSopenharmony_ci [Symbol.iterator](): IterableIterator<T>; 50161847f8eSopenharmony_ci /** 50261847f8eSopenharmony_ci * Returns an iterable of key, value pairs for every entry in the array 50361847f8eSopenharmony_ci * 50461847f8eSopenharmony_ci * @returns { IterableIterator<[number, T]> } A new iterable iterator object. 50561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The entries method cannot be bound. 50661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 50761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 50861847f8eSopenharmony_ci * @atomicservice 50961847f8eSopenharmony_ci * @since 12 51061847f8eSopenharmony_ci */ 51161847f8eSopenharmony_ci entries(): IterableIterator<[number, T]>; 51261847f8eSopenharmony_ci /** 51361847f8eSopenharmony_ci * Returns an iterable of keys in the array 51461847f8eSopenharmony_ci * 51561847f8eSopenharmony_ci * @returns { IterableIterator<number> } A new iterable iterator object. 51661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The keys method cannot be bound. 51761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 51861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 51961847f8eSopenharmony_ci * @atomicservice 52061847f8eSopenharmony_ci * @since 12 52161847f8eSopenharmony_ci */ 52261847f8eSopenharmony_ci keys(): IterableIterator<number>; 52361847f8eSopenharmony_ci /** 52461847f8eSopenharmony_ci * Returns an iterable of values in the array 52561847f8eSopenharmony_ci * 52661847f8eSopenharmony_ci * @returns { IterableIterator<T> } A new iterable iterator object. 52761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The values method cannot be bound. 52861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 52961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 53061847f8eSopenharmony_ci * @atomicservice 53161847f8eSopenharmony_ci * @since 12 53261847f8eSopenharmony_ci */ 53361847f8eSopenharmony_ci values(): IterableIterator<T>; 53461847f8eSopenharmony_ci /** 53561847f8eSopenharmony_ci * Returns the value of the first element in the array where predicate is true, and undefined 53661847f8eSopenharmony_ci * otherwise. 53761847f8eSopenharmony_ci * 53861847f8eSopenharmony_ci * @param { function } predicate - Find calls predicate once for each element of the array, in ascending 53961847f8eSopenharmony_ci * order, until it finds one where predicate returns true. 54061847f8eSopenharmony_ci * If such an element is found, find immediately returns that element value. Otherwise, find returns undefined. 54161847f8eSopenharmony_ci * @returns { T | undefined } The first element in the array that satisfies the provided testing function. 54261847f8eSopenharmony_ci * Otherwise, undefined is returned. 54361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 54461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The find method cannot be bound. 54561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 54661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 54761847f8eSopenharmony_ci * @atomicservice 54861847f8eSopenharmony_ci * @since 12 54961847f8eSopenharmony_ci */ 55061847f8eSopenharmony_ci find(predicate: (value: T, index: number, obj: Array<T>) => boolean): T | undefined; 55161847f8eSopenharmony_ci /** 55261847f8eSopenharmony_ci * Determines whether an array includes a certain element, returning true or false as appropriate. 55361847f8eSopenharmony_ci * 55461847f8eSopenharmony_ci * @param { T } searchElement - The element to search for. 55561847f8eSopenharmony_ci * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement. 55661847f8eSopenharmony_ci * @returns { boolean } A boolean value which is true if the value searchElement is found within 55761847f8eSopenharmony_ci * the array (or the part of the array indicated by the index fromIndex, if specified). 55861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 55961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The includes method cannot be bound. 56061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 56161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 56261847f8eSopenharmony_ci * @atomicservice 56361847f8eSopenharmony_ci * @since 12 56461847f8eSopenharmony_ci */ 56561847f8eSopenharmony_ci includes(searchElement: T, fromIndex?: number): boolean; 56661847f8eSopenharmony_ci /** 56761847f8eSopenharmony_ci * Returns the index of the first element in the array where predicate is true, and -1 56861847f8eSopenharmony_ci * otherwise. 56961847f8eSopenharmony_ci * 57061847f8eSopenharmony_ci * @param { function } predicate - Find calls predicate once for each element of the array, in ascending 57161847f8eSopenharmony_ci * order, until it finds one where predicate returns true. If such an element is found, 57261847f8eSopenharmony_ci * findIndex immediately returns that element index. Otherwise, findIndex returns -1. 57361847f8eSopenharmony_ci * @returns { number } The index of the first element in the array that passes the test. Otherwise, -1; 57461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 57561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The findIndex method cannot be bound. 57661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 57761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 57861847f8eSopenharmony_ci * @atomicservice 57961847f8eSopenharmony_ci * @since 12 58061847f8eSopenharmony_ci */ 58161847f8eSopenharmony_ci findIndex(predicate: (value: T, index: number, obj: Array<T>) => boolean): number; 58261847f8eSopenharmony_ci /** 58361847f8eSopenharmony_ci * Returns the this object after filling the section identified by start and end with value 58461847f8eSopenharmony_ci * 58561847f8eSopenharmony_ci * @param { T } value - Value to fill array section with 58661847f8eSopenharmony_ci * @param { number } [start] - Index to start filling the array at. If start is negative, it is treated as 58761847f8eSopenharmony_ci * length+start where length is the length of the array. 58861847f8eSopenharmony_ci * @param { number } [end] - Index to stop filling the array at. If end is negative, it is treated as 58961847f8eSopenharmony_ci * length+end. 59061847f8eSopenharmony_ci * @returns { Array<T> } The modified array, filled with value. 59161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 59261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The fill method cannot be bound. 59361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 59461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 59561847f8eSopenharmony_ci * @atomicservice 59661847f8eSopenharmony_ci * @since 12 59761847f8eSopenharmony_ci */ 59861847f8eSopenharmony_ci fill(value: T, start?: number, end?: number): Array<T>; 59961847f8eSopenharmony_ci /** 60061847f8eSopenharmony_ci * Shrinks the ArkTS array to the given arrayLength. 60161847f8eSopenharmony_ci * 60261847f8eSopenharmony_ci * @param { number } arrayLength - The new Array length. 60361847f8eSopenharmony_ci * Throws error when arrayLength < 0 or arrayLength > 2^32. 60461847f8eSopenharmony_ci * If arrayLength > array.length, array remains unchanged. 60561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 60661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The shrinkTo method cannot be bound. 60761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 60861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 60961847f8eSopenharmony_ci * @atomicservice 61061847f8eSopenharmony_ci * @since 12 61161847f8eSopenharmony_ci */ 61261847f8eSopenharmony_ci shrinkTo(arrayLength: number): void; 61361847f8eSopenharmony_ci /** 61461847f8eSopenharmony_ci * Extends the ArkTS array to the given arrayLength, 61561847f8eSopenharmony_ci * and appends new elements with given initialValue up to the arrayLength. 61661847f8eSopenharmony_ci * 61761847f8eSopenharmony_ci * @param { number } arrayLength - The new Array length. 61861847f8eSopenharmony_ci * Throws error when arrayLength < 0 or arrayLength > 2^32. 61961847f8eSopenharmony_ci * If arrayLength < array.length, array remains unchanged. 62061847f8eSopenharmony_ci * @param { T } initialValue - Element initial value that will be appended to the array. 62161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 62261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The extendTo method cannot be bound. 62361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 62461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 62561847f8eSopenharmony_ci * @atomicservice 62661847f8eSopenharmony_ci * @since 12 62761847f8eSopenharmony_ci */ 62861847f8eSopenharmony_ci extendTo(arrayLength: number, initialValue: T): void; 62961847f8eSopenharmony_ci /** 63061847f8eSopenharmony_ci * Returns the item at that index. 63161847f8eSopenharmony_ci * 63261847f8eSopenharmony_ci * @param { number } index - The zero-based index of the desired code unit. 63361847f8eSopenharmony_ci * Throws error if index < 0 or index >= array.length. 63461847f8eSopenharmony_ci * @returns { T } The element in the array matching the given index. 63561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 63661847f8eSopenharmony_ci * @throws { BusinessError } 10200001 - The value of index is out of range. 63761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 63861847f8eSopenharmony_ci * @atomicservice 63961847f8eSopenharmony_ci * @since 12 64061847f8eSopenharmony_ci */ 64161847f8eSopenharmony_ci [index: number]: T; 64261847f8eSopenharmony_ci /** 64361847f8eSopenharmony_ci * Concatenates two or more arrays. 64461847f8eSopenharmony_ci * 64561847f8eSopenharmony_ci * @param { ConcatArray<T>[] } items - The arrays to concatenate. 64661847f8eSopenharmony_ci * @returns { Array<T> } A new array containing the elements of the concatenated arrays. 64761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Not a valid array. 64861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The concat method cannot be bound. 64961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 65061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 65161847f8eSopenharmony_ci * @atomicservice 65261847f8eSopenharmony_ci * @since 12 65361847f8eSopenharmony_ci */ 65461847f8eSopenharmony_ci concat(...items: ConcatArray<T>[]): Array<T>; 65561847f8eSopenharmony_ci /** 65661847f8eSopenharmony_ci * Removes elements from the array at the specified position. 65761847f8eSopenharmony_ci * 65861847f8eSopenharmony_ci * @param { number } start - The zero-based index at which to start changing the contents of the array. 65961847f8eSopenharmony_ci * All the elements from start to the end of the array will be deleted. 66061847f8eSopenharmony_ci * @returns { Array<T> } An array containing the deleted elements. 66161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error.Possible causes: 66261847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified. 66361847f8eSopenharmony_ci * 2.Incorrect parameter types. 66461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The splice method cannot be bound. 66561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 66661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 66761847f8eSopenharmony_ci * @atomicservice 66861847f8eSopenharmony_ci * @since 12 66961847f8eSopenharmony_ci */ 67061847f8eSopenharmony_ci splice(start: number): Array<T>; 67161847f8eSopenharmony_ci /** 67261847f8eSopenharmony_ci * Removes elements from the array and, if necessary, inserts new elements at the specified position. 67361847f8eSopenharmony_ci * 67461847f8eSopenharmony_ci * @param { number } start - The zero-based index at which to start changing the contents of the array. 67561847f8eSopenharmony_ci * @param { number } deleteCount - The number of elements to remove from the array, 67661847f8eSopenharmony_ci * starting at the index specified by the start parameter. 67761847f8eSopenharmony_ci * @param { T[] } items - An array of elements to insert into the array, 67861847f8eSopenharmony_ci * starting at the index specified by the start parameter. 67961847f8eSopenharmony_ci * @returns { Array<T> } An array containing the deleted elements. 68061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 68161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified. 68261847f8eSopenharmony_ci * 2.Incorrect parameter types. 68361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The splice method cannot be bound. 68461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 68561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 68661847f8eSopenharmony_ci * @atomicservice 68761847f8eSopenharmony_ci * @since 12 68861847f8eSopenharmony_ci */ 68961847f8eSopenharmony_ci splice(start: number, deleteCount: number, ...items: T[]): Array<T>; 69061847f8eSopenharmony_ci } 69161847f8eSopenharmony_ci 69261847f8eSopenharmony_ci /** 69361847f8eSopenharmony_ci * The Map holds key-value pairs. 69461847f8eSopenharmony_ci * If multiple threads access a Map instance concurrently, 69561847f8eSopenharmony_ci * and at least one of the threads modifies the map structurally, 69661847f8eSopenharmony_ci * it must be synchronized externally. 69761847f8eSopenharmony_ci * 69861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 69961847f8eSopenharmony_ci * @atomicservice 70061847f8eSopenharmony_ci * @since 12 70161847f8eSopenharmony_ci */ 70261847f8eSopenharmony_ci @Sendable 70361847f8eSopenharmony_ci class Map<K, V> { 70461847f8eSopenharmony_ci /** 70561847f8eSopenharmony_ci * Returns the number of elements in the Map. 70661847f8eSopenharmony_ci * 70761847f8eSopenharmony_ci * @type { number } 70861847f8eSopenharmony_ci * @readonly 70961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 71061847f8eSopenharmony_ci * @atomicservice 71161847f8eSopenharmony_ci * @since 12 71261847f8eSopenharmony_ci */ 71361847f8eSopenharmony_ci readonly size: number; 71461847f8eSopenharmony_ci /** 71561847f8eSopenharmony_ci * A constructor used to create a Map. 71661847f8eSopenharmony_ci * 71761847f8eSopenharmony_ci * @param { readonly (readonly [K, V])[] | null } [entries] - An Array or other iterable object 71861847f8eSopenharmony_ci * whose elements are key-value pairs. 71961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 72061847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Map's constructor cannot be directly invoked. 72161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 72261847f8eSopenharmony_ci * @atomicservice 72361847f8eSopenharmony_ci * @since 12 72461847f8eSopenharmony_ci */ 72561847f8eSopenharmony_ci constructor(entries?: readonly (readonly [K, V])[] | null) 72661847f8eSopenharmony_ci /** 72761847f8eSopenharmony_ci * A constructor used to create a Map. 72861847f8eSopenharmony_ci * 72961847f8eSopenharmony_ci * @param { Iterable<readonly [K, V]>} [iterable] - An iterable object to convert to an ArkTS Map. 73061847f8eSopenharmony_ci * whose elements are key-value pairs. 73161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 73261847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Map's constructor cannot be directly invoked. 73361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 73461847f8eSopenharmony_ci * @atomicservice 73561847f8eSopenharmony_ci * @since 12 73661847f8eSopenharmony_ci */ 73761847f8eSopenharmony_ci constructor(iterable: Iterable<readonly [K, V]>); 73861847f8eSopenharmony_ci /** 73961847f8eSopenharmony_ci * Returns an iterator that iterates over key-value pairs. 74061847f8eSopenharmony_ci * 74161847f8eSopenharmony_ci * @returns { IterableIterator<[K, V]> } Iterator object that yields key-value pairs. 74261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. 74361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 74461847f8eSopenharmony_ci * @atomicservice 74561847f8eSopenharmony_ci * @since 12 74661847f8eSopenharmony_ci */ 74761847f8eSopenharmony_ci [Symbol.iterator](): IterableIterator<[K, V]> 74861847f8eSopenharmony_ci /** 74961847f8eSopenharmony_ci * Returns an iterable of key, value pairs for every entry in the map. 75061847f8eSopenharmony_ci * 75161847f8eSopenharmony_ci * @returns { IterableIterator<[K, V]> } A new iterable iterator object. 75261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The entries method cannot be bound. 75361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 75461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 75561847f8eSopenharmony_ci * @atomicservice 75661847f8eSopenharmony_ci * @since 12 75761847f8eSopenharmony_ci */ 75861847f8eSopenharmony_ci entries(): IterableIterator<[K, V]>; 75961847f8eSopenharmony_ci /** 76061847f8eSopenharmony_ci * Returns an iterable of keys in the map. 76161847f8eSopenharmony_ci * 76261847f8eSopenharmony_ci * @returns { IterableIterator<K> } A new iterable iterator object. 76361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The keys method cannot be bound. 76461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 76561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 76661847f8eSopenharmony_ci * @atomicservice 76761847f8eSopenharmony_ci * @since 12 76861847f8eSopenharmony_ci */ 76961847f8eSopenharmony_ci keys(): IterableIterator<K>; 77061847f8eSopenharmony_ci /** 77161847f8eSopenharmony_ci * Returns an iterable of values in the map. 77261847f8eSopenharmony_ci * 77361847f8eSopenharmony_ci * @returns { IterableIterator<V> } A new iterable iterator object. 77461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The values method cannot be bound. 77561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 77661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 77761847f8eSopenharmony_ci * @atomicservice 77861847f8eSopenharmony_ci * @since 12 77961847f8eSopenharmony_ci */ 78061847f8eSopenharmony_ci values(): IterableIterator<V>; 78161847f8eSopenharmony_ci /** 78261847f8eSopenharmony_ci * Clears the map. 78361847f8eSopenharmony_ci * 78461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The clear method cannot be bound. 78561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 78661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 78761847f8eSopenharmony_ci * @atomicservice 78861847f8eSopenharmony_ci * @since 12 78961847f8eSopenharmony_ci */ 79061847f8eSopenharmony_ci clear(): void; 79161847f8eSopenharmony_ci /** 79261847f8eSopenharmony_ci * Returns true if an element in the Map existed and has been removed, or false if the element does not exist. 79361847f8eSopenharmony_ci * 79461847f8eSopenharmony_ci * @param { K } key - The key of the element to remove from the Map object. 79561847f8eSopenharmony_ci * @returns { boolean } True if an element in the Map Object existed and has been removed, 79661847f8eSopenharmony_ci * or false if the element does not exist. 79761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 79861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The delete method cannot be bound. 79961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 80061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 80161847f8eSopenharmony_ci * @atomicservice 80261847f8eSopenharmony_ci * @since 12 80361847f8eSopenharmony_ci */ 80461847f8eSopenharmony_ci delete(key: K): boolean; 80561847f8eSopenharmony_ci /** 80661847f8eSopenharmony_ci * Executes the provided callback once for each key of the map which actually exist. 80761847f8eSopenharmony_ci * 80861847f8eSopenharmony_ci * @param { function } callbackFn - A function that accepts up to three arguments. 80961847f8eSopenharmony_ci * The function to be called for each element. 81061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 81161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The forEach method cannot be bound. 81261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 81361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 81461847f8eSopenharmony_ci * @atomicservice 81561847f8eSopenharmony_ci * @since 12 81661847f8eSopenharmony_ci */ 81761847f8eSopenharmony_ci forEach(callbackFn: (value: V, key: K, map: Map<K, V>) => void): void; 81861847f8eSopenharmony_ci /** 81961847f8eSopenharmony_ci * Returns a specified element from the Map object. 82061847f8eSopenharmony_ci * If the value that is associated to the provided key is an object, 82161847f8eSopenharmony_ci * then you will get a reference to that object and any change made to that object 82261847f8eSopenharmony_ci * will effectively modify it inside the Map. 82361847f8eSopenharmony_ci * 82461847f8eSopenharmony_ci * @param { K } key - The key of the element to return from the Map object 82561847f8eSopenharmony_ci * @returns { V | undefined } The element associated with the specified key, 82661847f8eSopenharmony_ci * or undefined if the key can''t be found in the Map object. 82761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 82861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The get method cannot be bound. 82961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 83061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 83161847f8eSopenharmony_ci * @atomicservice 83261847f8eSopenharmony_ci * @since 12 83361847f8eSopenharmony_ci */ 83461847f8eSopenharmony_ci get(key: K): V | undefined; 83561847f8eSopenharmony_ci /** 83661847f8eSopenharmony_ci * Returns boolean indicating whether an element with the specified key exists or not. 83761847f8eSopenharmony_ci * 83861847f8eSopenharmony_ci * @param { K } key - The key of the element to test for presence in the Map object. 83961847f8eSopenharmony_ci * @returns { boolean } true if an element with the specified key exists in the Map Object; otherwise false. 84061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 84161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The has method cannot be bound. 84261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 84361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 84461847f8eSopenharmony_ci * @atomicservice 84561847f8eSopenharmony_ci * @since 12 84661847f8eSopenharmony_ci */ 84761847f8eSopenharmony_ci has(key: K): boolean; 84861847f8eSopenharmony_ci /** 84961847f8eSopenharmony_ci * Adds a new element with a specified key and value to the Map. 85061847f8eSopenharmony_ci * If an element with the same key already exists, the element will be updated. 85161847f8eSopenharmony_ci * 85261847f8eSopenharmony_ci * @param { K } key - The key of the element to add to the Map object. 85361847f8eSopenharmony_ci * @param { V } value - The value of the element to add to the object. 85461847f8eSopenharmony_ci * @returns { Map<K, V> } The Object. 85561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 85661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The set method cannot be bound. 85761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 85861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 85961847f8eSopenharmony_ci * @atomicservice 86061847f8eSopenharmony_ci * @since 12 86161847f8eSopenharmony_ci */ 86261847f8eSopenharmony_ci set(key: K, value: V): Map<K, V>; 86361847f8eSopenharmony_ci } 86461847f8eSopenharmony_ci 86561847f8eSopenharmony_ci /** 86661847f8eSopenharmony_ci * Set lets you store unique values of any type. 86761847f8eSopenharmony_ci * If multiple threads access a Set instance concurrently, 86861847f8eSopenharmony_ci * and at least one of the threads modifies the set structurally, 86961847f8eSopenharmony_ci * it must be synchronized externally. 87061847f8eSopenharmony_ci * 87161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 87261847f8eSopenharmony_ci * @atomicservice 87361847f8eSopenharmony_ci * @since 12 87461847f8eSopenharmony_ci */ 87561847f8eSopenharmony_ci @Sendable 87661847f8eSopenharmony_ci class Set<T> { 87761847f8eSopenharmony_ci /** 87861847f8eSopenharmony_ci * Returns the number of elements in the Set. 87961847f8eSopenharmony_ci * 88061847f8eSopenharmony_ci * @type { number } 88161847f8eSopenharmony_ci * @readonly 88261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 88361847f8eSopenharmony_ci * @atomicservice 88461847f8eSopenharmony_ci * @since 12 88561847f8eSopenharmony_ci */ 88661847f8eSopenharmony_ci readonly size: number; 88761847f8eSopenharmony_ci /** 88861847f8eSopenharmony_ci * A constructor used to create a Set. 88961847f8eSopenharmony_ci * 89061847f8eSopenharmony_ci * @param { readonly T[] | null } [values] - If an iterable object is passed, 89161847f8eSopenharmony_ci * all of its elements will be added to the new Set. 89261847f8eSopenharmony_ci * If you don't specify this parameter, or its value is null, the new Set is empty. 89361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 89461847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Set's constructor cannot be directly invoked. 89561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 89661847f8eSopenharmony_ci * @atomicservice 89761847f8eSopenharmony_ci * @since 12 89861847f8eSopenharmony_ci */ 89961847f8eSopenharmony_ci constructor(values?: readonly T[] | null); 90061847f8eSopenharmony_ci /** 90161847f8eSopenharmony_ci * A constructor used to create a Set. 90261847f8eSopenharmony_ci * 90361847f8eSopenharmony_ci * @param { Iterable<T>} [iterable] - If an iterable object is passed, 90461847f8eSopenharmony_ci * all of its elements will be added to the new Set. 90561847f8eSopenharmony_ci * If you don't specify this parameter, or its value is null, the new Set is empty. 90661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 90761847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Set's constructor cannot be directly invoked. 90861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 90961847f8eSopenharmony_ci * @atomicservice 91061847f8eSopenharmony_ci * @since 12 91161847f8eSopenharmony_ci */ 91261847f8eSopenharmony_ci constructor(iterable: Iterable<T>); 91361847f8eSopenharmony_ci /** 91461847f8eSopenharmony_ci * Returns an iterator that can be used to iterate over elements of type T. 91561847f8eSopenharmony_ci * 91661847f8eSopenharmony_ci * @returns { IterableIterator<T> } Iterator object. 91761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. 91861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 91961847f8eSopenharmony_ci * @atomicservice 92061847f8eSopenharmony_ci * @since 12 92161847f8eSopenharmony_ci */ 92261847f8eSopenharmony_ci [Symbol.iterator](): IterableIterator<T>; 92361847f8eSopenharmony_ci /** 92461847f8eSopenharmony_ci * Returns an iterable of [value, value] pairs for each element in this set. 92561847f8eSopenharmony_ci * 92661847f8eSopenharmony_ci * @returns { IterableIterator<[T, T]> } A new iterable iterator object. 92761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The entries method cannot be bound. 92861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 92961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 93061847f8eSopenharmony_ci * @atomicservice 93161847f8eSopenharmony_ci * @since 12 93261847f8eSopenharmony_ci */ 93361847f8eSopenharmony_ci entries(): IterableIterator<[T, T]>; 93461847f8eSopenharmony_ci /** 93561847f8eSopenharmony_ci * Returns an iterable of the values in the set. 93661847f8eSopenharmony_ci * 93761847f8eSopenharmony_ci * @returns { IterableIterator<T> } A new iterable iterator object. 93861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The keys method cannot be bound. 93961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 94061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 94161847f8eSopenharmony_ci * @atomicservice 94261847f8eSopenharmony_ci * @since 12 94361847f8eSopenharmony_ci */ 94461847f8eSopenharmony_ci keys(): IterableIterator<T>; 94561847f8eSopenharmony_ci /** 94661847f8eSopenharmony_ci * Returns an iterable of values in the set. 94761847f8eSopenharmony_ci * 94861847f8eSopenharmony_ci * @returns { IterableIterator<T> } A new iterable iterator object. 94961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The values method cannot be bound. 95061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 95161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 95261847f8eSopenharmony_ci * @atomicservice 95361847f8eSopenharmony_ci * @since 12 95461847f8eSopenharmony_ci */ 95561847f8eSopenharmony_ci values(): IterableIterator<T>; 95661847f8eSopenharmony_ci /** 95761847f8eSopenharmony_ci * Appends a new element with a specified value to the end of the Set. 95861847f8eSopenharmony_ci * 95961847f8eSopenharmony_ci * @param { T } value - The value of the element to add to the Set object. 96061847f8eSopenharmony_ci * @returns { Set<T> } The Set object with added value. 96161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The add method cannot be bound. 96261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 96361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 96461847f8eSopenharmony_ci * @atomicservice 96561847f8eSopenharmony_ci * @since 12 96661847f8eSopenharmony_ci */ 96761847f8eSopenharmony_ci add(value: T): Set<T>; 96861847f8eSopenharmony_ci /** 96961847f8eSopenharmony_ci * Clears the Set. 97061847f8eSopenharmony_ci * 97161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The clear method cannot be bound. 97261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 97361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 97461847f8eSopenharmony_ci * @atomicservice 97561847f8eSopenharmony_ci * @since 12 97661847f8eSopenharmony_ci */ 97761847f8eSopenharmony_ci clear(): void; 97861847f8eSopenharmony_ci /** 97961847f8eSopenharmony_ci * Returns true if an element in the Set existed and has been removed, or false if the element does not exist. 98061847f8eSopenharmony_ci * 98161847f8eSopenharmony_ci * @param { T } value - The value to remove from Set. 98261847f8eSopenharmony_ci * @returns { boolean } Returns true if value was already in Set; otherwise false. 98361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The delete method cannot be bound. 98461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 98561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 98661847f8eSopenharmony_ci * @atomicservice 98761847f8eSopenharmony_ci * @since 12 98861847f8eSopenharmony_ci */ 98961847f8eSopenharmony_ci delete(value: T): boolean; 99061847f8eSopenharmony_ci /** 99161847f8eSopenharmony_ci * Executes a provided function once per each value in the Set object, in insertion order. 99261847f8eSopenharmony_ci * 99361847f8eSopenharmony_ci * @param { function } callbackFn - A function that accepts up to three arguments. 99461847f8eSopenharmony_ci * The function to be called for each element. 99561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 99661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The forEach method cannot be bound. 99761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 99861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 99961847f8eSopenharmony_ci * @atomicservice 100061847f8eSopenharmony_ci * @since 12 100161847f8eSopenharmony_ci */ 100261847f8eSopenharmony_ci forEach(callbackFn: (value: T, value2: T, set: Set<T>) => void): void; 100361847f8eSopenharmony_ci /** 100461847f8eSopenharmony_ci * A boolean indicating whether an element with the specified value exists in the Set or not. 100561847f8eSopenharmony_ci * 100661847f8eSopenharmony_ci * @param { T } value - The value to test for presence in the Object. 100761847f8eSopenharmony_ci * @returns { boolean } Returns true if an element with the specified value exists in the Set object; 100861847f8eSopenharmony_ci * otherwise false. 100961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 101061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The has method cannot be bound. 101161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 101261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 101361847f8eSopenharmony_ci * @atomicservice 101461847f8eSopenharmony_ci * @since 12 101561847f8eSopenharmony_ci */ 101661847f8eSopenharmony_ci has(value: T): boolean; 101761847f8eSopenharmony_ci } 101861847f8eSopenharmony_ci /** 101961847f8eSopenharmony_ci * Represents a raw buffer of binary data, which is used to store data for the 102061847f8eSopenharmony_ci * different typed arrays. ArrayBuffers cannot be read from or written to directly, 102161847f8eSopenharmony_ci * but can be passed to a typed array or DataView Object to interpret the raw 102261847f8eSopenharmony_ci * buffer as needed. 102361847f8eSopenharmony_ci * If multiple threads access a ArrayBuffer instance concurrently, 102461847f8eSopenharmony_ci * and at least one of the threads modifies the buffer structurally, 102561847f8eSopenharmony_ci * it must be synchronized externally. 102661847f8eSopenharmony_ci * 102761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 102861847f8eSopenharmony_ci * @atomicservice 102961847f8eSopenharmony_ci * @since 12 103061847f8eSopenharmony_ci */ 103161847f8eSopenharmony_ci @Sendable 103261847f8eSopenharmony_ci class ArrayBuffer { 103361847f8eSopenharmony_ci /** 103461847f8eSopenharmony_ci * Read-only. The length of the ArrayBuffer (in bytes). 103561847f8eSopenharmony_ci * 103661847f8eSopenharmony_ci * @type { number } 103761847f8eSopenharmony_ci * @readonly 103861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 103961847f8eSopenharmony_ci * @atomicservice 104061847f8eSopenharmony_ci * @since 12 104161847f8eSopenharmony_ci */ 104261847f8eSopenharmony_ci readonly byteLength: number; 104361847f8eSopenharmony_ci /** 104461847f8eSopenharmony_ci * A constructor used to create a ArrayBuffer. 104561847f8eSopenharmony_ci * 104661847f8eSopenharmony_ci * @param { number } byteLength - The length of the ArkTS array buffer 104761847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The ArrayBuffer's constructor cannot be directly invoked. 104861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 104961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 105061847f8eSopenharmony_ci * @atomicservice 105161847f8eSopenharmony_ci * @since 12 105261847f8eSopenharmony_ci */ 105361847f8eSopenharmony_ci constructor(byteLength: number); 105461847f8eSopenharmony_ci /** 105561847f8eSopenharmony_ci * Returns a section of an ArrayBuffer. 105661847f8eSopenharmony_ci * 105761847f8eSopenharmony_ci * @param { number } begin - Zero-based index at which to start extraction, converted to an integer. 105861847f8eSopenharmony_ci * @param { number } [end] - Zero-based index at which to end extraction, converted to an integer. 105961847f8eSopenharmony_ci * Default is buffer.length 106061847f8eSopenharmony_ci * @returns { ArrayBuffer } A new ArrayBuffer containing the extracted elements. 106161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 106261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The slice method cannot be bound. 106361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 106461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 106561847f8eSopenharmony_ci * @atomicservice 106661847f8eSopenharmony_ci * @since 12 106761847f8eSopenharmony_ci */ 106861847f8eSopenharmony_ci slice(begin: number, end?: number): ArrayBuffer; 106961847f8eSopenharmony_ci } 107061847f8eSopenharmony_ci 107161847f8eSopenharmony_ci /** 107261847f8eSopenharmony_ci * A typed array of 8-bit integer values. The contents are initialized to 0. 107361847f8eSopenharmony_ci * If multiple threads access a Int8Array instance concurrently, 107461847f8eSopenharmony_ci * and at least one of the threads modifies the array structurally, 107561847f8eSopenharmony_ci * it must be synchronized externally. 107661847f8eSopenharmony_ci * 107761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 107861847f8eSopenharmony_ci * @atomicservice 107961847f8eSopenharmony_ci * @since 12 108061847f8eSopenharmony_ci */ 108161847f8eSopenharmony_ci @Sendable 108261847f8eSopenharmony_ci class Int8Array { 108361847f8eSopenharmony_ci /** 108461847f8eSopenharmony_ci * The size in bytes of each element in the array. 108561847f8eSopenharmony_ci * 108661847f8eSopenharmony_ci * @type { number } 108761847f8eSopenharmony_ci * @readonly 108861847f8eSopenharmony_ci * @static 108961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 109061847f8eSopenharmony_ci * @atomicservice 109161847f8eSopenharmony_ci * @since 12 109261847f8eSopenharmony_ci */ 109361847f8eSopenharmony_ci static readonly BYTES_PER_ELEMENT: number; 109461847f8eSopenharmony_ci /** 109561847f8eSopenharmony_ci * The ArrayBuffer instance referenced by the array. 109661847f8eSopenharmony_ci * 109761847f8eSopenharmony_ci * @type { ArrayBuffer } 109861847f8eSopenharmony_ci * @readonly 109961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 110061847f8eSopenharmony_ci * @atomicservice 110161847f8eSopenharmony_ci * @since 12 110261847f8eSopenharmony_ci */ 110361847f8eSopenharmony_ci readonly buffer: ArrayBuffer; 110461847f8eSopenharmony_ci /** 110561847f8eSopenharmony_ci * The length in bytes of the array. 110661847f8eSopenharmony_ci * 110761847f8eSopenharmony_ci * @type { number } 110861847f8eSopenharmony_ci * @readonly 110961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 111061847f8eSopenharmony_ci * @atomicservice 111161847f8eSopenharmony_ci * @since 12 111261847f8eSopenharmony_ci */ 111361847f8eSopenharmony_ci readonly byteLength: number; 111461847f8eSopenharmony_ci /** 111561847f8eSopenharmony_ci * The offset in bytes of the array. 111661847f8eSopenharmony_ci * 111761847f8eSopenharmony_ci * @type { number } 111861847f8eSopenharmony_ci * @readonly 111961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 112061847f8eSopenharmony_ci * @atomicservice 112161847f8eSopenharmony_ci * @since 12 112261847f8eSopenharmony_ci */ 112361847f8eSopenharmony_ci readonly byteOffset: number; 112461847f8eSopenharmony_ci /** 112561847f8eSopenharmony_ci * The length of the array. 112661847f8eSopenharmony_ci * 112761847f8eSopenharmony_ci * @type { number } 112861847f8eSopenharmony_ci * @readonly 112961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 113061847f8eSopenharmony_ci * @atomicservice 113161847f8eSopenharmony_ci * @since 12 113261847f8eSopenharmony_ci */ 113361847f8eSopenharmony_ci readonly length: number; 113461847f8eSopenharmony_ci /** 113561847f8eSopenharmony_ci * A constructor used to create an Int8Array. 113661847f8eSopenharmony_ci * 113761847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Int8Array's constructor cannot be directly invoked. 113861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 113961847f8eSopenharmony_ci * @atomicservice 114061847f8eSopenharmony_ci * @since 12 114161847f8eSopenharmony_ci */ 114261847f8eSopenharmony_ci constructor(); 114361847f8eSopenharmony_ci /** 114461847f8eSopenharmony_ci * A constructor used to create an Int8Array. 114561847f8eSopenharmony_ci * 114661847f8eSopenharmony_ci * @param { number } length - The length of the array 114761847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Int8Array's constructor cannot be directly invoked. 114861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 114961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 115061847f8eSopenharmony_ci * @atomicservice 115161847f8eSopenharmony_ci * @since 12 115261847f8eSopenharmony_ci */ 115361847f8eSopenharmony_ci constructor(length: number); 115461847f8eSopenharmony_ci /** 115561847f8eSopenharmony_ci * A constructor used to create an Int8Array. 115661847f8eSopenharmony_ci * 115761847f8eSopenharmony_ci * @param { Iterable<number> } elements - An iterable object to convert to an Int8Array. 115861847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Int8Array's constructor cannot be directly invoked. 115961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 116061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 116161847f8eSopenharmony_ci * @atomicservice 116261847f8eSopenharmony_ci * @since 12 116361847f8eSopenharmony_ci */ 116461847f8eSopenharmony_ci constructor(elements: Iterable<number>); 116561847f8eSopenharmony_ci /** 116661847f8eSopenharmony_ci * A constructor used to create an Int8Array. 116761847f8eSopenharmony_ci * 116861847f8eSopenharmony_ci * @param { ArrayLike<number> | ArrayBuffer } array - An array is initialized with the given elements 116961847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Int8Array's constructor cannot be directly invoked. 117061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 117161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 117261847f8eSopenharmony_ci * @atomicservice 117361847f8eSopenharmony_ci * @since 12 117461847f8eSopenharmony_ci */ 117561847f8eSopenharmony_ci constructor(array: ArrayLike<number> | ArrayBuffer); 117661847f8eSopenharmony_ci /** 117761847f8eSopenharmony_ci * A constructor used to create an Int8Array. 117861847f8eSopenharmony_ci * 117961847f8eSopenharmony_ci * @param { ArrayBuffer } buffer - An array is initialized with the given elements 118061847f8eSopenharmony_ci * @param { number } [byteOffset] - The byteOffset (in bytes) parameter specifies the memory range 118161847f8eSopenharmony_ci * that will be exposed by the typed array view. 118261847f8eSopenharmony_ci * @param { number } [length] - The length parameter specifies the memory range 118361847f8eSopenharmony_ci * that will be exposed by the typed array view. 118461847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Int8Array's constructor cannot be directly invoked. 118561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 118661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 118761847f8eSopenharmony_ci * @atomicservice 118861847f8eSopenharmony_ci * @since 12 118961847f8eSopenharmony_ci */ 119061847f8eSopenharmony_ci constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number); 119161847f8eSopenharmony_ci /** 119261847f8eSopenharmony_ci * Creates an Int8Array from an array-like object. 119361847f8eSopenharmony_ci * 119461847f8eSopenharmony_ci * @param { ArrayLike<number> } arrayLike - An array-like object to convert to an Int8Array. 119561847f8eSopenharmony_ci * @returns { Int8Array } A new Int8Array instance 119661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 119761847f8eSopenharmony_ci * @static 119861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 119961847f8eSopenharmony_ci * @atomicservice 120061847f8eSopenharmony_ci * @since 12 120161847f8eSopenharmony_ci */ 120261847f8eSopenharmony_ci static from(arrayLike: ArrayLike<number>): Int8Array; 120361847f8eSopenharmony_ci 120461847f8eSopenharmony_ci /** 120561847f8eSopenharmony_ci * Creates an Int8Array from an array-like object. 120661847f8eSopenharmony_ci * 120761847f8eSopenharmony_ci * @param { ArrayLike<T> } arrayLike - An array-like object to convert to an Int8Array. 120861847f8eSopenharmony_ci * @param { TypedArrayFromMapFn<T, number> } mapFn - A mapping function to call on every element of the array. 120961847f8eSopenharmony_ci * @returns { Int8Array } A new Int8Array instance 121061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 121161847f8eSopenharmony_ci * @static 121261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 121361847f8eSopenharmony_ci * @atomicservice 121461847f8eSopenharmony_ci * @since 12 121561847f8eSopenharmony_ci */ 121661847f8eSopenharmony_ci static from<T>(arrayLike: ArrayLike<T>, mapFn: TypedArrayFromMapFn<T, number>): Int8Array; 121761847f8eSopenharmony_ci /** 121861847f8eSopenharmony_ci * Creates an Int8Array from an iterable object. 121961847f8eSopenharmony_ci * 122061847f8eSopenharmony_ci * @param { Iterable<number> } arrayLike - An iterable object to convert to an Int8Array. 122161847f8eSopenharmony_ci * @param { TypedArrayFromMapFn<number, number> } [mapFn] - A mapping function to 122261847f8eSopenharmony_ci * call on every element of the array. 122361847f8eSopenharmony_ci * @returns { Int8Array } A new Int8Array instance 122461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 122561847f8eSopenharmony_ci * @static 122661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 122761847f8eSopenharmony_ci * @atomicservice 122861847f8eSopenharmony_ci * @since 12 122961847f8eSopenharmony_ci */ 123061847f8eSopenharmony_ci static from(arrayLike: Iterable<number>, mapFn?: TypedArrayFromMapFn<number, number>): Int8Array; 123161847f8eSopenharmony_ci /** 123261847f8eSopenharmony_ci * Returns the this object after copying a section of the array identified by start and end 123361847f8eSopenharmony_ci * to the same array starting at position target. 123461847f8eSopenharmony_ci * 123561847f8eSopenharmony_ci * @param { number } target - If target is negative, it is treated as length+target where length is the 123661847f8eSopenharmony_ci * length of the array. 123761847f8eSopenharmony_ci * @param { number } start - If start is negative, it is treated as length+start. If end is negative, it 123861847f8eSopenharmony_ci * is treated as length+end. 123961847f8eSopenharmony_ci * @param { number } [end] - If not specified, length of the this object is used as its default value. 124061847f8eSopenharmony_ci * @returns { Int8Array } The array itself. 124161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 124261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound. 124361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 124461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 124561847f8eSopenharmony_ci * @atomicservice 124661847f8eSopenharmony_ci * @since 12 124761847f8eSopenharmony_ci */ 124861847f8eSopenharmony_ci copyWithin(target: number, start: number, end?: number): Int8Array; 124961847f8eSopenharmony_ci /** 125061847f8eSopenharmony_ci * Determines whether all the members of an array satisfy the specified test. 125161847f8eSopenharmony_ci * 125261847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Int8Array> } predicate - A function that accepts up to three arguments. 125361847f8eSopenharmony_ci * The every method calls the predicate function for each element in the array until 125461847f8eSopenharmony_ci * the predicate returns a value which is coercible to the Boolean value false, or until the end of the array. 125561847f8eSopenharmony_ci * @returns { boolean } true unless predicate returns a false value for a typed array element, 125661847f8eSopenharmony_ci * in which case false is immediately returned. 125761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 125861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The every method cannot be bound. 125961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 126061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 126161847f8eSopenharmony_ci * @atomicservice 126261847f8eSopenharmony_ci * @since 12 126361847f8eSopenharmony_ci */ 126461847f8eSopenharmony_ci every(predicate: TypedArrayPredicateFn<number, Int8Array>): boolean; 126561847f8eSopenharmony_ci /** 126661847f8eSopenharmony_ci * Returns the this object after filling the section identified by start and end with value. 126761847f8eSopenharmony_ci * 126861847f8eSopenharmony_ci * @param { number } value - value to fill array section with. 126961847f8eSopenharmony_ci * @param { number } [start] - index to start filling the array at. If start is negative, it is treated as 127061847f8eSopenharmony_ci * length+start where length is the length of the array. 127161847f8eSopenharmony_ci * @param { number } [end] - index to stop filling the array at. If end is negative, it is treated as 127261847f8eSopenharmony_ci * length+end. 127361847f8eSopenharmony_ci * @returns { Int8Array } The array itself. 127461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 127561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The fill method cannot be bound. 127661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 127761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 127861847f8eSopenharmony_ci * @atomicservice 127961847f8eSopenharmony_ci * @since 12 128061847f8eSopenharmony_ci */ 128161847f8eSopenharmony_ci fill(value: number, start?: number, end?: number): Int8Array; 128261847f8eSopenharmony_ci /** 128361847f8eSopenharmony_ci * Returns the elements of an array that meet the condition specified in a callback function. 128461847f8eSopenharmony_ci * 128561847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Int8Array> } predicate - A function that accepts up to three arguments. 128661847f8eSopenharmony_ci * The filter method calls the predicate function one time for each element in the array. 128761847f8eSopenharmony_ci * @returns { Int8Array } The array itself. 128861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 128961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The filter method cannot be bound. 129061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 129161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 129261847f8eSopenharmony_ci * @atomicservice 129361847f8eSopenharmony_ci * @since 12 129461847f8eSopenharmony_ci */ 129561847f8eSopenharmony_ci filter(predicate: TypedArrayPredicateFn<number, Int8Array>): Int8Array; 129661847f8eSopenharmony_ci /** 129761847f8eSopenharmony_ci * Returns the value of the first element in the array where predicate is true, and undefined 129861847f8eSopenharmony_ci * otherwise. 129961847f8eSopenharmony_ci * 130061847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Int8Array> } predicate - find calls predicate once for each element of 130161847f8eSopenharmony_ci * the array, in ascending order, until it finds one where predicate returns true. 130261847f8eSopenharmony_ci * If such an element is found, find immediately returns that element value. Otherwise, find returns undefined. 130361847f8eSopenharmony_ci * @returns { number | undefined } The first element in the typed array 130461847f8eSopenharmony_ci * that satisfies the provided testing function. Otherwise, undefined is returned. 130561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 130661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The find method cannot be bound. 130761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 130861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 130961847f8eSopenharmony_ci * @atomicservice 131061847f8eSopenharmony_ci * @since 12 131161847f8eSopenharmony_ci */ 131261847f8eSopenharmony_ci find(predicate: TypedArrayPredicateFn<number, Int8Array>): number | undefined; 131361847f8eSopenharmony_ci /** 131461847f8eSopenharmony_ci * Returns the index of the first element in the array where predicate is true, and -1 131561847f8eSopenharmony_ci * otherwise. 131661847f8eSopenharmony_ci * 131761847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Int8Array> } predicate - find calls predicate once for each element of 131861847f8eSopenharmony_ci * the array, in ascending order, until it finds one where predicate returns true. If such an element is found, 131961847f8eSopenharmony_ci * findIndex immediately returns that element index. Otherwise, findIndex returns -1. 132061847f8eSopenharmony_ci * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1. 132161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 132261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The findIndex method cannot be bound. 132361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 132461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 132561847f8eSopenharmony_ci * @atomicservice 132661847f8eSopenharmony_ci * @since 12 132761847f8eSopenharmony_ci */ 132861847f8eSopenharmony_ci findIndex(predicate: TypedArrayPredicateFn<number, Int8Array>): number; 132961847f8eSopenharmony_ci /** 133061847f8eSopenharmony_ci * Performs the specified action for each element in an array. 133161847f8eSopenharmony_ci * 133261847f8eSopenharmony_ci * @param { TypedArrayForEachCallback<number, Int8Array> } callbackFn - A function that 133361847f8eSopenharmony_ci * accepts up to three arguments. 133461847f8eSopenharmony_ci * forEach calls the callbackfn function one time for each element in the array. 133561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 133661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The forEach method cannot be bound. 133761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 133861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 133961847f8eSopenharmony_ci * @atomicservice 134061847f8eSopenharmony_ci * @since 12 134161847f8eSopenharmony_ci */ 134261847f8eSopenharmony_ci forEach(callbackFn: TypedArrayForEachCallback<number, Int8Array>): void; 134361847f8eSopenharmony_ci /** 134461847f8eSopenharmony_ci * Returns the index of the first occurrence of a value in an array. 134561847f8eSopenharmony_ci * 134661847f8eSopenharmony_ci * @param { number } searchElement - The value to locate in the array. 134761847f8eSopenharmony_ci * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the 134861847f8eSopenharmony_ci * search starts at index 0. 134961847f8eSopenharmony_ci * @returns { number } The first index of searchElement in the typed array; -1 if not found. 135061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 135161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The indexOf method cannot be bound. 135261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 135361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 135461847f8eSopenharmony_ci * @atomicservice 135561847f8eSopenharmony_ci * @since 12 135661847f8eSopenharmony_ci */ 135761847f8eSopenharmony_ci indexOf(searchElement: number, fromIndex?: number): number; 135861847f8eSopenharmony_ci /** 135961847f8eSopenharmony_ci * Adds all the elements of an array separated by the specified separator string. 136061847f8eSopenharmony_ci * @param { string } [separator] - A string used to separate one element of an array from the next in the 136161847f8eSopenharmony_ci * resulting String. If omitted, the array elements are separated with a comma. 136261847f8eSopenharmony_ci * @returns { string } A string with all typed array elements joined. 136361847f8eSopenharmony_ci * If array.length is 0, the empty string is returned. 136461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 136561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The join method cannot be bound. 136661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 136761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 136861847f8eSopenharmony_ci * @atomicservice 136961847f8eSopenharmony_ci * @since 12 137061847f8eSopenharmony_ci */ 137161847f8eSopenharmony_ci join(separator?: string): string; 137261847f8eSopenharmony_ci /** 137361847f8eSopenharmony_ci * Calls a defined callback function on each element of an array, and returns an array that 137461847f8eSopenharmony_ci * contains the results. 137561847f8eSopenharmony_ci * 137661847f8eSopenharmony_ci * @param { TypedArrayMapCallback<number, Int8Array> } callbackFn - A function that 137761847f8eSopenharmony_ci * accepts up to three arguments. 137861847f8eSopenharmony_ci * The map method calls the callbackfn function one time for each element in the array. 137961847f8eSopenharmony_ci * @returns { Int8Array } The array itself. 138061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 138161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The map method cannot be bound. 138261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 138361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 138461847f8eSopenharmony_ci * @atomicservice 138561847f8eSopenharmony_ci * @since 12 138661847f8eSopenharmony_ci */ 138761847f8eSopenharmony_ci map(callbackFn: TypedArrayMapCallback<number, Int8Array>): Int8Array; 138861847f8eSopenharmony_ci /** 138961847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 139061847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 139161847f8eSopenharmony_ci * call to the callback function. 139261847f8eSopenharmony_ci * 139361847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<number, number, Int8Array> } callbackFn - A function that 139461847f8eSopenharmony_ci * accepts up to four arguments. 139561847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 139661847f8eSopenharmony_ci * @returns { number } The value that results from running the "reducer" callback function to 139761847f8eSopenharmony_ci * completion over the entire typed array. 139861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 139961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 140061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 140161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 140261847f8eSopenharmony_ci * @atomicservice 140361847f8eSopenharmony_ci * @since 12 140461847f8eSopenharmony_ci */ 140561847f8eSopenharmony_ci reduce(callbackFn: TypedArrayReduceCallback<number, number, Int8Array>): number; 140661847f8eSopenharmony_ci /** 140761847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 140861847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 140961847f8eSopenharmony_ci * call to the callback function. 141061847f8eSopenharmony_ci * 141161847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<number, number, Int8Array> } callbackFn - A function that 141261847f8eSopenharmony_ci * accepts up to four arguments. 141361847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 141461847f8eSopenharmony_ci * @param { number } initialValue - If initialValue is specified, it is used as the initial value to start 141561847f8eSopenharmony_ci * the accumulation. The first call to the callbackfn function provides this value as an argument 141661847f8eSopenharmony_ci * instead of an array value. 141761847f8eSopenharmony_ci * @returns { number } The value that results from running the "reducer" callback function to 141861847f8eSopenharmony_ci * completion over the entire typed array. 141961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 142061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 142161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 142261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 142361847f8eSopenharmony_ci * @atomicservice 142461847f8eSopenharmony_ci * @since 12 142561847f8eSopenharmony_ci */ 142661847f8eSopenharmony_ci reduce(callbackFn: TypedArrayReduceCallback<number, number, Int8Array>, initialValue: number): number; 142761847f8eSopenharmony_ci /** 142861847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 142961847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 143061847f8eSopenharmony_ci * call to the callback function. 143161847f8eSopenharmony_ci * 143261847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<U, number, Int8Array> } callbackFn - A function that 143361847f8eSopenharmony_ci * accepts up to four arguments. 143461847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 143561847f8eSopenharmony_ci * @param { U } initialValue - If initialValue is specified, it is used as the initial value to start 143661847f8eSopenharmony_ci * the accumulation. The first call to the callbackfn function provides this value as an argument 143761847f8eSopenharmony_ci * instead of an array value. 143861847f8eSopenharmony_ci * @returns { U } The value that results from running the "reducer" callback function to 143961847f8eSopenharmony_ci * completion over the entire typed array. 144061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 144161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 144261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 144361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 144461847f8eSopenharmony_ci * @atomicservice 144561847f8eSopenharmony_ci * @since 12 144661847f8eSopenharmony_ci */ 144761847f8eSopenharmony_ci reduce<U>(callbackFn: TypedArrayReduceCallback<U, number, Int8Array>, initialValue: U): U; 144861847f8eSopenharmony_ci /** 144961847f8eSopenharmony_ci * Reverses the elements in an Array. 145061847f8eSopenharmony_ci * 145161847f8eSopenharmony_ci * @returns { Int8Array } The reference to the original typed array, now reversed. 145261847f8eSopenharmony_ci * <br>Note that the typed array is reversed in place, and no copy is made. 145361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reverse method cannot be bound. 145461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 145561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 145661847f8eSopenharmony_ci * @atomicservice 145761847f8eSopenharmony_ci * @since 12 145861847f8eSopenharmony_ci */ 145961847f8eSopenharmony_ci reverse(): Int8Array; 146061847f8eSopenharmony_ci /** 146161847f8eSopenharmony_ci * Sets a value or an array of values. 146261847f8eSopenharmony_ci * 146361847f8eSopenharmony_ci * @param { ArrayLike<number> } array - A typed or untyped array of values to set. 146461847f8eSopenharmony_ci * @param { number } [offset] - The index in the current array at which the values are to be written. 146561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 146661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The set method cannot be bound. 146761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 146861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 146961847f8eSopenharmony_ci * @atomicservice 147061847f8eSopenharmony_ci * @since 12 147161847f8eSopenharmony_ci */ 147261847f8eSopenharmony_ci set(array: ArrayLike<number>, offset?: number): void; 147361847f8eSopenharmony_ci /** 147461847f8eSopenharmony_ci * Returns a section of an array. 147561847f8eSopenharmony_ci * 147661847f8eSopenharmony_ci * @param { number } [start] - The beginning of the specified portion of the array. 147761847f8eSopenharmony_ci * @param { number } [end] - The end of the specified portion of the array. 147861847f8eSopenharmony_ci * This is exclusive of the element at the index 'end'. 147961847f8eSopenharmony_ci * @returns { Int8Array } A new typed array containing the extracted elements. 148061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 148161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The slice method cannot be bound. 148261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 148361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 148461847f8eSopenharmony_ci * @atomicservice 148561847f8eSopenharmony_ci * @since 12 148661847f8eSopenharmony_ci */ 148761847f8eSopenharmony_ci slice(start?: number, end?: number): Int8Array; 148861847f8eSopenharmony_ci /** 148961847f8eSopenharmony_ci * Determines whether the specified callback function returns true for any element of an array. 149061847f8eSopenharmony_ci * 149161847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Int8Array> } predicate - A function that accepts up to three arguments. 149261847f8eSopenharmony_ci * The some method calls the predicate function for each element in the array until 149361847f8eSopenharmony_ci * the predicate returns a value which is coercible to the Boolean value true, or until the end of the array. 149461847f8eSopenharmony_ci * @returns { boolean } false unless predicate returns a truthy value for a typed array element, 149561847f8eSopenharmony_ci * in which case true is immediately returned. 149661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 149761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The some method cannot be bound. 149861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 149961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 150061847f8eSopenharmony_ci * @atomicservice 150161847f8eSopenharmony_ci * @since 12 150261847f8eSopenharmony_ci */ 150361847f8eSopenharmony_ci some(predicate: TypedArrayPredicateFn<number, Int8Array>): boolean; 150461847f8eSopenharmony_ci /** 150561847f8eSopenharmony_ci * Sorts an array. 150661847f8eSopenharmony_ci * 150761847f8eSopenharmony_ci * @param { TypedArrayCompareFn<number> } [compareFn] - Function used to determine the order of the elements. 150861847f8eSopenharmony_ci * It is expected to return a negative value if first argument is less than second argument, 150961847f8eSopenharmony_ci * zero if they're equal and a positive value otherwise. 151061847f8eSopenharmony_ci * If omitted, the elements are sorted in ascending, ASCII character order. 151161847f8eSopenharmony_ci * @returns { Int8Array } The reference to the original typed array, now sorted. 151261847f8eSopenharmony_ci * Note that the typed array is sorted in place and no copy is made. 151361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 151461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The sort method cannot be bound. 151561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 151661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 151761847f8eSopenharmony_ci * @atomicservice 151861847f8eSopenharmony_ci * @since 12 151961847f8eSopenharmony_ci */ 152061847f8eSopenharmony_ci sort(compareFn?: TypedArrayCompareFn<number>): Int8Array; 152161847f8eSopenharmony_ci /** 152261847f8eSopenharmony_ci * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements 152361847f8eSopenharmony_ci * at begin, inclusive, up to end, exclusive. 152461847f8eSopenharmony_ci * 152561847f8eSopenharmony_ci * @param { number } [begin] - The index of the beginning of the array. 152661847f8eSopenharmony_ci * @param { number } [end] - The index of the end of the array. 152761847f8eSopenharmony_ci * @returns { Int8Array } A new Int8Array object. 152861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 152961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The subarray method cannot be bound. 153061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 153161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 153261847f8eSopenharmony_ci * @atomicservice 153361847f8eSopenharmony_ci * @since 12 153461847f8eSopenharmony_ci */ 153561847f8eSopenharmony_ci subarray(begin?: number, end?: number): Int8Array; 153661847f8eSopenharmony_ci /** 153761847f8eSopenharmony_ci * Returns the item located at the specified index. 153861847f8eSopenharmony_ci * 153961847f8eSopenharmony_ci * @param { number } index - The zero-based index of the desired code unit.<br/> 154061847f8eSopenharmony_ci * A negative index will count back from the last item. 154161847f8eSopenharmony_ci * @returns { number | undefined } The element in the array matching the given index.<br/> 154261847f8eSopenharmony_ci * Always returns undefined if index < -array.length or 154361847f8eSopenharmony_ci * index >= array.length without attempting to access the corresponding property. 154461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 154561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The at method cannot be bound. 154661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 154761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 154861847f8eSopenharmony_ci * @atomicservice 154961847f8eSopenharmony_ci * @since 12 155061847f8eSopenharmony_ci */ 155161847f8eSopenharmony_ci at(index: number): number | undefined; 155261847f8eSopenharmony_ci /** 155361847f8eSopenharmony_ci * Returns an iterator that iterates over numbers. 155461847f8eSopenharmony_ci * 155561847f8eSopenharmony_ci * @returns { IterableIterator<number> } Iterator object that yields numbers. 155661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. 155761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 155861847f8eSopenharmony_ci * @atomicservice 155961847f8eSopenharmony_ci * @since 12 156061847f8eSopenharmony_ci */ 156161847f8eSopenharmony_ci [Symbol.iterator](): IterableIterator<number>; 156261847f8eSopenharmony_ci /** 156361847f8eSopenharmony_ci * Returns an iterable of key, value pairs for every entry in the array 156461847f8eSopenharmony_ci * 156561847f8eSopenharmony_ci * @returns { IterableIterator<[number, number]> } A new iterable iterator object. 156661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 156761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 156861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 156961847f8eSopenharmony_ci * @atomicservice 157061847f8eSopenharmony_ci * @since 12 157161847f8eSopenharmony_ci */ 157261847f8eSopenharmony_ci entries(): IterableIterator<[number, number]>; 157361847f8eSopenharmony_ci /** 157461847f8eSopenharmony_ci * Returns an iterable of keys in the array 157561847f8eSopenharmony_ci * 157661847f8eSopenharmony_ci * @returns { IterableIterator<number> } A new iterable iterator object. 157761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 157861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 157961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 158061847f8eSopenharmony_ci * @atomicservice 158161847f8eSopenharmony_ci * @since 12 158261847f8eSopenharmony_ci */ 158361847f8eSopenharmony_ci keys(): IterableIterator<number>; 158461847f8eSopenharmony_ci /** 158561847f8eSopenharmony_ci * Returns an iterable of values in the array 158661847f8eSopenharmony_ci * 158761847f8eSopenharmony_ci * @returns { IterableIterator<number> } A new iterable iterator object. 158861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 158961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 159061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 159161847f8eSopenharmony_ci * @atomicservice 159261847f8eSopenharmony_ci * @since 12 159361847f8eSopenharmony_ci */ 159461847f8eSopenharmony_ci values(): IterableIterator<number>; 159561847f8eSopenharmony_ci /** 159661847f8eSopenharmony_ci * Determines whether an array includes a certain element, returning true or false as appropriate. 159761847f8eSopenharmony_ci * 159861847f8eSopenharmony_ci * @param { number } searchElement - The element to search for. 159961847f8eSopenharmony_ci * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement. 160061847f8eSopenharmony_ci * @returns { boolean } A boolean value which is true if the value searchElement is found <br/> 160161847f8eSopenharmony_ci * within the typed array (or the part of the typed array indicated by the index fromIndex, if specified). 160261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 160361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The at method cannot be bound. 160461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 160561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 160661847f8eSopenharmony_ci * @atomicservice 160761847f8eSopenharmony_ci * @since 12 160861847f8eSopenharmony_ci */ 160961847f8eSopenharmony_ci includes(searchElement: number, fromIndex?: number): boolean; 161061847f8eSopenharmony_ci /** 161161847f8eSopenharmony_ci * Returns the item at that index. 161261847f8eSopenharmony_ci * 161361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 161461847f8eSopenharmony_ci * @atomicservice 161561847f8eSopenharmony_ci * @since 12 161661847f8eSopenharmony_ci */ 161761847f8eSopenharmony_ci [index: number]: number; 161861847f8eSopenharmony_ci } 161961847f8eSopenharmony_ci 162061847f8eSopenharmony_ci /** 162161847f8eSopenharmony_ci * The Uint8ClampedArray typed array represents an array of 8-bit unsigned integers clamped to 0–255. 162261847f8eSopenharmony_ci * The contents are initialized to 0. 162361847f8eSopenharmony_ci * If multiple threads access a Uint8ClampedArray instance concurrently, 162461847f8eSopenharmony_ci * and at least one of the threads modifies the array structurally, 162561847f8eSopenharmony_ci * it must be synchronized externally. 162661847f8eSopenharmony_ci * 162761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 162861847f8eSopenharmony_ci * @atomicservice 162961847f8eSopenharmony_ci * @since 12 163061847f8eSopenharmony_ci */ 163161847f8eSopenharmony_ci @Sendable 163261847f8eSopenharmony_ci class Uint8ClampedArray { 163361847f8eSopenharmony_ci /** 163461847f8eSopenharmony_ci * The size in bytes of each element in the array. 163561847f8eSopenharmony_ci * 163661847f8eSopenharmony_ci * @type { number } 163761847f8eSopenharmony_ci * @readonly 163861847f8eSopenharmony_ci * @static 163961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 164061847f8eSopenharmony_ci * @atomicservice 164161847f8eSopenharmony_ci * @since 12 164261847f8eSopenharmony_ci */ 164361847f8eSopenharmony_ci static readonly BYTES_PER_ELEMENT: number; 164461847f8eSopenharmony_ci /** 164561847f8eSopenharmony_ci * The ArrayBuffer instance referenced by the array. 164661847f8eSopenharmony_ci * 164761847f8eSopenharmony_ci * @type { ArrayBuffer } 164861847f8eSopenharmony_ci * @readonly 164961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 165061847f8eSopenharmony_ci * @atomicservice 165161847f8eSopenharmony_ci * @since 12 165261847f8eSopenharmony_ci */ 165361847f8eSopenharmony_ci readonly buffer: ArrayBuffer; 165461847f8eSopenharmony_ci /** 165561847f8eSopenharmony_ci * The length in bytes of the array. 165661847f8eSopenharmony_ci * 165761847f8eSopenharmony_ci * @type { number } 165861847f8eSopenharmony_ci * @readonly 165961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 166061847f8eSopenharmony_ci * @atomicservice 166161847f8eSopenharmony_ci * @since 12 166261847f8eSopenharmony_ci */ 166361847f8eSopenharmony_ci readonly byteLength: number; 166461847f8eSopenharmony_ci /** 166561847f8eSopenharmony_ci * The offset in bytes of the array. 166661847f8eSopenharmony_ci * 166761847f8eSopenharmony_ci * @type { number } 166861847f8eSopenharmony_ci * @readonly 166961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 167061847f8eSopenharmony_ci * @atomicservice 167161847f8eSopenharmony_ci * @since 12 167261847f8eSopenharmony_ci */ 167361847f8eSopenharmony_ci readonly byteOffset: number; 167461847f8eSopenharmony_ci /** 167561847f8eSopenharmony_ci * The length of the array. 167661847f8eSopenharmony_ci * 167761847f8eSopenharmony_ci * @type { number } 167861847f8eSopenharmony_ci * @readonly 167961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 168061847f8eSopenharmony_ci * @atomicservice 168161847f8eSopenharmony_ci * @since 12 168261847f8eSopenharmony_ci */ 168361847f8eSopenharmony_ci readonly length: number; 168461847f8eSopenharmony_ci /** 168561847f8eSopenharmony_ci * A constructor used to create an Uint8ClampedArray. 168661847f8eSopenharmony_ci * 168761847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Uint8ClampedArray's constructor cannot be directly invoked. 168861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 168961847f8eSopenharmony_ci * @atomicservice 169061847f8eSopenharmony_ci * @since 12 169161847f8eSopenharmony_ci */ 169261847f8eSopenharmony_ci constructor(); 169361847f8eSopenharmony_ci /** 169461847f8eSopenharmony_ci * A constructor used to create an Uint8ClampedArray. 169561847f8eSopenharmony_ci * 169661847f8eSopenharmony_ci * @param { number } length - The length of the array 169761847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Uint8ClampedArray's constructor cannot be directly invoked. 169861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 169961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 170061847f8eSopenharmony_ci * @atomicservice 170161847f8eSopenharmony_ci * @since 12 170261847f8eSopenharmony_ci */ 170361847f8eSopenharmony_ci constructor(length: number); 170461847f8eSopenharmony_ci /** 170561847f8eSopenharmony_ci * A constructor used to create an Uint8ClampedArray. 170661847f8eSopenharmony_ci * 170761847f8eSopenharmony_ci * @param { Iterable<number> } elements - An iterable object to convert to an Uint8ClampedArray. 170861847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Uint8ClampedArray's constructor cannot be directly invoked. 170961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 171061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 171161847f8eSopenharmony_ci * @atomicservice 171261847f8eSopenharmony_ci * @since 12 171361847f8eSopenharmony_ci */ 171461847f8eSopenharmony_ci constructor(elements: Iterable<number>); 171561847f8eSopenharmony_ci /** 171661847f8eSopenharmony_ci * A constructor used to create an Uint8ClampedArray. 171761847f8eSopenharmony_ci * 171861847f8eSopenharmony_ci * @param { ArrayLike<number> | ArrayBuffer } array - An array is initialized with the given elements 171961847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Uint8ClampedArray's constructor cannot be directly invoked. 172061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 172161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 172261847f8eSopenharmony_ci * @atomicservice 172361847f8eSopenharmony_ci * @since 12 172461847f8eSopenharmony_ci */ 172561847f8eSopenharmony_ci constructor(array: ArrayLike<number> | ArrayBuffer); 172661847f8eSopenharmony_ci /** 172761847f8eSopenharmony_ci * A constructor used to create an Uint8ClampedArray. 172861847f8eSopenharmony_ci * 172961847f8eSopenharmony_ci * @param { ArrayBuffer } buffer - An array is initialized with the given elements 173061847f8eSopenharmony_ci * @param { number } [byteOffset] - The byteOffset (in bytes) parameter specifies the memory range 173161847f8eSopenharmony_ci * that will be exposed by the typed array view. 173261847f8eSopenharmony_ci * @param { number } [length] - The length parameter specifies the memory range 173361847f8eSopenharmony_ci * that will be exposed by the typed array view. 173461847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Uint8ClampedArray's constructor cannot be directly invoked. 173561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 173661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 173761847f8eSopenharmony_ci * @atomicservice 173861847f8eSopenharmony_ci * @since 12 173961847f8eSopenharmony_ci */ 174061847f8eSopenharmony_ci constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number); 174161847f8eSopenharmony_ci /** 174261847f8eSopenharmony_ci * Creates an Uint8ClampedArray from an array-like object. 174361847f8eSopenharmony_ci * 174461847f8eSopenharmony_ci * @param { ArrayLike<number> } arrayLike - An array-like object to convert to an Uint8ClampedArray. 174561847f8eSopenharmony_ci * @returns { Uint8ClampedArray } A new Uint8ClampedArray instance 174661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 174761847f8eSopenharmony_ci * @static 174861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 174961847f8eSopenharmony_ci * @atomicservice 175061847f8eSopenharmony_ci * @since 12 175161847f8eSopenharmony_ci */ 175261847f8eSopenharmony_ci static from(arrayLike: ArrayLike<number>): Uint8ClampedArray; 175361847f8eSopenharmony_ci 175461847f8eSopenharmony_ci /** 175561847f8eSopenharmony_ci * Creates an Uint8ClampedArray from an array-like object. 175661847f8eSopenharmony_ci * 175761847f8eSopenharmony_ci * @param { ArrayLike<T> } arrayLike - An array-like object to convert to an Uint8ClampedArray. 175861847f8eSopenharmony_ci * @param { TypedArrayFromMapFn<T, number> } mapFn - A mapping function to call on every element of the array. 175961847f8eSopenharmony_ci * @returns { Uint8ClampedArray } A new Uint8ClampedArray instance 176061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 176161847f8eSopenharmony_ci * @static 176261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 176361847f8eSopenharmony_ci * @atomicservice 176461847f8eSopenharmony_ci * @since 12 176561847f8eSopenharmony_ci */ 176661847f8eSopenharmony_ci static from<T>(arrayLike: ArrayLike<T>, mapFn: TypedArrayFromMapFn<T, number>): Uint8ClampedArray; 176761847f8eSopenharmony_ci /** 176861847f8eSopenharmony_ci * Creates an Uint8ClampedArray from an iterable object. 176961847f8eSopenharmony_ci * 177061847f8eSopenharmony_ci * @param { Iterable<number> } arrayLike - An iterable object to convert to an Uint8ClampedArray. 177161847f8eSopenharmony_ci * @param { TypedArrayFromMapFn<number, number> } [mapFn] - A mapping function to 177261847f8eSopenharmony_ci * call on every element of the array. 177361847f8eSopenharmony_ci * @returns { Uint8ClampedArray } A new Uint8ClampedArray instance 177461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 177561847f8eSopenharmony_ci * @static 177661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 177761847f8eSopenharmony_ci * @atomicservice 177861847f8eSopenharmony_ci * @since 12 177961847f8eSopenharmony_ci */ 178061847f8eSopenharmony_ci static from(arrayLike: Iterable<number>, mapFn?: TypedArrayFromMapFn<number, number>): Uint8ClampedArray; 178161847f8eSopenharmony_ci /** 178261847f8eSopenharmony_ci * Returns the this object after copying a section of the array identified by start and end 178361847f8eSopenharmony_ci * to the same array starting at position target. 178461847f8eSopenharmony_ci * 178561847f8eSopenharmony_ci * @param { number } target - If target is negative, it is treated as length+target where length is the 178661847f8eSopenharmony_ci * length of the array. 178761847f8eSopenharmony_ci * @param { number } start - If start is negative, it is treated as length+start. If end is negative, it 178861847f8eSopenharmony_ci * is treated as length+end. 178961847f8eSopenharmony_ci * @param { number } [end] - If not specified, length of the this object is used as its default value. 179061847f8eSopenharmony_ci * @returns { Uint8ClampedArray } The array itself. 179161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 179261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound. 179361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 179461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 179561847f8eSopenharmony_ci * @atomicservice 179661847f8eSopenharmony_ci * @since 12 179761847f8eSopenharmony_ci */ 179861847f8eSopenharmony_ci copyWithin(target: number, start: number, end?: number): Uint8ClampedArray; 179961847f8eSopenharmony_ci /** 180061847f8eSopenharmony_ci * Determines whether all the members of an array satisfy the specified test. 180161847f8eSopenharmony_ci * 180261847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Uint8ClampedArray> } predicate - A function 180361847f8eSopenharmony_ci * that accepts up to three arguments. 180461847f8eSopenharmony_ci * The every method calls the predicate function for each element in the array until 180561847f8eSopenharmony_ci * the predicate returns a value which is coercible to the Boolean value false, or until the end of the array. 180661847f8eSopenharmony_ci * @returns { boolean } true unless predicate returns a false value for a typed array element, 180761847f8eSopenharmony_ci * in which case false is immediately returned. 180861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 180961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The every method cannot be bound. 181061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 181161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 181261847f8eSopenharmony_ci * @atomicservice 181361847f8eSopenharmony_ci * @since 12 181461847f8eSopenharmony_ci */ 181561847f8eSopenharmony_ci every(predicate: TypedArrayPredicateFn<number, Uint8ClampedArray>): boolean; 181661847f8eSopenharmony_ci /** 181761847f8eSopenharmony_ci * Returns the this object after filling the section identified by start and end with value. 181861847f8eSopenharmony_ci * 181961847f8eSopenharmony_ci * @param { number } value - value to fill array section with. 182061847f8eSopenharmony_ci * @param { number } [start] - index to start filling the array at. If start is negative, it is treated as 182161847f8eSopenharmony_ci * length+start where length is the length of the array. 182261847f8eSopenharmony_ci * @param { number } [end] - index to stop filling the array at. If end is negative, it is treated as 182361847f8eSopenharmony_ci * length+end. 182461847f8eSopenharmony_ci * @returns { Uint8ClampedArray } The array itself. 182561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 182661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The fill method cannot be bound. 182761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 182861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 182961847f8eSopenharmony_ci * @atomicservice 183061847f8eSopenharmony_ci * @since 12 183161847f8eSopenharmony_ci */ 183261847f8eSopenharmony_ci fill(value: number, start?: number, end?: number): Uint8ClampedArray; 183361847f8eSopenharmony_ci /** 183461847f8eSopenharmony_ci * Returns the elements of an array that meet the condition specified in a callback function. 183561847f8eSopenharmony_ci * 183661847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Uint8ClampedArray> } predicate - A function 183761847f8eSopenharmony_ci * that accepts up to three arguments. 183861847f8eSopenharmony_ci * The filter method calls the predicate function one time for each element in the array. 183961847f8eSopenharmony_ci * @returns { Uint8ClampedArray } The array itself. 184061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 184161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The filter method cannot be bound. 184261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 184361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 184461847f8eSopenharmony_ci * @atomicservice 184561847f8eSopenharmony_ci * @since 12 184661847f8eSopenharmony_ci */ 184761847f8eSopenharmony_ci filter(predicate: TypedArrayPredicateFn<number, Uint8ClampedArray>): Uint8ClampedArray; 184861847f8eSopenharmony_ci /** 184961847f8eSopenharmony_ci * Returns the value of the first element in the array where predicate is true, and undefined 185061847f8eSopenharmony_ci * otherwise. 185161847f8eSopenharmony_ci * 185261847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Uint8ClampedArray> } predicate - find calls predicate once for 185361847f8eSopenharmony_ci * each element of the array, in ascending order, until it finds one where predicate returns true. 185461847f8eSopenharmony_ci * If such an element is found, find immediately returns that element value. Otherwise, find returns undefined. 185561847f8eSopenharmony_ci * @returns { number | undefined } The first element in the typed array 185661847f8eSopenharmony_ci * that satisfies the provided testing function. Otherwise, undefined is returned. 185761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 185861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The find method cannot be bound. 185961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 186061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 186161847f8eSopenharmony_ci * @atomicservice 186261847f8eSopenharmony_ci * @since 12 186361847f8eSopenharmony_ci */ 186461847f8eSopenharmony_ci find(predicate: TypedArrayPredicateFn<number, Uint8ClampedArray>): number | undefined; 186561847f8eSopenharmony_ci /** 186661847f8eSopenharmony_ci * Returns the index of the first element in the array where predicate is true, and -1 186761847f8eSopenharmony_ci * otherwise. 186861847f8eSopenharmony_ci * 186961847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Uint8ClampedArray> } predicate - find calls predicate once for 187061847f8eSopenharmony_ci * each element of the array, in ascending order, until it finds one where predicate returns true. 187161847f8eSopenharmony_ci * If such an element is found, findIndex immediately returns that element index. 187261847f8eSopenharmony_ci * Otherwise, findIndex returns -1. 187361847f8eSopenharmony_ci * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1. 187461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 187561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The findIndex method cannot be bound. 187661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 187761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 187861847f8eSopenharmony_ci * @atomicservice 187961847f8eSopenharmony_ci * @since 12 188061847f8eSopenharmony_ci */ 188161847f8eSopenharmony_ci findIndex(predicate: TypedArrayPredicateFn<number, Uint8ClampedArray>): number; 188261847f8eSopenharmony_ci /** 188361847f8eSopenharmony_ci * Performs the specified action for each element in an array. 188461847f8eSopenharmony_ci * 188561847f8eSopenharmony_ci * @param { TypedArrayForEachCallback<number, Uint8ClampedArray> } callbackFn - A function that 188661847f8eSopenharmony_ci * accepts up to three arguments. 188761847f8eSopenharmony_ci * forEach calls the callbackfn function one time for each element in the array. 188861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 188961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The forEach method cannot be bound. 189061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 189161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 189261847f8eSopenharmony_ci * @atomicservice 189361847f8eSopenharmony_ci * @since 12 189461847f8eSopenharmony_ci */ 189561847f8eSopenharmony_ci forEach(callbackFn: TypedArrayForEachCallback<number, Uint8ClampedArray>): void; 189661847f8eSopenharmony_ci /** 189761847f8eSopenharmony_ci * Returns the index of the first occurrence of a value in an array. 189861847f8eSopenharmony_ci * 189961847f8eSopenharmony_ci * @param { number } searchElement - The value to locate in the array. 190061847f8eSopenharmony_ci * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the 190161847f8eSopenharmony_ci * search starts at index 0. 190261847f8eSopenharmony_ci * @returns { number } The first index of searchElement in the typed array; -1 if not found. 190361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 190461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The indexOf method cannot be bound. 190561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 190661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 190761847f8eSopenharmony_ci * @atomicservice 190861847f8eSopenharmony_ci * @since 12 190961847f8eSopenharmony_ci */ 191061847f8eSopenharmony_ci indexOf(searchElement: number, fromIndex?: number): number; 191161847f8eSopenharmony_ci /** 191261847f8eSopenharmony_ci * Adds all the elements of an array separated by the specified separator string. 191361847f8eSopenharmony_ci * @param { string } [separator] - A string used to separate one element of an array from the next in the 191461847f8eSopenharmony_ci * resulting String. If omitted, the array elements are separated with a comma. 191561847f8eSopenharmony_ci * @returns { string } A string with all typed array elements joined. 191661847f8eSopenharmony_ci * If array.length is 0, the empty string is returned. 191761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 191861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The join method cannot be bound. 191961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 192061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 192161847f8eSopenharmony_ci * @atomicservice 192261847f8eSopenharmony_ci * @since 12 192361847f8eSopenharmony_ci */ 192461847f8eSopenharmony_ci join(separator?: string): string; 192561847f8eSopenharmony_ci /** 192661847f8eSopenharmony_ci * Calls a defined callback function on each element of an array, and returns an array that 192761847f8eSopenharmony_ci * contains the results. 192861847f8eSopenharmony_ci * 192961847f8eSopenharmony_ci * @param { TypedArrayMapCallback<number, Uint8ClampedArray> } callbackFn - A function that 193061847f8eSopenharmony_ci * accepts up to three arguments. 193161847f8eSopenharmony_ci * The map method calls the callbackfn function one time for each element in the array. 193261847f8eSopenharmony_ci * @returns { Uint8ClampedArray } The array itself. 193361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 193461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The map method cannot be bound. 193561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 193661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 193761847f8eSopenharmony_ci * @atomicservice 193861847f8eSopenharmony_ci * @since 12 193961847f8eSopenharmony_ci */ 194061847f8eSopenharmony_ci map(callbackFn: TypedArrayMapCallback<number, Uint8ClampedArray>): Uint8ClampedArray; 194161847f8eSopenharmony_ci /** 194261847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 194361847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 194461847f8eSopenharmony_ci * call to the callback function. 194561847f8eSopenharmony_ci * 194661847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<number, number, Uint8ClampedArray> } callbackFn - A function that 194761847f8eSopenharmony_ci * accepts up to four arguments. 194861847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 194961847f8eSopenharmony_ci * @returns { number } The value that results from running the "reducer" callback function to 195061847f8eSopenharmony_ci * completion over the entire typed array. 195161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 195261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 195361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 195461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 195561847f8eSopenharmony_ci * @atomicservice 195661847f8eSopenharmony_ci * @since 12 195761847f8eSopenharmony_ci */ 195861847f8eSopenharmony_ci reduce(callbackFn: TypedArrayReduceCallback<number, number, Uint8ClampedArray>): number; 195961847f8eSopenharmony_ci /** 196061847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 196161847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 196261847f8eSopenharmony_ci * call to the callback function. 196361847f8eSopenharmony_ci * 196461847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<U, number, Uint8ClampedArray> } callbackFn - A function that 196561847f8eSopenharmony_ci * accepts up to four arguments. 196661847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 196761847f8eSopenharmony_ci * @param { U } initialValue - If initialValue is specified, it is used as the initial value to start 196861847f8eSopenharmony_ci * the accumulation. The first call to the callbackfn function provides this value as an argument 196961847f8eSopenharmony_ci * instead of an array value. 197061847f8eSopenharmony_ci * @returns { U } The value that results from running the "reducer" callback function to 197161847f8eSopenharmony_ci * completion over the entire typed array. 197261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 197361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 197461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 197561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 197661847f8eSopenharmony_ci * @atomicservice 197761847f8eSopenharmony_ci * @since 12 197861847f8eSopenharmony_ci */ 197961847f8eSopenharmony_ci reduce<U = number>(callbackFn: TypedArrayReduceCallback<U, number, Uint8ClampedArray>, initialValue: U): U; 198061847f8eSopenharmony_ci /** 198161847f8eSopenharmony_ci * Reverses the elements in an Array. 198261847f8eSopenharmony_ci * 198361847f8eSopenharmony_ci * @returns { Uint8ClampedArray } The reference to the original typed array, now reversed. 198461847f8eSopenharmony_ci * <br>Note that the typed array is reversed in place, and no copy is made. 198561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reverse method cannot be bound. 198661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 198761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 198861847f8eSopenharmony_ci * @atomicservice 198961847f8eSopenharmony_ci * @since 12 199061847f8eSopenharmony_ci */ 199161847f8eSopenharmony_ci reverse(): Uint8ClampedArray; 199261847f8eSopenharmony_ci /** 199361847f8eSopenharmony_ci * Sets a value or an array of values. 199461847f8eSopenharmony_ci * 199561847f8eSopenharmony_ci * @param { ArrayLike<number> } array - A typed or untyped array of values to set. 199661847f8eSopenharmony_ci * @param { number } [offset] - The index in the current array at which the values are to be written. 199761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 199861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The set method cannot be bound. 199961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 200061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 200161847f8eSopenharmony_ci * @atomicservice 200261847f8eSopenharmony_ci * @since 12 200361847f8eSopenharmony_ci */ 200461847f8eSopenharmony_ci set(array: ArrayLike<number>, offset?: number): void; 200561847f8eSopenharmony_ci /** 200661847f8eSopenharmony_ci * Returns a section of an array. 200761847f8eSopenharmony_ci * 200861847f8eSopenharmony_ci * @param { number } [start] - The beginning of the specified portion of the array. 200961847f8eSopenharmony_ci * @param { number } [end] - The end of the specified portion of the array. 201061847f8eSopenharmony_ci * This is exclusive of the element at the index 'end'. 201161847f8eSopenharmony_ci * @returns { Uint8ClampedArray } A new typed array containing the extracted elements. 201261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 201361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The slice method cannot be bound. 201461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 201561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 201661847f8eSopenharmony_ci * @atomicservice 201761847f8eSopenharmony_ci * @since 12 201861847f8eSopenharmony_ci */ 201961847f8eSopenharmony_ci slice(start?: number, end?: number): Uint8ClampedArray; 202061847f8eSopenharmony_ci /** 202161847f8eSopenharmony_ci * Determines whether the specified callback function returns true for any element of an array. 202261847f8eSopenharmony_ci * 202361847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Uint8ClampedArray> } predicate - A function 202461847f8eSopenharmony_ci * that accepts up to three arguments. 202561847f8eSopenharmony_ci * The some method calls the predicate function for each element in the array until 202661847f8eSopenharmony_ci * the predicate returns a value which is coercible to the Boolean value true, or until the end of the array. 202761847f8eSopenharmony_ci * @returns { boolean } false unless predicate returns a truthy value for a typed array element, 202861847f8eSopenharmony_ci * in which case true is immediately returned. 202961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 203061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The some method cannot be bound. 203161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 203261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 203361847f8eSopenharmony_ci * @atomicservice 203461847f8eSopenharmony_ci * @since 12 203561847f8eSopenharmony_ci */ 203661847f8eSopenharmony_ci some(predicate: TypedArrayPredicateFn<number, Uint8ClampedArray>): boolean; 203761847f8eSopenharmony_ci /** 203861847f8eSopenharmony_ci * Sorts an array. 203961847f8eSopenharmony_ci * 204061847f8eSopenharmony_ci * @param { TypedArrayCompareFn<number> } [compareFn] - Function used to determine the order of the elements. 204161847f8eSopenharmony_ci * It is expected to return a negative value if first argument is less than second argument, 204261847f8eSopenharmony_ci * zero if they're equal and a positive value otherwise. 204361847f8eSopenharmony_ci * If omitted, the elements are sorted in ascending, ASCII character order. 204461847f8eSopenharmony_ci * @returns { Uint8ClampedArray } The reference to the original typed array, now sorted. 204561847f8eSopenharmony_ci * Note that the typed array is sorted in place and no copy is made. 204661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 204761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The sort method cannot be bound. 204861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 204961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 205061847f8eSopenharmony_ci * @atomicservice 205161847f8eSopenharmony_ci * @since 12 205261847f8eSopenharmony_ci */ 205361847f8eSopenharmony_ci sort(compareFn?: TypedArrayCompareFn<number>): Uint8ClampedArray; 205461847f8eSopenharmony_ci /** 205561847f8eSopenharmony_ci * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements 205661847f8eSopenharmony_ci * at begin, inclusive, up to end, exclusive. 205761847f8eSopenharmony_ci * 205861847f8eSopenharmony_ci * @param { number } [begin] - The index of the beginning of the array. 205961847f8eSopenharmony_ci * @param { number } [end] - The index of the end of the array. 206061847f8eSopenharmony_ci * @returns { Uint8ClampedArray } A new Uint8ClampedArray object. 206161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 206261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The subarray method cannot be bound. 206361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 206461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 206561847f8eSopenharmony_ci * @atomicservice 206661847f8eSopenharmony_ci * @since 12 206761847f8eSopenharmony_ci */ 206861847f8eSopenharmony_ci subarray(begin?: number, end?: number): Uint8ClampedArray; 206961847f8eSopenharmony_ci /** 207061847f8eSopenharmony_ci * Returns the item located at the specified index. 207161847f8eSopenharmony_ci * 207261847f8eSopenharmony_ci * @param { number } index - The zero-based index of the desired code unit.<br/> 207361847f8eSopenharmony_ci * A negative index will count back from the last item. 207461847f8eSopenharmony_ci * @returns { number | undefined } The element in the array matching the given index.<br/> 207561847f8eSopenharmony_ci * Always returns undefined if index < -array.length or 207661847f8eSopenharmony_ci * index >= array.length without attempting to access the corresponding property. 207761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 207861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The at method cannot be bound. 207961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 208061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 208161847f8eSopenharmony_ci * @atomicservice 208261847f8eSopenharmony_ci * @since 12 208361847f8eSopenharmony_ci */ 208461847f8eSopenharmony_ci at(index: number): number | undefined; 208561847f8eSopenharmony_ci /** 208661847f8eSopenharmony_ci * Returns an iterator that iterates over numbers. 208761847f8eSopenharmony_ci * 208861847f8eSopenharmony_ci * @returns { IterableIterator<number> } Iterator object that yields numbers. 208961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. 209061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 209161847f8eSopenharmony_ci * @atomicservice 209261847f8eSopenharmony_ci * @since 12 209361847f8eSopenharmony_ci */ 209461847f8eSopenharmony_ci [Symbol.iterator](): IterableIterator<number>; 209561847f8eSopenharmony_ci /** 209661847f8eSopenharmony_ci * Returns an iterable of key, value pairs for every entry in the array 209761847f8eSopenharmony_ci * 209861847f8eSopenharmony_ci * @returns { IterableIterator<[number, number]> } A new iterable iterator object. 209961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 210061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 210161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 210261847f8eSopenharmony_ci * @atomicservice 210361847f8eSopenharmony_ci * @since 12 210461847f8eSopenharmony_ci */ 210561847f8eSopenharmony_ci entries(): IterableIterator<[number, number]>; 210661847f8eSopenharmony_ci /** 210761847f8eSopenharmony_ci * Returns an iterable of keys in the array 210861847f8eSopenharmony_ci * 210961847f8eSopenharmony_ci * @returns { IterableIterator<number> } A new iterable iterator object. 211061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 211161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 211261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 211361847f8eSopenharmony_ci * @atomicservice 211461847f8eSopenharmony_ci * @since 12 211561847f8eSopenharmony_ci */ 211661847f8eSopenharmony_ci keys(): IterableIterator<number>; 211761847f8eSopenharmony_ci /** 211861847f8eSopenharmony_ci * Returns an iterable of values in the array 211961847f8eSopenharmony_ci * 212061847f8eSopenharmony_ci * @returns { IterableIterator<number> } A new iterable iterator object. 212161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 212261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 212361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 212461847f8eSopenharmony_ci * @atomicservice 212561847f8eSopenharmony_ci * @since 12 212661847f8eSopenharmony_ci */ 212761847f8eSopenharmony_ci values(): IterableIterator<number>; 212861847f8eSopenharmony_ci /** 212961847f8eSopenharmony_ci * Determines whether an array includes a certain element, returning true or false as appropriate. 213061847f8eSopenharmony_ci * 213161847f8eSopenharmony_ci * @param { number } searchElement - The element to search for. 213261847f8eSopenharmony_ci * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement. 213361847f8eSopenharmony_ci * @returns { boolean } A boolean value which is true if the value searchElement is found <br/> 213461847f8eSopenharmony_ci * within the typed array (or the part of the typed array indicated by the index fromIndex, if specified). 213561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 213661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The at method cannot be bound. 213761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 213861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 213961847f8eSopenharmony_ci * @atomicservice 214061847f8eSopenharmony_ci * @since 12 214161847f8eSopenharmony_ci */ 214261847f8eSopenharmony_ci includes(searchElement: number, fromIndex?: number): boolean; 214361847f8eSopenharmony_ci /** 214461847f8eSopenharmony_ci * Returns the item at that index. 214561847f8eSopenharmony_ci * 214661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 214761847f8eSopenharmony_ci * @atomicservice 214861847f8eSopenharmony_ci * @since 12 214961847f8eSopenharmony_ci */ 215061847f8eSopenharmony_ci [index: number]: number; 215161847f8eSopenharmony_ci } 215261847f8eSopenharmony_ci 215361847f8eSopenharmony_ci /** 215461847f8eSopenharmony_ci * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. 215561847f8eSopenharmony_ci * If multiple threads access a Uint8Array instance concurrently, 215661847f8eSopenharmony_ci * and at least one of the threads modifies the array structurally, 215761847f8eSopenharmony_ci * it must be synchronized externally. 215861847f8eSopenharmony_ci * 215961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 216061847f8eSopenharmony_ci * @atomicservice 216161847f8eSopenharmony_ci * @since 12 216261847f8eSopenharmony_ci */ 216361847f8eSopenharmony_ci @Sendable 216461847f8eSopenharmony_ci class Uint8Array { 216561847f8eSopenharmony_ci /** 216661847f8eSopenharmony_ci * The size in bytes of each element in the array. 216761847f8eSopenharmony_ci * 216861847f8eSopenharmony_ci * @type { number } 216961847f8eSopenharmony_ci * @readonly 217061847f8eSopenharmony_ci * @static 217161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 217261847f8eSopenharmony_ci * @atomicservice 217361847f8eSopenharmony_ci * @since 12 217461847f8eSopenharmony_ci */ 217561847f8eSopenharmony_ci static readonly BYTES_PER_ELEMENT: number; 217661847f8eSopenharmony_ci /** 217761847f8eSopenharmony_ci * The ArrayBuffer instance referenced by the array. 217861847f8eSopenharmony_ci * 217961847f8eSopenharmony_ci * @type { ArrayBuffer } 218061847f8eSopenharmony_ci * @readonly 218161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 218261847f8eSopenharmony_ci * @atomicservice 218361847f8eSopenharmony_ci * @since 12 218461847f8eSopenharmony_ci */ 218561847f8eSopenharmony_ci readonly buffer: ArrayBuffer; 218661847f8eSopenharmony_ci /** 218761847f8eSopenharmony_ci * The length in bytes of the array. 218861847f8eSopenharmony_ci * 218961847f8eSopenharmony_ci * @type { number } 219061847f8eSopenharmony_ci * @readonly 219161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 219261847f8eSopenharmony_ci * @atomicservice 219361847f8eSopenharmony_ci * @since 12 219461847f8eSopenharmony_ci */ 219561847f8eSopenharmony_ci readonly byteLength: number; 219661847f8eSopenharmony_ci /** 219761847f8eSopenharmony_ci * The offset in bytes of the array. 219861847f8eSopenharmony_ci * 219961847f8eSopenharmony_ci * @type { number } 220061847f8eSopenharmony_ci * @readonly 220161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 220261847f8eSopenharmony_ci * @atomicservice 220361847f8eSopenharmony_ci * @since 12 220461847f8eSopenharmony_ci */ 220561847f8eSopenharmony_ci readonly byteOffset: number; 220661847f8eSopenharmony_ci /** 220761847f8eSopenharmony_ci * The length of the array. 220861847f8eSopenharmony_ci * 220961847f8eSopenharmony_ci * @type { number } 221061847f8eSopenharmony_ci * @readonly 221161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 221261847f8eSopenharmony_ci * @atomicservice 221361847f8eSopenharmony_ci * @since 12 221461847f8eSopenharmony_ci */ 221561847f8eSopenharmony_ci readonly length: number; 221661847f8eSopenharmony_ci /** 221761847f8eSopenharmony_ci * A constructor used to create an Uint8Array. 221861847f8eSopenharmony_ci * 221961847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Uint8Array's constructor cannot be directly invoked. 222061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 222161847f8eSopenharmony_ci * @atomicservice 222261847f8eSopenharmony_ci * @since 12 222361847f8eSopenharmony_ci */ 222461847f8eSopenharmony_ci constructor(); 222561847f8eSopenharmony_ci /** 222661847f8eSopenharmony_ci * A constructor used to create an Uint8Array. 222761847f8eSopenharmony_ci * 222861847f8eSopenharmony_ci * @param { number } length - The length of the array 222961847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Uint8Array's constructor cannot be directly invoked. 223061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 223161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 223261847f8eSopenharmony_ci * @atomicservice 223361847f8eSopenharmony_ci * @since 12 223461847f8eSopenharmony_ci */ 223561847f8eSopenharmony_ci constructor(length: number); 223661847f8eSopenharmony_ci /** 223761847f8eSopenharmony_ci * A constructor used to create an Uint8Array. 223861847f8eSopenharmony_ci * 223961847f8eSopenharmony_ci * @param { Iterable<number> } elements - An iterable object to convert to an Uint8Array. 224061847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Uint8Array's constructor cannot be directly invoked. 224161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 224261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 224361847f8eSopenharmony_ci * @atomicservice 224461847f8eSopenharmony_ci * @since 12 224561847f8eSopenharmony_ci */ 224661847f8eSopenharmony_ci constructor(elements: Iterable<number>); 224761847f8eSopenharmony_ci /** 224861847f8eSopenharmony_ci * A constructor used to create an Uint8Array. 224961847f8eSopenharmony_ci * 225061847f8eSopenharmony_ci * @param { ArrayLike<number> | ArrayBuffer } array - An array is initialized with the given elements 225161847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Uint8Array's constructor cannot be directly invoked. 225261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 225361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 225461847f8eSopenharmony_ci * @atomicservice 225561847f8eSopenharmony_ci * @since 12 225661847f8eSopenharmony_ci */ 225761847f8eSopenharmony_ci constructor(array: ArrayLike<number> | ArrayBuffer); 225861847f8eSopenharmony_ci /** 225961847f8eSopenharmony_ci * A constructor used to create an Uint8Array. 226061847f8eSopenharmony_ci * 226161847f8eSopenharmony_ci * @param { ArrayBuffer } buffer - An array is initialized with the given elements 226261847f8eSopenharmony_ci * @param { number } [byteOffset] - The byteOffset (in bytes) parameter specifies the memory range 226361847f8eSopenharmony_ci * that will be exposed by the typed array view. 226461847f8eSopenharmony_ci * @param { number } [length] - The length parameter specifies the memory range 226561847f8eSopenharmony_ci * that will be exposed by the typed array view. 226661847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Uint8Array's constructor cannot be directly invoked. 226761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 226861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 226961847f8eSopenharmony_ci * @atomicservice 227061847f8eSopenharmony_ci * @since 12 227161847f8eSopenharmony_ci */ 227261847f8eSopenharmony_ci constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number); 227361847f8eSopenharmony_ci /** 227461847f8eSopenharmony_ci * Creates an Uint8Array from an array-like object. 227561847f8eSopenharmony_ci * 227661847f8eSopenharmony_ci * @param { ArrayLike<number> } arrayLike - An array-like object to convert to an Uint8Array. 227761847f8eSopenharmony_ci * @returns { Uint8Array } A new Uint8Array instance 227861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 227961847f8eSopenharmony_ci * @static 228061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 228161847f8eSopenharmony_ci * @atomicservice 228261847f8eSopenharmony_ci * @since 12 228361847f8eSopenharmony_ci */ 228461847f8eSopenharmony_ci static from(arrayLike: ArrayLike<number>): Uint8Array; 228561847f8eSopenharmony_ci /** 228661847f8eSopenharmony_ci * Creates an Uint8Array from an array-like object. 228761847f8eSopenharmony_ci * 228861847f8eSopenharmony_ci * @param { ArrayLike<T> } arrayLike - An array-like object to convert to an Uint8Array. 228961847f8eSopenharmony_ci * @param { TypedArrayFromMapFn<T, number> } mapFn - A mapping function to call on every element of the array. 229061847f8eSopenharmony_ci * @returns { Uint8Array } A new Uint8Array instance 229161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 229261847f8eSopenharmony_ci * @static 229361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 229461847f8eSopenharmony_ci * @atomicservice 229561847f8eSopenharmony_ci * @since 12 229661847f8eSopenharmony_ci */ 229761847f8eSopenharmony_ci static from<T>(arrayLike: ArrayLike<T>, mapFn: TypedArrayFromMapFn<T, number>): Uint8Array; 229861847f8eSopenharmony_ci /** 229961847f8eSopenharmony_ci * Creates an Uint8Array from an iterable object. 230061847f8eSopenharmony_ci * 230161847f8eSopenharmony_ci * @param { Iterable<number> } arrayLike - An iterable object to convert to an Uint8Array. 230261847f8eSopenharmony_ci * @param { TypedArrayFromMapFn<number, number> } [mapFn] - A mapping function to 230361847f8eSopenharmony_ci * call on every element of the array. 230461847f8eSopenharmony_ci * @returns { Uint8Array } A new Uint8Array instance 230561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 230661847f8eSopenharmony_ci * @static 230761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 230861847f8eSopenharmony_ci * @atomicservice 230961847f8eSopenharmony_ci * @since 12 231061847f8eSopenharmony_ci */ 231161847f8eSopenharmony_ci static from(arrayLike: Iterable<number>, mapFn?: TypedArrayFromMapFn<number, number>): Uint8Array; 231261847f8eSopenharmony_ci /** 231361847f8eSopenharmony_ci * Returns the this object after copying a section of the array identified by start and end 231461847f8eSopenharmony_ci * to the same array starting at position target. 231561847f8eSopenharmony_ci * 231661847f8eSopenharmony_ci * @param { number } target - If target is negative, it is treated as length+target where length is the 231761847f8eSopenharmony_ci * length of the array. 231861847f8eSopenharmony_ci * @param { number } start - If start is negative, it is treated as length+start. If end is negative, it 231961847f8eSopenharmony_ci * is treated as length+end. 232061847f8eSopenharmony_ci * @param { number } [end] - If not specified, length of the this object is used as its default value. 232161847f8eSopenharmony_ci * @returns { Uint8Array } The array itself. 232261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 232361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound. 232461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 232561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 232661847f8eSopenharmony_ci * @atomicservice 232761847f8eSopenharmony_ci * @since 12 232861847f8eSopenharmony_ci */ 232961847f8eSopenharmony_ci copyWithin(target: number, start: number, end?: number): Uint8Array; 233061847f8eSopenharmony_ci /** 233161847f8eSopenharmony_ci * Determines whether all the members of an array satisfy the specified test. 233261847f8eSopenharmony_ci * 233361847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Uint8Array> } predicate - A function that accepts up to three arguments. 233461847f8eSopenharmony_ci * The every method calls the predicate function for each element in the array until 233561847f8eSopenharmony_ci * the predicate returns a value which is coercible to the Boolean value false, or until the end of the array. 233661847f8eSopenharmony_ci * @returns { boolean } true unless predicate returns a false value for a typed array element, 233761847f8eSopenharmony_ci * in which case false is immediately returned. 233861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 233961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The every method cannot be bound. 234061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 234161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 234261847f8eSopenharmony_ci * @atomicservice 234361847f8eSopenharmony_ci * @since 12 234461847f8eSopenharmony_ci */ 234561847f8eSopenharmony_ci every(predicate: TypedArrayPredicateFn<number, Uint8Array>): boolean; 234661847f8eSopenharmony_ci /** 234761847f8eSopenharmony_ci * Returns the this object after filling the section identified by start and end with value. 234861847f8eSopenharmony_ci * 234961847f8eSopenharmony_ci * @param { number } value - value to fill array section with. 235061847f8eSopenharmony_ci * @param { number } [start] - index to start filling the array at. If start is negative, it is treated as 235161847f8eSopenharmony_ci * length+start where length is the length of the array. 235261847f8eSopenharmony_ci * @param { number } [end] - index to stop filling the array at. If end is negative, it is treated as 235361847f8eSopenharmony_ci * length+end. 235461847f8eSopenharmony_ci * @returns { Uint8Array } The array itself. 235561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 235661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The fill method cannot be bound. 235761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 235861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 235961847f8eSopenharmony_ci * @atomicservice 236061847f8eSopenharmony_ci * @since 12 236161847f8eSopenharmony_ci */ 236261847f8eSopenharmony_ci fill(value: number, start?: number, end?: number): Uint8Array; 236361847f8eSopenharmony_ci /** 236461847f8eSopenharmony_ci * Returns the elements of an array that meet the condition specified in a callback function. 236561847f8eSopenharmony_ci * 236661847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Uint8Array> } predicate - A function that accepts up to three arguments. 236761847f8eSopenharmony_ci * The filter method calls the predicate function one time for each element in the array. 236861847f8eSopenharmony_ci * @returns { Uint8Array } The array itself. 236961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 237061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The filter method cannot be bound. 237161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 237261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 237361847f8eSopenharmony_ci * @atomicservice 237461847f8eSopenharmony_ci * @since 12 237561847f8eSopenharmony_ci */ 237661847f8eSopenharmony_ci filter(predicate: TypedArrayPredicateFn<number, Uint8Array>): Uint8Array; 237761847f8eSopenharmony_ci /** 237861847f8eSopenharmony_ci * Returns the value of the first element in the array where predicate is true, and undefined 237961847f8eSopenharmony_ci * otherwise. 238061847f8eSopenharmony_ci * 238161847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Uint8Array> } predicate - find calls predicate once for each element of 238261847f8eSopenharmony_ci * the array, in ascending order, until it finds one where predicate returns true. 238361847f8eSopenharmony_ci * If such an element is found, find immediately returns that element value. Otherwise, find returns undefined. 238461847f8eSopenharmony_ci * @returns { number | undefined } The first element in the typed array 238561847f8eSopenharmony_ci * that satisfies the provided testing function. Otherwise, undefined is returned. 238661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 238761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The find method cannot be bound. 238861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 238961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 239061847f8eSopenharmony_ci * @atomicservice 239161847f8eSopenharmony_ci * @since 12 239261847f8eSopenharmony_ci */ 239361847f8eSopenharmony_ci find(predicate: TypedArrayPredicateFn<number, Uint8Array>): number | undefined; 239461847f8eSopenharmony_ci /** 239561847f8eSopenharmony_ci * Returns the index of the first element in the array where predicate is true, and -1 239661847f8eSopenharmony_ci * otherwise. 239761847f8eSopenharmony_ci * 239861847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Uint8Array> } predicate - find calls predicate once for each element of 239961847f8eSopenharmony_ci * the array, in ascending order, until it finds one where predicate returns true. If such an element is found, 240061847f8eSopenharmony_ci * findIndex immediately returns that element index. Otherwise, findIndex returns -1. 240161847f8eSopenharmony_ci * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1. 240261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 240361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The findIndex method cannot be bound. 240461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 240561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 240661847f8eSopenharmony_ci * @atomicservice 240761847f8eSopenharmony_ci * @since 12 240861847f8eSopenharmony_ci */ 240961847f8eSopenharmony_ci findIndex(predicate: TypedArrayPredicateFn<number, Uint8Array>): number; 241061847f8eSopenharmony_ci /** 241161847f8eSopenharmony_ci * Performs the specified action for each element in an array. 241261847f8eSopenharmony_ci * 241361847f8eSopenharmony_ci * @param { TypedArrayForEachCallback<number, Uint8Array> } callbackFn - A function that 241461847f8eSopenharmony_ci * accepts up to three arguments. 241561847f8eSopenharmony_ci * forEach calls the callbackfn function one time for each element in the array. 241661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 241761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The forEach method cannot be bound. 241861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 241961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 242061847f8eSopenharmony_ci * @atomicservice 242161847f8eSopenharmony_ci * @since 12 242261847f8eSopenharmony_ci */ 242361847f8eSopenharmony_ci forEach(callbackFn: TypedArrayForEachCallback<number, Uint8Array>): void; 242461847f8eSopenharmony_ci /** 242561847f8eSopenharmony_ci * Returns the index of the first occurrence of a value in an array. 242661847f8eSopenharmony_ci * 242761847f8eSopenharmony_ci * @param { number } searchElement - The value to locate in the array. 242861847f8eSopenharmony_ci * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the 242961847f8eSopenharmony_ci * search starts at index 0. 243061847f8eSopenharmony_ci * @returns { number } The first index of searchElement in the typed array; -1 if not found. 243161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 243261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The indexOf method cannot be bound. 243361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 243461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 243561847f8eSopenharmony_ci * @atomicservice 243661847f8eSopenharmony_ci * @since 12 243761847f8eSopenharmony_ci */ 243861847f8eSopenharmony_ci indexOf(searchElement: number, fromIndex?: number): number; 243961847f8eSopenharmony_ci /** 244061847f8eSopenharmony_ci * Adds all the elements of an array separated by the specified separator string. 244161847f8eSopenharmony_ci * @param { string } [separator] - A string used to separate one element of an array from the next in the 244261847f8eSopenharmony_ci * resulting String. If omitted, the array elements are separated with a comma. 244361847f8eSopenharmony_ci * @returns { string } A string with all typed array elements joined. 244461847f8eSopenharmony_ci * If array.length is 0, the empty string is returned. 244561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 244661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The join method cannot be bound. 244761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 244861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 244961847f8eSopenharmony_ci * @atomicservice 245061847f8eSopenharmony_ci * @since 12 245161847f8eSopenharmony_ci */ 245261847f8eSopenharmony_ci join(separator?: string): string; 245361847f8eSopenharmony_ci /** 245461847f8eSopenharmony_ci * Calls a defined callback function on each element of an array, and returns an array that 245561847f8eSopenharmony_ci * contains the results. 245661847f8eSopenharmony_ci * 245761847f8eSopenharmony_ci * @param { TypedArrayMapCallback<number, Uint8Array> } callbackFn - A function that 245861847f8eSopenharmony_ci * accepts up to three arguments. 245961847f8eSopenharmony_ci * The map method calls the callbackfn function one time for each element in the array. 246061847f8eSopenharmony_ci * @returns { Uint8Array } The array itself. 246161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 246261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The map method cannot be bound. 246361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 246461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 246561847f8eSopenharmony_ci * @atomicservice 246661847f8eSopenharmony_ci * @since 12 246761847f8eSopenharmony_ci */ 246861847f8eSopenharmony_ci map(callbackFn: TypedArrayMapCallback<number, Uint8Array>): Uint8Array; 246961847f8eSopenharmony_ci /** 247061847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 247161847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 247261847f8eSopenharmony_ci * call to the callback function. 247361847f8eSopenharmony_ci * 247461847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<number, number, Uint8Array> } callbackFn - A function that 247561847f8eSopenharmony_ci * accepts up to four arguments. 247661847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 247761847f8eSopenharmony_ci * @returns { number } The value that results from running the "reducer" callback function to 247861847f8eSopenharmony_ci * completion over the entire typed array. 247961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 248061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 248161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 248261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 248361847f8eSopenharmony_ci * @atomicservice 248461847f8eSopenharmony_ci * @since 12 248561847f8eSopenharmony_ci */ 248661847f8eSopenharmony_ci reduce(callbackFn: TypedArrayReduceCallback<number, number, Uint8Array>): number; 248761847f8eSopenharmony_ci /** 248861847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 248961847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 249061847f8eSopenharmony_ci * call to the callback function. 249161847f8eSopenharmony_ci * 249261847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<number, number, Uint8Array> } callbackFn - A function that 249361847f8eSopenharmony_ci * accepts up to four arguments. 249461847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 249561847f8eSopenharmony_ci * @param { number } initialValue - If initialValue is specified, it is used as the initial value to start 249661847f8eSopenharmony_ci * the accumulation. The first call to the callbackfn function provides this value as an argument 249761847f8eSopenharmony_ci * instead of an array value. 249861847f8eSopenharmony_ci * @returns { number } The value that results from running the "reducer" callback function to 249961847f8eSopenharmony_ci * completion over the entire typed array. 250061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 250161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 250261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 250361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 250461847f8eSopenharmony_ci * @atomicservice 250561847f8eSopenharmony_ci * @since 12 250661847f8eSopenharmony_ci */ 250761847f8eSopenharmony_ci reduce(callbackFn: TypedArrayReduceCallback<number, number, Uint8Array>, initialValue: number): number; 250861847f8eSopenharmony_ci /** 250961847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 251061847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 251161847f8eSopenharmony_ci * call to the callback function. 251261847f8eSopenharmony_ci * 251361847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<U, number, Uint8Array> } callbackFn - A function that 251461847f8eSopenharmony_ci * accepts up to four arguments. 251561847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 251661847f8eSopenharmony_ci * @param { U } initialValue - If initialValue is specified, it is used as the initial value to start 251761847f8eSopenharmony_ci * the accumulation. The first call to the callbackfn function provides this value as an argument 251861847f8eSopenharmony_ci * instead of an array value. 251961847f8eSopenharmony_ci * @returns { U } The value that results from running the "reducer" callback function to 252061847f8eSopenharmony_ci * completion over the entire typed array. 252161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 252261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 252361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 252461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 252561847f8eSopenharmony_ci * @atomicservice 252661847f8eSopenharmony_ci * @since 12 252761847f8eSopenharmony_ci */ 252861847f8eSopenharmony_ci reduce<U>(callbackFn: TypedArrayReduceCallback<U, number, Uint8Array>, initialValue: U): U; 252961847f8eSopenharmony_ci /** 253061847f8eSopenharmony_ci * Reverses the elements in an Array. 253161847f8eSopenharmony_ci * 253261847f8eSopenharmony_ci * @returns { Uint8Array } The reference to the original typed array, now reversed. 253361847f8eSopenharmony_ci * <br>Note that the typed array is reversed in place, and no copy is made. 253461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reverse method cannot be bound. 253561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 253661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 253761847f8eSopenharmony_ci * @atomicservice 253861847f8eSopenharmony_ci * @since 12 253961847f8eSopenharmony_ci */ 254061847f8eSopenharmony_ci reverse(): Uint8Array; 254161847f8eSopenharmony_ci /** 254261847f8eSopenharmony_ci * Sets a value or an array of values. 254361847f8eSopenharmony_ci * 254461847f8eSopenharmony_ci * @param { ArrayLike<number> } array - A typed or untyped array of values to set. 254561847f8eSopenharmony_ci * @param { number } [offset] - The index in the current array at which the values are to be written. 254661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 254761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The set method cannot be bound. 254861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 254961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 255061847f8eSopenharmony_ci * @atomicservice 255161847f8eSopenharmony_ci * @since 12 255261847f8eSopenharmony_ci */ 255361847f8eSopenharmony_ci set(array: ArrayLike<number>, offset?: number): void; 255461847f8eSopenharmony_ci /** 255561847f8eSopenharmony_ci * Returns a section of an array. 255661847f8eSopenharmony_ci * 255761847f8eSopenharmony_ci * @param { number } [start] - The beginning of the specified portion of the array. 255861847f8eSopenharmony_ci * @param { number } [end] - The end of the specified portion of the array. 255961847f8eSopenharmony_ci * This is exclusive of the element at the index 'end'. 256061847f8eSopenharmony_ci * @returns { Uint8Array } A new typed array containing the extracted elements. 256161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 256261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The slice method cannot be bound. 256361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 256461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 256561847f8eSopenharmony_ci * @atomicservice 256661847f8eSopenharmony_ci * @since 12 256761847f8eSopenharmony_ci */ 256861847f8eSopenharmony_ci slice(start?: number, end?: number): Uint8Array; 256961847f8eSopenharmony_ci /** 257061847f8eSopenharmony_ci * Determines whether the specified callback function returns true for any element of an array. 257161847f8eSopenharmony_ci * 257261847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Uint8Array> } predicate - A function that accepts up to three arguments. 257361847f8eSopenharmony_ci * The some method calls the predicate function for each element in the array until 257461847f8eSopenharmony_ci * the predicate returns a value which is coercible to the Boolean value true, or until the end of the array. 257561847f8eSopenharmony_ci * @returns { boolean } false unless predicate returns a truthy value for a typed array element, 257661847f8eSopenharmony_ci * in which case true is immediately returned. 257761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 257861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The some method cannot be bound. 257961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 258061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 258161847f8eSopenharmony_ci * @atomicservice 258261847f8eSopenharmony_ci * @since 12 258361847f8eSopenharmony_ci */ 258461847f8eSopenharmony_ci some(predicate: TypedArrayPredicateFn<number, Uint8Array>): boolean; 258561847f8eSopenharmony_ci /** 258661847f8eSopenharmony_ci * Sorts an array. 258761847f8eSopenharmony_ci * 258861847f8eSopenharmony_ci * @param { TypedArrayCompareFn<number> } [compareFn] - Function used to determine the order of the elements. 258961847f8eSopenharmony_ci * It is expected to return a negative value if first argument is less than second argument, 259061847f8eSopenharmony_ci * zero if they're equal and a positive value otherwise. 259161847f8eSopenharmony_ci * If omitted, the elements are sorted in ascending, ASCII character order. 259261847f8eSopenharmony_ci * @returns { Uint8Array } The reference to the original typed array, now sorted. 259361847f8eSopenharmony_ci * Note that the typed array is sorted in place and no copy is made. 259461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 259561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The sort method cannot be bound. 259661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 259761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 259861847f8eSopenharmony_ci * @atomicservice 259961847f8eSopenharmony_ci * @since 12 260061847f8eSopenharmony_ci */ 260161847f8eSopenharmony_ci sort(compareFn?: TypedArrayCompareFn<number>): Uint8Array; 260261847f8eSopenharmony_ci /** 260361847f8eSopenharmony_ci * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements 260461847f8eSopenharmony_ci * at begin, inclusive, up to end, exclusive. 260561847f8eSopenharmony_ci * 260661847f8eSopenharmony_ci * @param { number } [begin] - The index of the beginning of the array. 260761847f8eSopenharmony_ci * @param { number } [end] - The index of the end of the array. 260861847f8eSopenharmony_ci * @returns { Uint8Array } A new Uint8Array object. 260961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 261061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The subarray method cannot be bound. 261161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 261261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 261361847f8eSopenharmony_ci * @atomicservice 261461847f8eSopenharmony_ci * @since 12 261561847f8eSopenharmony_ci */ 261661847f8eSopenharmony_ci subarray(begin?: number, end?: number): Uint8Array; 261761847f8eSopenharmony_ci /** 261861847f8eSopenharmony_ci * Returns the item located at the specified index. 261961847f8eSopenharmony_ci * 262061847f8eSopenharmony_ci * @param { number } index - The zero-based index of the desired code unit.<br/> 262161847f8eSopenharmony_ci * A negative index will count back from the last item. 262261847f8eSopenharmony_ci * @returns { number | undefined } The element in the array matching the given index.<br/> 262361847f8eSopenharmony_ci * Always returns undefined if index < -array.length or 262461847f8eSopenharmony_ci * index >= array.length without attempting to access the corresponding property. 262561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 262661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The at method cannot be bound. 262761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 262861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 262961847f8eSopenharmony_ci * @atomicservice 263061847f8eSopenharmony_ci * @since 12 263161847f8eSopenharmony_ci */ 263261847f8eSopenharmony_ci at(index: number): number | undefined; 263361847f8eSopenharmony_ci /** 263461847f8eSopenharmony_ci * Returns an iterator that iterates over numbers. 263561847f8eSopenharmony_ci * 263661847f8eSopenharmony_ci * @returns { IterableIterator<number> } Iterator object that yields numbers. 263761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. 263861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 263961847f8eSopenharmony_ci * @atomicservice 264061847f8eSopenharmony_ci * @since 12 264161847f8eSopenharmony_ci */ 264261847f8eSopenharmony_ci [Symbol.iterator](): IterableIterator<number>; 264361847f8eSopenharmony_ci /** 264461847f8eSopenharmony_ci * Returns an iterable of key, value pairs for every entry in the array 264561847f8eSopenharmony_ci * 264661847f8eSopenharmony_ci * @returns { IterableIterator<[number, number]> } A new iterable iterator object. 264761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 264861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 264961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 265061847f8eSopenharmony_ci * @atomicservice 265161847f8eSopenharmony_ci * @since 12 265261847f8eSopenharmony_ci */ 265361847f8eSopenharmony_ci entries(): IterableIterator<[number, number]>; 265461847f8eSopenharmony_ci /** 265561847f8eSopenharmony_ci * Returns an iterable of keys in the array 265661847f8eSopenharmony_ci * 265761847f8eSopenharmony_ci * @returns { IterableIterator<number> } A new iterable iterator object. 265861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 265961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 266061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 266161847f8eSopenharmony_ci * @atomicservice 266261847f8eSopenharmony_ci * @since 12 266361847f8eSopenharmony_ci */ 266461847f8eSopenharmony_ci keys(): IterableIterator<number>; 266561847f8eSopenharmony_ci /** 266661847f8eSopenharmony_ci * Returns an iterable of values in the array 266761847f8eSopenharmony_ci * 266861847f8eSopenharmony_ci * @returns { IterableIterator<number> } A new iterable iterator object. 266961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 267061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 267161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 267261847f8eSopenharmony_ci * @atomicservice 267361847f8eSopenharmony_ci * @since 12 267461847f8eSopenharmony_ci */ 267561847f8eSopenharmony_ci values(): IterableIterator<number>; 267661847f8eSopenharmony_ci /** 267761847f8eSopenharmony_ci * Determines whether an array includes a certain element, returning true or false as appropriate. 267861847f8eSopenharmony_ci * 267961847f8eSopenharmony_ci * @param { number } searchElement - The element to search for. 268061847f8eSopenharmony_ci * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement. 268161847f8eSopenharmony_ci * @returns { boolean } A boolean value which is true if the value searchElement is found <br/> 268261847f8eSopenharmony_ci * within the typed array (or the part of the typed array indicated by the index fromIndex, if specified). 268361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 268461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The at method cannot be bound. 268561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 268661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 268761847f8eSopenharmony_ci * @atomicservice 268861847f8eSopenharmony_ci * @since 12 268961847f8eSopenharmony_ci */ 269061847f8eSopenharmony_ci includes(searchElement: number, fromIndex?: number): boolean; 269161847f8eSopenharmony_ci /** 269261847f8eSopenharmony_ci * Returns the item at that index. 269361847f8eSopenharmony_ci * 269461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 269561847f8eSopenharmony_ci * @atomicservice 269661847f8eSopenharmony_ci * @since 12 269761847f8eSopenharmony_ci */ 269861847f8eSopenharmony_ci [index: number]: number; 269961847f8eSopenharmony_ci } 270061847f8eSopenharmony_ci 270161847f8eSopenharmony_ci /** 270261847f8eSopenharmony_ci * A typed array of 16-bit integer values. The contents are initialized to 0. 270361847f8eSopenharmony_ci * If multiple threads access a Int16Array instance concurrently, 270461847f8eSopenharmony_ci * and at least one of the threads modifies the array structurally, 270561847f8eSopenharmony_ci * it must be synchronized externally. 270661847f8eSopenharmony_ci * 270761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 270861847f8eSopenharmony_ci * @atomicservice 270961847f8eSopenharmony_ci * @since 12 271061847f8eSopenharmony_ci */ 271161847f8eSopenharmony_ci @Sendable 271261847f8eSopenharmony_ci class Int16Array { 271361847f8eSopenharmony_ci /** 271461847f8eSopenharmony_ci * The size in bytes of each element in the array. 271561847f8eSopenharmony_ci * 271661847f8eSopenharmony_ci * @type { number } 271761847f8eSopenharmony_ci * @readonly 271861847f8eSopenharmony_ci * @static 271961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 272061847f8eSopenharmony_ci * @atomicservice 272161847f8eSopenharmony_ci * @since 12 272261847f8eSopenharmony_ci */ 272361847f8eSopenharmony_ci static readonly BYTES_PER_ELEMENT: number; 272461847f8eSopenharmony_ci /** 272561847f8eSopenharmony_ci * The ArrayBuffer instance referenced by the array. 272661847f8eSopenharmony_ci * 272761847f8eSopenharmony_ci * @type { ArrayBuffer } 272861847f8eSopenharmony_ci * @readonly 272961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 273061847f8eSopenharmony_ci * @atomicservice 273161847f8eSopenharmony_ci * @since 12 273261847f8eSopenharmony_ci */ 273361847f8eSopenharmony_ci readonly buffer: ArrayBuffer; 273461847f8eSopenharmony_ci /** 273561847f8eSopenharmony_ci * The length in bytes of the array. 273661847f8eSopenharmony_ci * 273761847f8eSopenharmony_ci * @type { number } 273861847f8eSopenharmony_ci * @readonly 273961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 274061847f8eSopenharmony_ci * @atomicservice 274161847f8eSopenharmony_ci * @since 12 274261847f8eSopenharmony_ci */ 274361847f8eSopenharmony_ci readonly byteLength: number; 274461847f8eSopenharmony_ci /** 274561847f8eSopenharmony_ci * The offset in bytes of the array. 274661847f8eSopenharmony_ci * 274761847f8eSopenharmony_ci * @type { number } 274861847f8eSopenharmony_ci * @readonly 274961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 275061847f8eSopenharmony_ci * @atomicservice 275161847f8eSopenharmony_ci * @since 12 275261847f8eSopenharmony_ci */ 275361847f8eSopenharmony_ci readonly byteOffset: number; 275461847f8eSopenharmony_ci /** 275561847f8eSopenharmony_ci * The length of the array. 275661847f8eSopenharmony_ci * 275761847f8eSopenharmony_ci * @type { number } 275861847f8eSopenharmony_ci * @readonly 275961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 276061847f8eSopenharmony_ci * @atomicservice 276161847f8eSopenharmony_ci * @since 12 276261847f8eSopenharmony_ci */ 276361847f8eSopenharmony_ci readonly length: number; 276461847f8eSopenharmony_ci /** 276561847f8eSopenharmony_ci * A constructor used to create an Int16Array. 276661847f8eSopenharmony_ci * 276761847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Int16Array's constructor cannot be directly invoked. 276861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 276961847f8eSopenharmony_ci * @atomicservice 277061847f8eSopenharmony_ci * @since 12 277161847f8eSopenharmony_ci */ 277261847f8eSopenharmony_ci constructor(); 277361847f8eSopenharmony_ci /** 277461847f8eSopenharmony_ci * A constructor used to create an Int16Array. 277561847f8eSopenharmony_ci * 277661847f8eSopenharmony_ci * @param { number } length - The length of the array 277761847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Int16Array's constructor cannot be directly invoked. 277861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 277961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 278061847f8eSopenharmony_ci * @atomicservice 278161847f8eSopenharmony_ci * @since 12 278261847f8eSopenharmony_ci */ 278361847f8eSopenharmony_ci constructor(length: number); 278461847f8eSopenharmony_ci /** 278561847f8eSopenharmony_ci * A constructor used to create an Int16Array. 278661847f8eSopenharmony_ci * 278761847f8eSopenharmony_ci * @param { Iterable<number> } elements - An iterable object to convert to an Int16Array. 278861847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Int16Array's constructor cannot be directly invoked. 278961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 279061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 279161847f8eSopenharmony_ci * @atomicservice 279261847f8eSopenharmony_ci * @since 12 279361847f8eSopenharmony_ci */ 279461847f8eSopenharmony_ci constructor(elements: Iterable<number>); 279561847f8eSopenharmony_ci /** 279661847f8eSopenharmony_ci * A constructor used to create an Int16Array. 279761847f8eSopenharmony_ci * 279861847f8eSopenharmony_ci * @param { ArrayLike<number> | ArrayBuffer } array - An array is initialized with the given elements 279961847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Int16Array's constructor cannot be directly invoked. 280061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 280161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 280261847f8eSopenharmony_ci * @atomicservice 280361847f8eSopenharmony_ci * @since 12 280461847f8eSopenharmony_ci */ 280561847f8eSopenharmony_ci constructor(array: ArrayLike<number> | ArrayBuffer); 280661847f8eSopenharmony_ci /** 280761847f8eSopenharmony_ci * A constructor used to create an Int16Array. 280861847f8eSopenharmony_ci * 280961847f8eSopenharmony_ci * @param { ArrayBuffer } buffer - An array is initialized with the given elements 281061847f8eSopenharmony_ci * @param { number } [byteOffset] - The byteOffset (in bytes) parameter specifies the memory range 281161847f8eSopenharmony_ci * that will be exposed by the typed array view. 281261847f8eSopenharmony_ci * @param { number } [length] - The length parameter specifies the memory range 281361847f8eSopenharmony_ci * that will be exposed by the typed array view. 281461847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Int16Array's constructor cannot be directly invoked. 281561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 281661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 281761847f8eSopenharmony_ci * @atomicservice 281861847f8eSopenharmony_ci * @since 12 281961847f8eSopenharmony_ci */ 282061847f8eSopenharmony_ci constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number); 282161847f8eSopenharmony_ci /** 282261847f8eSopenharmony_ci * Creates an Int16Array from an array-like object. 282361847f8eSopenharmony_ci * 282461847f8eSopenharmony_ci * @param { ArrayLike<number> } arrayLike - An array-like object to convert to an Int16Array. 282561847f8eSopenharmony_ci * @returns { Int16Array } A new Int16Array instance 282661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 282761847f8eSopenharmony_ci * @static 282861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 282961847f8eSopenharmony_ci * @atomicservice 283061847f8eSopenharmony_ci * @since 12 283161847f8eSopenharmony_ci */ 283261847f8eSopenharmony_ci static from(arrayLike: ArrayLike<number>): Int16Array; 283361847f8eSopenharmony_ci /** 283461847f8eSopenharmony_ci * Creates an Int16Array from an array-like object. 283561847f8eSopenharmony_ci * 283661847f8eSopenharmony_ci * @param { ArrayLike<T> } arrayLike - An array-like object to convert to an Int16Array. 283761847f8eSopenharmony_ci * @param { TypedArrayFromMapFn<T, number> } mapFn - A mapping function to call on every element of the array. 283861847f8eSopenharmony_ci * @returns { Int16Array } A new Int16Array instance 283961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 284061847f8eSopenharmony_ci * @static 284161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 284261847f8eSopenharmony_ci * @atomicservice 284361847f8eSopenharmony_ci * @since 12 284461847f8eSopenharmony_ci */ 284561847f8eSopenharmony_ci static from<T>(arrayLike: ArrayLike<T>, mapFn: TypedArrayFromMapFn<T, number>): Int16Array; 284661847f8eSopenharmony_ci /** 284761847f8eSopenharmony_ci * Creates an Int16Array from an iterable object. 284861847f8eSopenharmony_ci * 284961847f8eSopenharmony_ci * @param { Iterable<number> } arrayLike - An iterable object to convert to an Int16Array. 285061847f8eSopenharmony_ci * @param { TypedArrayFromMapFn<number, number> } [mapFn] - A mapping function to 285161847f8eSopenharmony_ci * call on every element of the array. 285261847f8eSopenharmony_ci * @returns { Int16Array } A new Int16Array instance 285361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 285461847f8eSopenharmony_ci * @static 285561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 285661847f8eSopenharmony_ci * @atomicservice 285761847f8eSopenharmony_ci * @since 12 285861847f8eSopenharmony_ci */ 285961847f8eSopenharmony_ci static from(arrayLike: Iterable<number>, mapFn?: TypedArrayFromMapFn<number, number>): Int16Array; 286061847f8eSopenharmony_ci /** 286161847f8eSopenharmony_ci * Returns the this object after copying a section of the array identified by start and end 286261847f8eSopenharmony_ci * to the same array starting at position target. 286361847f8eSopenharmony_ci * 286461847f8eSopenharmony_ci * @param { number } target - If target is negative, it is treated as length+target where length is the 286561847f8eSopenharmony_ci * length of the array. 286661847f8eSopenharmony_ci * @param { number } start - If start is negative, it is treated as length+start. If end is negative, it 286761847f8eSopenharmony_ci * is treated as length+end. 286861847f8eSopenharmony_ci * @param { number } [end] - If not specified, length of the this object is used as its default value. 286961847f8eSopenharmony_ci * @returns { Int16Array } The array itself. 287061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 287161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound. 287261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 287361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 287461847f8eSopenharmony_ci * @atomicservice 287561847f8eSopenharmony_ci * @since 12 287661847f8eSopenharmony_ci */ 287761847f8eSopenharmony_ci copyWithin(target: number, start: number, end?: number): Int16Array; 287861847f8eSopenharmony_ci /** 287961847f8eSopenharmony_ci * Determines whether all the members of an array satisfy the specified test. 288061847f8eSopenharmony_ci * 288161847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Int16Array> } predicate - A function that accepts up to three arguments. 288261847f8eSopenharmony_ci * The every method calls the predicate function for each element in the array until 288361847f8eSopenharmony_ci * the predicate returns a value which is coercible to the Boolean value false, or until the end of the array. 288461847f8eSopenharmony_ci * @returns { boolean } true unless predicate returns a false value for a typed array element, 288561847f8eSopenharmony_ci * in which case false is immediately returned. 288661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 288761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The every method cannot be bound. 288861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 288961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 289061847f8eSopenharmony_ci * @atomicservice 289161847f8eSopenharmony_ci * @since 12 289261847f8eSopenharmony_ci */ 289361847f8eSopenharmony_ci every(predicate: TypedArrayPredicateFn<number, Int16Array>): boolean; 289461847f8eSopenharmony_ci /** 289561847f8eSopenharmony_ci * Returns the this object after filling the section identified by start and end with value. 289661847f8eSopenharmony_ci * 289761847f8eSopenharmony_ci * @param { number } value - value to fill array section with. 289861847f8eSopenharmony_ci * @param { number } [start] - index to start filling the array at. If start is negative, it is treated as 289961847f8eSopenharmony_ci * length+start where length is the length of the array. 290061847f8eSopenharmony_ci * @param { number } [end] - index to stop filling the array at. If end is negative, it is treated as 290161847f8eSopenharmony_ci * length+end. 290261847f8eSopenharmony_ci * @returns { Int16Array } The array itself. 290361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 290461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The fill method cannot be bound. 290561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 290661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 290761847f8eSopenharmony_ci * @atomicservice 290861847f8eSopenharmony_ci * @since 12 290961847f8eSopenharmony_ci */ 291061847f8eSopenharmony_ci fill(value: number, start?: number, end?: number): Int16Array; 291161847f8eSopenharmony_ci /** 291261847f8eSopenharmony_ci * Returns the elements of an array that meet the condition specified in a callback function. 291361847f8eSopenharmony_ci * 291461847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Int16Array> } predicate - A function that accepts up to three arguments. 291561847f8eSopenharmony_ci * The filter method calls the predicate function one time for each element in the array. 291661847f8eSopenharmony_ci * @returns { Int16Array } The array itself. 291761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 291861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The filter method cannot be bound. 291961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 292061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 292161847f8eSopenharmony_ci * @atomicservice 292261847f8eSopenharmony_ci * @since 12 292361847f8eSopenharmony_ci */ 292461847f8eSopenharmony_ci filter(predicate: TypedArrayPredicateFn<number, Int16Array>): Int16Array; 292561847f8eSopenharmony_ci /** 292661847f8eSopenharmony_ci * Returns the value of the first element in the array where predicate is true, and undefined 292761847f8eSopenharmony_ci * otherwise. 292861847f8eSopenharmony_ci * 292961847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Int16Array> } predicate - find calls predicate once for each element of 293061847f8eSopenharmony_ci * the array, in ascending order, until it finds one where predicate returns true. 293161847f8eSopenharmony_ci * If such an element is found, find immediately returns that element value. Otherwise, find returns undefined. 293261847f8eSopenharmony_ci * @returns { number | undefined } The first element in the typed array 293361847f8eSopenharmony_ci * that satisfies the provided testing function. Otherwise, undefined is returned. 293461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 293561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The find method cannot be bound. 293661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 293761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 293861847f8eSopenharmony_ci * @atomicservice 293961847f8eSopenharmony_ci * @since 12 294061847f8eSopenharmony_ci */ 294161847f8eSopenharmony_ci find(predicate: TypedArrayPredicateFn<number, Int16Array>): number | undefined; 294261847f8eSopenharmony_ci /** 294361847f8eSopenharmony_ci * Returns the index of the first element in the array where predicate is true, and -1 294461847f8eSopenharmony_ci * otherwise. 294561847f8eSopenharmony_ci * 294661847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Int16Array> } predicate - find calls predicate once for each element of 294761847f8eSopenharmony_ci * the array, in ascending order, until it finds one where predicate returns true. If such an element is found, 294861847f8eSopenharmony_ci * findIndex immediately returns that element index. Otherwise, findIndex returns -1. 294961847f8eSopenharmony_ci * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1. 295061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 295161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The findIndex method cannot be bound. 295261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 295361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 295461847f8eSopenharmony_ci * @atomicservice 295561847f8eSopenharmony_ci * @since 12 295661847f8eSopenharmony_ci */ 295761847f8eSopenharmony_ci findIndex(predicate: TypedArrayPredicateFn<number, Int16Array>): number; 295861847f8eSopenharmony_ci /** 295961847f8eSopenharmony_ci * Performs the specified action for each element in an array. 296061847f8eSopenharmony_ci * 296161847f8eSopenharmony_ci * @param { TypedArrayForEachCallback<number, Int16Array> } callbackFn - A function that 296261847f8eSopenharmony_ci * accepts up to three arguments. 296361847f8eSopenharmony_ci * forEach calls the callbackfn function one time for each element in the array. 296461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 296561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The forEach method cannot be bound. 296661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 296761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 296861847f8eSopenharmony_ci * @atomicservice 296961847f8eSopenharmony_ci * @since 12 297061847f8eSopenharmony_ci */ 297161847f8eSopenharmony_ci forEach(callbackFn: TypedArrayForEachCallback<number, Int16Array>): void; 297261847f8eSopenharmony_ci /** 297361847f8eSopenharmony_ci * Returns the index of the first occurrence of a value in an array. 297461847f8eSopenharmony_ci * 297561847f8eSopenharmony_ci * @param { number } searchElement - The value to locate in the array. 297661847f8eSopenharmony_ci * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the 297761847f8eSopenharmony_ci * search starts at index 0. 297861847f8eSopenharmony_ci * @returns { number } The first index of searchElement in the typed array; -1 if not found. 297961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 298061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The indexOf method cannot be bound. 298161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 298261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 298361847f8eSopenharmony_ci * @atomicservice 298461847f8eSopenharmony_ci * @since 12 298561847f8eSopenharmony_ci */ 298661847f8eSopenharmony_ci indexOf(searchElement: number, fromIndex?: number): number; 298761847f8eSopenharmony_ci /** 298861847f8eSopenharmony_ci * Adds all the elements of an array separated by the specified separator string. 298961847f8eSopenharmony_ci * @param { string } [separator] - A string used to separate one element of an array from the next in the 299061847f8eSopenharmony_ci * resulting String. If omitted, the array elements are separated with a comma. 299161847f8eSopenharmony_ci * @returns { string } A string with all typed array elements joined. 299261847f8eSopenharmony_ci * If array.length is 0, the empty string is returned. 299361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 299461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The join method cannot be bound. 299561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 299661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 299761847f8eSopenharmony_ci * @atomicservice 299861847f8eSopenharmony_ci * @since 12 299961847f8eSopenharmony_ci */ 300061847f8eSopenharmony_ci join(separator?: string): string; 300161847f8eSopenharmony_ci /** 300261847f8eSopenharmony_ci * Calls a defined callback function on each element of an array, and returns an array that 300361847f8eSopenharmony_ci * contains the results. 300461847f8eSopenharmony_ci * 300561847f8eSopenharmony_ci * @param { TypedArrayMapCallback<number, Int16Array> } callbackFn - A function that 300661847f8eSopenharmony_ci * accepts up to three arguments. 300761847f8eSopenharmony_ci * The map method calls the callbackfn function one time for each element in the array. 300861847f8eSopenharmony_ci * @returns { Int16Array } The array itself. 300961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 301061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The map method cannot be bound. 301161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 301261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 301361847f8eSopenharmony_ci * @atomicservice 301461847f8eSopenharmony_ci * @since 12 301561847f8eSopenharmony_ci */ 301661847f8eSopenharmony_ci map(callbackFn: TypedArrayMapCallback<number, Int16Array>): Int16Array; 301761847f8eSopenharmony_ci /** 301861847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 301961847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 302061847f8eSopenharmony_ci * call to the callback function. 302161847f8eSopenharmony_ci * 302261847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<number, number, Int16Array> } callbackFn - A function that 302361847f8eSopenharmony_ci * accepts up to four arguments. 302461847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 302561847f8eSopenharmony_ci * @returns { number } The value that results from running the "reducer" callback function to 302661847f8eSopenharmony_ci * completion over the entire typed array. 302761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 302861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 302961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 303061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 303161847f8eSopenharmony_ci * @atomicservice 303261847f8eSopenharmony_ci * @since 12 303361847f8eSopenharmony_ci */ 303461847f8eSopenharmony_ci reduce(callbackFn: TypedArrayReduceCallback<number, number, Int16Array>): number; 303561847f8eSopenharmony_ci /** 303661847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 303761847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 303861847f8eSopenharmony_ci * call to the callback function. 303961847f8eSopenharmony_ci * 304061847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<number, number, Int16Array> } callbackFn - A function that 304161847f8eSopenharmony_ci * accepts up to four arguments. 304261847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 304361847f8eSopenharmony_ci * @param { number } initialValue - If initialValue is specified, it is used as the initial value to start 304461847f8eSopenharmony_ci * the accumulation. The first call to the callbackfn function provides this value as an argument 304561847f8eSopenharmony_ci * instead of an array value. 304661847f8eSopenharmony_ci * @returns { number } The value that results from running the "reducer" callback function to 304761847f8eSopenharmony_ci * completion over the entire typed array. 304861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 304961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 305061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 305161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 305261847f8eSopenharmony_ci * @atomicservice 305361847f8eSopenharmony_ci * @since 12 305461847f8eSopenharmony_ci */ 305561847f8eSopenharmony_ci reduce(callbackFn: TypedArrayReduceCallback<number, number, Int16Array>, initialValue: number): number; 305661847f8eSopenharmony_ci /** 305761847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 305861847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 305961847f8eSopenharmony_ci * call to the callback function. 306061847f8eSopenharmony_ci * 306161847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<U, number, Int16Array> } callbackFn - A function that 306261847f8eSopenharmony_ci * accepts up to four arguments. 306361847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 306461847f8eSopenharmony_ci * @param { U } initialValue - If initialValue is specified, it is used as the initial value to start 306561847f8eSopenharmony_ci * the accumulation. The first call to the callbackfn function provides this value as an argument 306661847f8eSopenharmony_ci * instead of an array value. 306761847f8eSopenharmony_ci * @returns { U } The value that results from running the "reducer" callback function to 306861847f8eSopenharmony_ci * completion over the entire typed array. 306961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 307061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 307161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 307261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 307361847f8eSopenharmony_ci * @atomicservice 307461847f8eSopenharmony_ci * @since 12 307561847f8eSopenharmony_ci */ 307661847f8eSopenharmony_ci reduce<U>(callbackFn: TypedArrayReduceCallback<U, number, Int16Array>, initialValue: U): U; 307761847f8eSopenharmony_ci /** 307861847f8eSopenharmony_ci * Reverses the elements in an Array. 307961847f8eSopenharmony_ci * 308061847f8eSopenharmony_ci * @returns { Int16Array } The reference to the original typed array, now reversed. 308161847f8eSopenharmony_ci * <br>Note that the typed array is reversed in place, and no copy is made. 308261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reverse method cannot be bound. 308361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 308461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 308561847f8eSopenharmony_ci * @atomicservice 308661847f8eSopenharmony_ci * @since 12 308761847f8eSopenharmony_ci */ 308861847f8eSopenharmony_ci reverse(): Int16Array; 308961847f8eSopenharmony_ci /** 309061847f8eSopenharmony_ci * Sets a value or an array of values. 309161847f8eSopenharmony_ci * 309261847f8eSopenharmony_ci * @param { ArrayLike<number> } array - A typed or untyped array of values to set. 309361847f8eSopenharmony_ci * @param { number } [offset] - The index in the current array at which the values are to be written. 309461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 309561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The set method cannot be bound. 309661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 309761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 309861847f8eSopenharmony_ci * @atomicservice 309961847f8eSopenharmony_ci * @since 12 310061847f8eSopenharmony_ci */ 310161847f8eSopenharmony_ci set(array: ArrayLike<number>, offset?: number): void; 310261847f8eSopenharmony_ci /** 310361847f8eSopenharmony_ci * Returns a section of an array. 310461847f8eSopenharmony_ci * 310561847f8eSopenharmony_ci * @param { number } [start] - The beginning of the specified portion of the array. 310661847f8eSopenharmony_ci * @param { number } [end] - The end of the specified portion of the array. 310761847f8eSopenharmony_ci * This is exclusive of the element at the index 'end'. 310861847f8eSopenharmony_ci * @returns { Int16Array } A new typed array containing the extracted elements. 310961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 311061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The slice method cannot be bound. 311161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 311261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 311361847f8eSopenharmony_ci * @atomicservice 311461847f8eSopenharmony_ci * @since 12 311561847f8eSopenharmony_ci */ 311661847f8eSopenharmony_ci slice(start?: number, end?: number): Int16Array; 311761847f8eSopenharmony_ci /** 311861847f8eSopenharmony_ci * Determines whether the specified callback function returns true for any element of an array. 311961847f8eSopenharmony_ci * 312061847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Int16Array> } predicate - A function that accepts up to three arguments. 312161847f8eSopenharmony_ci * The some method calls the predicate function for each element in the array until 312261847f8eSopenharmony_ci * the predicate returns a value which is coercible to the Boolean value true, or until the end of the array. 312361847f8eSopenharmony_ci * @returns { boolean } false unless predicate returns a truthy value for a typed array element, 312461847f8eSopenharmony_ci * in which case true is immediately returned. 312561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 312661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The some method cannot be bound. 312761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 312861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 312961847f8eSopenharmony_ci * @atomicservice 313061847f8eSopenharmony_ci * @since 12 313161847f8eSopenharmony_ci */ 313261847f8eSopenharmony_ci some(predicate: TypedArrayPredicateFn<number, Int16Array>): boolean; 313361847f8eSopenharmony_ci /** 313461847f8eSopenharmony_ci * Sorts an array. 313561847f8eSopenharmony_ci * 313661847f8eSopenharmony_ci * @param { TypedArrayCompareFn<number> } [compareFn] - Function used to determine the order of the elements. 313761847f8eSopenharmony_ci * It is expected to return a negative value if first argument is less than second argument, 313861847f8eSopenharmony_ci * zero if they're equal and a positive value otherwise. 313961847f8eSopenharmony_ci * If omitted, the elements are sorted in ascending, ASCII character order. 314061847f8eSopenharmony_ci * @returns { Int16Array } The reference to the original typed array, now sorted. 314161847f8eSopenharmony_ci * Note that the typed array is sorted in place and no copy is made. 314261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 314361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The sort method cannot be bound. 314461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 314561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 314661847f8eSopenharmony_ci * @atomicservice 314761847f8eSopenharmony_ci * @since 12 314861847f8eSopenharmony_ci */ 314961847f8eSopenharmony_ci sort(compareFn?: TypedArrayCompareFn<number>): Int16Array; 315061847f8eSopenharmony_ci /** 315161847f8eSopenharmony_ci * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements 315261847f8eSopenharmony_ci * at begin, inclusive, up to end, exclusive. 315361847f8eSopenharmony_ci * 315461847f8eSopenharmony_ci * @param { number } [begin] - The index of the beginning of the array. 315561847f8eSopenharmony_ci * @param { number } [end] - The index of the end of the array. 315661847f8eSopenharmony_ci * @returns { Int16Array } A new Int16Array object. 315761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 315861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The subarray method cannot be bound. 315961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 316061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 316161847f8eSopenharmony_ci * @atomicservice 316261847f8eSopenharmony_ci * @since 12 316361847f8eSopenharmony_ci */ 316461847f8eSopenharmony_ci subarray(begin?: number, end?: number): Int16Array; 316561847f8eSopenharmony_ci /** 316661847f8eSopenharmony_ci * Returns the item located at the specified index. 316761847f8eSopenharmony_ci * 316861847f8eSopenharmony_ci * @param { number } index - The zero-based index of the desired code unit.<br/> 316961847f8eSopenharmony_ci * A negative index will count back from the last item. 317061847f8eSopenharmony_ci * @returns { number | undefined } The element in the array matching the given index.<br/> 317161847f8eSopenharmony_ci * Always returns undefined if index < -array.length or 317261847f8eSopenharmony_ci * index >= array.length without attempting to access the corresponding property. 317361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 317461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The at method cannot be bound. 317561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 317661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 317761847f8eSopenharmony_ci * @atomicservice 317861847f8eSopenharmony_ci * @since 12 317961847f8eSopenharmony_ci */ 318061847f8eSopenharmony_ci at(index: number): number | undefined; 318161847f8eSopenharmony_ci /** 318261847f8eSopenharmony_ci * Returns an iterator that iterates over numbers. 318361847f8eSopenharmony_ci * 318461847f8eSopenharmony_ci * @returns { IterableIterator<number> } Iterator object that yields numbers. 318561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. 318661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 318761847f8eSopenharmony_ci * @atomicservice 318861847f8eSopenharmony_ci * @since 12 318961847f8eSopenharmony_ci */ 319061847f8eSopenharmony_ci [Symbol.iterator](): IterableIterator<number>; 319161847f8eSopenharmony_ci /** 319261847f8eSopenharmony_ci * Returns an iterable of key, value pairs for every entry in the array 319361847f8eSopenharmony_ci * 319461847f8eSopenharmony_ci * @returns { IterableIterator<[number, number]> } A new iterable iterator object. 319561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 319661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 319761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 319861847f8eSopenharmony_ci * @atomicservice 319961847f8eSopenharmony_ci * @since 12 320061847f8eSopenharmony_ci */ 320161847f8eSopenharmony_ci entries(): IterableIterator<[number, number]>; 320261847f8eSopenharmony_ci /** 320361847f8eSopenharmony_ci * Returns an iterable of keys in the array 320461847f8eSopenharmony_ci * 320561847f8eSopenharmony_ci * @returns { IterableIterator<number> } A new iterable iterator object. 320661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 320761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 320861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 320961847f8eSopenharmony_ci * @atomicservice 321061847f8eSopenharmony_ci * @since 12 321161847f8eSopenharmony_ci */ 321261847f8eSopenharmony_ci keys(): IterableIterator<number>; 321361847f8eSopenharmony_ci /** 321461847f8eSopenharmony_ci * Returns an iterable of values in the array 321561847f8eSopenharmony_ci * 321661847f8eSopenharmony_ci * @returns { IterableIterator<number> } A new iterable iterator object. 321761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 321861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 321961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 322061847f8eSopenharmony_ci * @atomicservice 322161847f8eSopenharmony_ci * @since 12 322261847f8eSopenharmony_ci */ 322361847f8eSopenharmony_ci values(): IterableIterator<number>; 322461847f8eSopenharmony_ci /** 322561847f8eSopenharmony_ci * Determines whether an array includes a certain element, returning true or false as appropriate. 322661847f8eSopenharmony_ci * 322761847f8eSopenharmony_ci * @param { number } searchElement - The element to search for. 322861847f8eSopenharmony_ci * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement. 322961847f8eSopenharmony_ci * @returns { boolean } A boolean value which is true if the value searchElement is found <br/> 323061847f8eSopenharmony_ci * within the typed array (or the part of the typed array indicated by the index fromIndex, if specified). 323161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 323261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The at method cannot be bound. 323361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 323461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 323561847f8eSopenharmony_ci * @atomicservice 323661847f8eSopenharmony_ci * @since 12 323761847f8eSopenharmony_ci */ 323861847f8eSopenharmony_ci includes(searchElement: number, fromIndex?: number): boolean; 323961847f8eSopenharmony_ci /** 324061847f8eSopenharmony_ci * Returns the item at that index. 324161847f8eSopenharmony_ci * 324261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 324361847f8eSopenharmony_ci * @atomicservice 324461847f8eSopenharmony_ci * @since 12 324561847f8eSopenharmony_ci */ 324661847f8eSopenharmony_ci [index: number]: number; 324761847f8eSopenharmony_ci } 324861847f8eSopenharmony_ci 324961847f8eSopenharmony_ci /** 325061847f8eSopenharmony_ci * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. 325161847f8eSopenharmony_ci * If multiple threads access a Uint16Array instance concurrently, 325261847f8eSopenharmony_ci * and at least one of the threads modifies the array structurally, 325361847f8eSopenharmony_ci * it must be synchronized externally. 325461847f8eSopenharmony_ci * 325561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 325661847f8eSopenharmony_ci * @atomicservice 325761847f8eSopenharmony_ci * @since 12 325861847f8eSopenharmony_ci */ 325961847f8eSopenharmony_ci @Sendable 326061847f8eSopenharmony_ci class Uint16Array { 326161847f8eSopenharmony_ci /** 326261847f8eSopenharmony_ci * The size in bytes of each element in the array. 326361847f8eSopenharmony_ci * 326461847f8eSopenharmony_ci * @type { number } 326561847f8eSopenharmony_ci * @readonly 326661847f8eSopenharmony_ci * @static 326761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 326861847f8eSopenharmony_ci * @atomicservice 326961847f8eSopenharmony_ci * @since 12 327061847f8eSopenharmony_ci */ 327161847f8eSopenharmony_ci static readonly BYTES_PER_ELEMENT: number; 327261847f8eSopenharmony_ci /** 327361847f8eSopenharmony_ci * The ArrayBuffer instance referenced by the array. 327461847f8eSopenharmony_ci * 327561847f8eSopenharmony_ci * @type { ArrayBuffer } 327661847f8eSopenharmony_ci * @readonly 327761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 327861847f8eSopenharmony_ci * @atomicservice 327961847f8eSopenharmony_ci * @since 12 328061847f8eSopenharmony_ci */ 328161847f8eSopenharmony_ci readonly buffer: ArrayBuffer; 328261847f8eSopenharmony_ci /** 328361847f8eSopenharmony_ci * The length in bytes of the array. 328461847f8eSopenharmony_ci * 328561847f8eSopenharmony_ci * @type { number } 328661847f8eSopenharmony_ci * @readonly 328761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 328861847f8eSopenharmony_ci * @atomicservice 328961847f8eSopenharmony_ci * @since 12 329061847f8eSopenharmony_ci */ 329161847f8eSopenharmony_ci readonly byteLength: number; 329261847f8eSopenharmony_ci /** 329361847f8eSopenharmony_ci * The offset in bytes of the array. 329461847f8eSopenharmony_ci * 329561847f8eSopenharmony_ci * @type { number } 329661847f8eSopenharmony_ci * @readonly 329761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 329861847f8eSopenharmony_ci * @atomicservice 329961847f8eSopenharmony_ci * @since 12 330061847f8eSopenharmony_ci */ 330161847f8eSopenharmony_ci readonly byteOffset: number; 330261847f8eSopenharmony_ci /** 330361847f8eSopenharmony_ci * The length of the array. 330461847f8eSopenharmony_ci * 330561847f8eSopenharmony_ci * @type { number } 330661847f8eSopenharmony_ci * @readonly 330761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 330861847f8eSopenharmony_ci * @atomicservice 330961847f8eSopenharmony_ci * @since 12 331061847f8eSopenharmony_ci */ 331161847f8eSopenharmony_ci readonly length: number; 331261847f8eSopenharmony_ci /** 331361847f8eSopenharmony_ci * A constructor used to create an Uint16Array. 331461847f8eSopenharmony_ci * 331561847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Uint16Array's constructor cannot be directly invoked. 331661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 331761847f8eSopenharmony_ci * @atomicservice 331861847f8eSopenharmony_ci * @since 12 331961847f8eSopenharmony_ci */ 332061847f8eSopenharmony_ci constructor(); 332161847f8eSopenharmony_ci /** 332261847f8eSopenharmony_ci * A constructor used to create an Uint16Array. 332361847f8eSopenharmony_ci * 332461847f8eSopenharmony_ci * @param { number } length - The length of the array 332561847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Uint16Array's constructor cannot be directly invoked. 332661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 332761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 332861847f8eSopenharmony_ci * @atomicservice 332961847f8eSopenharmony_ci * @since 12 333061847f8eSopenharmony_ci */ 333161847f8eSopenharmony_ci constructor(length: number); 333261847f8eSopenharmony_ci /** 333361847f8eSopenharmony_ci * A constructor used to create an Uint16Array. 333461847f8eSopenharmony_ci * 333561847f8eSopenharmony_ci * @param { Iterable<number> } elements - An iterable object to convert to an Uint16Array. 333661847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Uint16Array's constructor cannot be directly invoked. 333761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 333861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 333961847f8eSopenharmony_ci * @atomicservice 334061847f8eSopenharmony_ci * @since 12 334161847f8eSopenharmony_ci */ 334261847f8eSopenharmony_ci constructor(elements: Iterable<number>); 334361847f8eSopenharmony_ci /** 334461847f8eSopenharmony_ci * A constructor used to create an Uint16Array. 334561847f8eSopenharmony_ci * 334661847f8eSopenharmony_ci * @param { ArrayLike<number> | ArrayBuffer } array - An array is initialized with the given elements 334761847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Uint16Array's constructor cannot be directly invoked. 334861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 334961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 335061847f8eSopenharmony_ci * @atomicservice 335161847f8eSopenharmony_ci * @since 12 335261847f8eSopenharmony_ci */ 335361847f8eSopenharmony_ci constructor(array: ArrayLike<number> | ArrayBuffer); 335461847f8eSopenharmony_ci /** 335561847f8eSopenharmony_ci * A constructor used to create an Uint16Array. 335661847f8eSopenharmony_ci * 335761847f8eSopenharmony_ci * @param { ArrayBuffer } buffer - An array is initialized with the given elements 335861847f8eSopenharmony_ci * @param { number } [byteOffset] - The byteOffset (in bytes) parameter specifies the memory range 335961847f8eSopenharmony_ci * that will be exposed by the typed array view. 336061847f8eSopenharmony_ci * @param { number } [length] - The length parameter specifies the memory range 336161847f8eSopenharmony_ci * that will be exposed by the typed array view. 336261847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Uint16Array's constructor cannot be directly invoked. 336361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 336461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 336561847f8eSopenharmony_ci * @atomicservice 336661847f8eSopenharmony_ci * @since 12 336761847f8eSopenharmony_ci */ 336861847f8eSopenharmony_ci constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number); 336961847f8eSopenharmony_ci /** 337061847f8eSopenharmony_ci * Creates an Uint16Array from an array-like object. 337161847f8eSopenharmony_ci * 337261847f8eSopenharmony_ci * @param { ArrayLike<number> } arrayLike - An array-like object to convert to an Uint16Array. 337361847f8eSopenharmony_ci * @returns { Uint16Array } A new Uint16Array instance 337461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 337561847f8eSopenharmony_ci * @static 337661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 337761847f8eSopenharmony_ci * @atomicservice 337861847f8eSopenharmony_ci * @since 12 337961847f8eSopenharmony_ci */ 338061847f8eSopenharmony_ci static from(arrayLike: ArrayLike<number>): Uint16Array; 338161847f8eSopenharmony_ci /** 338261847f8eSopenharmony_ci * Creates an Uint16Array from an array-like object. 338361847f8eSopenharmony_ci * 338461847f8eSopenharmony_ci * @param { ArrayLike<T> } arrayLike - An array-like object to convert to an Uint16Array. 338561847f8eSopenharmony_ci * @param { TypedArrayFromMapFn<T, number> } mapFn - A mapping function to call on every element of the array. 338661847f8eSopenharmony_ci * @returns { Uint16Array } A new Uint16Array instance 338761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 338861847f8eSopenharmony_ci * @static 338961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 339061847f8eSopenharmony_ci * @atomicservice 339161847f8eSopenharmony_ci * @since 12 339261847f8eSopenharmony_ci */ 339361847f8eSopenharmony_ci static from<T>(arrayLike: ArrayLike<T>, mapFn: TypedArrayFromMapFn<T, number>): Uint16Array; 339461847f8eSopenharmony_ci /** 339561847f8eSopenharmony_ci * Creates an Uint16Array from an iterable object. 339661847f8eSopenharmony_ci * 339761847f8eSopenharmony_ci * @param { Iterable<number> } arrayLike - An iterable object to convert to an Uint16Array. 339861847f8eSopenharmony_ci * @param { TypedArrayFromMapFn<number, number> } [mapFn] - A mapping function to 339961847f8eSopenharmony_ci * call on every element of the array. 340061847f8eSopenharmony_ci * @returns { Uint16Array } A new Uint16Array instance 340161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 340261847f8eSopenharmony_ci * @static 340361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 340461847f8eSopenharmony_ci * @atomicservice 340561847f8eSopenharmony_ci * @since 12 340661847f8eSopenharmony_ci */ 340761847f8eSopenharmony_ci static from(arrayLike: Iterable<number>, mapFn?: TypedArrayFromMapFn<number, number>): Uint16Array; 340861847f8eSopenharmony_ci /** 340961847f8eSopenharmony_ci * Returns the this object after copying a section of the array identified by start and end 341061847f8eSopenharmony_ci * to the same array starting at position target. 341161847f8eSopenharmony_ci * 341261847f8eSopenharmony_ci * @param { number } target - If target is negative, it is treated as length+target where length is the 341361847f8eSopenharmony_ci * length of the array. 341461847f8eSopenharmony_ci * @param { number } start - If start is negative, it is treated as length+start. If end is negative, it 341561847f8eSopenharmony_ci * is treated as length+end. 341661847f8eSopenharmony_ci * @param { number } [end] - If not specified, length of the this object is used as its default value. 341761847f8eSopenharmony_ci * @returns { Uint16Array } The array itself. 341861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 341961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound. 342061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 342161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 342261847f8eSopenharmony_ci * @atomicservice 342361847f8eSopenharmony_ci * @since 12 342461847f8eSopenharmony_ci */ 342561847f8eSopenharmony_ci copyWithin(target: number, start: number, end?: number): Uint16Array; 342661847f8eSopenharmony_ci /** 342761847f8eSopenharmony_ci * Determines whether all the members of an array satisfy the specified test. 342861847f8eSopenharmony_ci * 342961847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Uint16Array> } predicate - A function that accepts up to three arguments. 343061847f8eSopenharmony_ci * The every method calls the predicate function for each element in the array until 343161847f8eSopenharmony_ci * the predicate returns a value which is coercible to the Boolean value false, or until the end of the array. 343261847f8eSopenharmony_ci * @returns { boolean } true unless predicate returns a false value for a typed array element, 343361847f8eSopenharmony_ci * in which case false is immediately returned. 343461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 343561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The every method cannot be bound. 343661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 343761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 343861847f8eSopenharmony_ci * @atomicservice 343961847f8eSopenharmony_ci * @since 12 344061847f8eSopenharmony_ci */ 344161847f8eSopenharmony_ci every(predicate: TypedArrayPredicateFn<number, Uint16Array>): boolean; 344261847f8eSopenharmony_ci /** 344361847f8eSopenharmony_ci * Returns the this object after filling the section identified by start and end with value. 344461847f8eSopenharmony_ci * 344561847f8eSopenharmony_ci * @param { number } value - value to fill array section with. 344661847f8eSopenharmony_ci * @param { number } [start] - index to start filling the array at. If start is negative, it is treated as 344761847f8eSopenharmony_ci * length+start where length is the length of the array. 344861847f8eSopenharmony_ci * @param { number } [end] - index to stop filling the array at. If end is negative, it is treated as 344961847f8eSopenharmony_ci * length+end. 345061847f8eSopenharmony_ci * @returns { Uint16Array } The array itself. 345161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 345261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The fill method cannot be bound. 345361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 345461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 345561847f8eSopenharmony_ci * @atomicservice 345661847f8eSopenharmony_ci * @since 12 345761847f8eSopenharmony_ci */ 345861847f8eSopenharmony_ci fill(value: number, start?: number, end?: number): Uint16Array; 345961847f8eSopenharmony_ci /** 346061847f8eSopenharmony_ci * Returns the elements of an array that meet the condition specified in a callback function. 346161847f8eSopenharmony_ci * 346261847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Uint16Array> } predicate - A function that accepts up to three arguments. 346361847f8eSopenharmony_ci * The filter method calls the predicate function one time for each element in the array. 346461847f8eSopenharmony_ci * @returns { Uint16Array } The array itself. 346561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 346661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The filter method cannot be bound. 346761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 346861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 346961847f8eSopenharmony_ci * @atomicservice 347061847f8eSopenharmony_ci * @since 12 347161847f8eSopenharmony_ci */ 347261847f8eSopenharmony_ci filter(predicate: TypedArrayPredicateFn<number, Uint16Array>): Uint16Array; 347361847f8eSopenharmony_ci /** 347461847f8eSopenharmony_ci * Returns the value of the first element in the array where predicate is true, and undefined 347561847f8eSopenharmony_ci * otherwise. 347661847f8eSopenharmony_ci * 347761847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Uint16Array> } predicate - find calls predicate once for each element of 347861847f8eSopenharmony_ci * the array, in ascending order, until it finds one where predicate returns true. 347961847f8eSopenharmony_ci * If such an element is found, find immediately returns that element value. Otherwise, find returns undefined. 348061847f8eSopenharmony_ci * @returns { number | undefined } The first element in the typed array 348161847f8eSopenharmony_ci * that satisfies the provided testing function. Otherwise, undefined is returned. 348261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 348361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The find method cannot be bound. 348461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 348561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 348661847f8eSopenharmony_ci * @atomicservice 348761847f8eSopenharmony_ci * @since 12 348861847f8eSopenharmony_ci */ 348961847f8eSopenharmony_ci find(predicate: TypedArrayPredicateFn<number, Uint16Array>): number | undefined; 349061847f8eSopenharmony_ci /** 349161847f8eSopenharmony_ci * Returns the index of the first element in the array where predicate is true, and -1 349261847f8eSopenharmony_ci * otherwise. 349361847f8eSopenharmony_ci * 349461847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Uint16Array> } predicate - find calls predicate once for each element of 349561847f8eSopenharmony_ci * the array, in ascending order, until it finds one where predicate returns true. If such an element is found, 349661847f8eSopenharmony_ci * findIndex immediately returns that element index. Otherwise, findIndex returns -1. 349761847f8eSopenharmony_ci * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1. 349861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 349961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The findIndex method cannot be bound. 350061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 350161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 350261847f8eSopenharmony_ci * @atomicservice 350361847f8eSopenharmony_ci * @since 12 350461847f8eSopenharmony_ci */ 350561847f8eSopenharmony_ci findIndex(predicate: TypedArrayPredicateFn<number, Uint16Array>): number; 350661847f8eSopenharmony_ci /** 350761847f8eSopenharmony_ci * Performs the specified action for each element in an array. 350861847f8eSopenharmony_ci * 350961847f8eSopenharmony_ci * @param { TypedArrayForEachCallback<number, Uint16Array> } callbackFn - A function that 351061847f8eSopenharmony_ci * accepts up to three arguments. 351161847f8eSopenharmony_ci * forEach calls the callbackfn function one time for each element in the array. 351261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 351361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The forEach method cannot be bound. 351461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 351561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 351661847f8eSopenharmony_ci * @atomicservice 351761847f8eSopenharmony_ci * @since 12 351861847f8eSopenharmony_ci */ 351961847f8eSopenharmony_ci forEach(callbackFn: TypedArrayForEachCallback<number, Uint16Array>): void; 352061847f8eSopenharmony_ci /** 352161847f8eSopenharmony_ci * Returns the index of the first occurrence of a value in an array. 352261847f8eSopenharmony_ci * 352361847f8eSopenharmony_ci * @param { number } searchElement - The value to locate in the array. 352461847f8eSopenharmony_ci * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the 352561847f8eSopenharmony_ci * search starts at index 0. 352661847f8eSopenharmony_ci * @returns { number } The first index of searchElement in the typed array; -1 if not found. 352761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 352861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The indexOf method cannot be bound. 352961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 353061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 353161847f8eSopenharmony_ci * @atomicservice 353261847f8eSopenharmony_ci * @since 12 353361847f8eSopenharmony_ci */ 353461847f8eSopenharmony_ci indexOf(searchElement: number, fromIndex?: number): number; 353561847f8eSopenharmony_ci /** 353661847f8eSopenharmony_ci * Adds all the elements of an array separated by the specified separator string. 353761847f8eSopenharmony_ci * @param { string } [separator] - A string used to separate one element of an array from the next in the 353861847f8eSopenharmony_ci * resulting String. If omitted, the array elements are separated with a comma. 353961847f8eSopenharmony_ci * @returns { string } A string with all typed array elements joined. 354061847f8eSopenharmony_ci * If array.length is 0, the empty string is returned. 354161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 354261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The join method cannot be bound. 354361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 354461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 354561847f8eSopenharmony_ci * @atomicservice 354661847f8eSopenharmony_ci * @since 12 354761847f8eSopenharmony_ci */ 354861847f8eSopenharmony_ci join(separator?: string): string; 354961847f8eSopenharmony_ci /** 355061847f8eSopenharmony_ci * Calls a defined callback function on each element of an array, and returns an array that 355161847f8eSopenharmony_ci * contains the results. 355261847f8eSopenharmony_ci * 355361847f8eSopenharmony_ci * @param { TypedArrayMapCallback<number, Uint16Array> } callbackFn - A function that accepts up to 355461847f8eSopenharmony_ci * three arguments. The map method calls the callbackfn function one time for each element in the array. 355561847f8eSopenharmony_ci * @returns { Uint16Array } The array itself. 355661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 355761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The map method cannot be bound. 355861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 355961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 356061847f8eSopenharmony_ci * @atomicservice 356161847f8eSopenharmony_ci * @since 12 356261847f8eSopenharmony_ci */ 356361847f8eSopenharmony_ci map(callbackFn: TypedArrayMapCallback<number, Uint16Array>): Uint16Array; 356461847f8eSopenharmony_ci /** 356561847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 356661847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 356761847f8eSopenharmony_ci * call to the callback function. 356861847f8eSopenharmony_ci * 356961847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<number, number, Uint16Array> } callbackFn - A function that 357061847f8eSopenharmony_ci * accepts up to four arguments. 357161847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 357261847f8eSopenharmony_ci * @returns { number } The value that results from running the "reducer" callback function to 357361847f8eSopenharmony_ci * completion over the entire typed array. 357461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 357561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 357661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 357761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 357861847f8eSopenharmony_ci * @atomicservice 357961847f8eSopenharmony_ci * @since 12 358061847f8eSopenharmony_ci */ 358161847f8eSopenharmony_ci reduce(callbackFn: TypedArrayReduceCallback<number, number, Uint16Array>): number; 358261847f8eSopenharmony_ci /** 358361847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 358461847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 358561847f8eSopenharmony_ci * call to the callback function. 358661847f8eSopenharmony_ci * 358761847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<number, number, Uint16Array> } callbackFn - A function that 358861847f8eSopenharmony_ci * accepts up to four arguments. 358961847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 359061847f8eSopenharmony_ci * @param { number } initialValue - If initialValue is specified, it is used as the initial value to start 359161847f8eSopenharmony_ci * the accumulation. The first call to the callbackfn function provides this value as an argument 359261847f8eSopenharmony_ci * instead of an array value. 359361847f8eSopenharmony_ci * @returns { number } The value that results from running the "reducer" callback function to 359461847f8eSopenharmony_ci * completion over the entire typed array. 359561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 359661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 359761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 359861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 359961847f8eSopenharmony_ci * @atomicservice 360061847f8eSopenharmony_ci * @since 12 360161847f8eSopenharmony_ci */ 360261847f8eSopenharmony_ci reduce(callbackFn: TypedArrayReduceCallback<number, number, Uint16Array>, initialValue: number): number; 360361847f8eSopenharmony_ci /** 360461847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 360561847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 360661847f8eSopenharmony_ci * call to the callback function. 360761847f8eSopenharmony_ci * 360861847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<U, number, Uint16Array> } callbackFn - A function that 360961847f8eSopenharmony_ci * accepts up to four arguments. 361061847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 361161847f8eSopenharmony_ci * @param { U } initialValue - If initialValue is specified, it is used as the initial value to start 361261847f8eSopenharmony_ci * the accumulation. The first call to the callbackfn function provides this value as an argument 361361847f8eSopenharmony_ci * instead of an array value. 361461847f8eSopenharmony_ci * @returns { U } The value that results from running the "reducer" callback function to 361561847f8eSopenharmony_ci * completion over the entire typed array. 361661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 361761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 361861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 361961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 362061847f8eSopenharmony_ci * @atomicservice 362161847f8eSopenharmony_ci * @since 12 362261847f8eSopenharmony_ci */ 362361847f8eSopenharmony_ci reduce<U>(callbackFn: TypedArrayReduceCallback<U, number, Uint16Array>, initialValue: U): U; 362461847f8eSopenharmony_ci /** 362561847f8eSopenharmony_ci * Reverses the elements in an Array. 362661847f8eSopenharmony_ci * 362761847f8eSopenharmony_ci * @returns { Uint16Array } The reference to the original typed array, now reversed. 362861847f8eSopenharmony_ci * <br/>Note that the typed array is reversed in place, and no copy is made. 362961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reverse method cannot be bound. 363061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 363161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 363261847f8eSopenharmony_ci * @atomicservice 363361847f8eSopenharmony_ci * @since 12 363461847f8eSopenharmony_ci */ 363561847f8eSopenharmony_ci reverse(): Uint16Array; 363661847f8eSopenharmony_ci /** 363761847f8eSopenharmony_ci * Sets a value or an array of values. 363861847f8eSopenharmony_ci * 363961847f8eSopenharmony_ci * @param { ArrayLike<number> } array - A typed or untyped array of values to set. 364061847f8eSopenharmony_ci * @param { number } [offset] - The index in the current array at which the values are to be written. 364161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 364261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The set method cannot be bound. 364361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 364461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 364561847f8eSopenharmony_ci * @atomicservice 364661847f8eSopenharmony_ci * @since 12 364761847f8eSopenharmony_ci */ 364861847f8eSopenharmony_ci set(array: ArrayLike<number>, offset?: number): void; 364961847f8eSopenharmony_ci /** 365061847f8eSopenharmony_ci * Returns a section of an array. 365161847f8eSopenharmony_ci * 365261847f8eSopenharmony_ci * @param { number } [start] - The beginning of the specified portion of the array. 365361847f8eSopenharmony_ci * @param { number } [end] - The end of the specified portion of the array. 365461847f8eSopenharmony_ci * This is exclusive of the element at the index 'end'. 365561847f8eSopenharmony_ci * @returns { Uint16Array } A new typed array containing the extracted elements. 365661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 365761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The slice method cannot be bound. 365861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 365961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 366061847f8eSopenharmony_ci * @atomicservice 366161847f8eSopenharmony_ci * @since 12 366261847f8eSopenharmony_ci */ 366361847f8eSopenharmony_ci slice(start?: number, end?: number): Uint16Array; 366461847f8eSopenharmony_ci /** 366561847f8eSopenharmony_ci * Determines whether the specified callback function returns true for any element of an array. 366661847f8eSopenharmony_ci * 366761847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Uint16Array> } predicate - A function that accepts up to three arguments. 366861847f8eSopenharmony_ci * The some method calls the predicate function for each element in the array until 366961847f8eSopenharmony_ci * the predicate returns a value which is coercible to the Boolean value true, or until the end of the array. 367061847f8eSopenharmony_ci * @returns { boolean } false unless predicate returns a truthy value for a typed array element, 367161847f8eSopenharmony_ci * in which case true is immediately returned. 367261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 367361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The some method cannot be bound. 367461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 367561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 367661847f8eSopenharmony_ci * @atomicservice 367761847f8eSopenharmony_ci * @since 12 367861847f8eSopenharmony_ci */ 367961847f8eSopenharmony_ci some(predicate: TypedArrayPredicateFn<number, Uint16Array>): boolean; 368061847f8eSopenharmony_ci /** 368161847f8eSopenharmony_ci * Sorts an array. 368261847f8eSopenharmony_ci * 368361847f8eSopenharmony_ci * @param { TypedArrayCompareFn<number> } [compareFn] - Function used to determine the order of the elements. 368461847f8eSopenharmony_ci * It is expected to return a negative value if first argument is less than second argument, 368561847f8eSopenharmony_ci * zero if they're equal and a positive value otherwise. 368661847f8eSopenharmony_ci * If omitted, the elements are sorted in ascending, ASCII character order. 368761847f8eSopenharmony_ci * @returns { Uint16Array } The reference to the original typed array, now sorted. 368861847f8eSopenharmony_ci * Note that the typed array is sorted in place and no copy is made. 368961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 369061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The sort method cannot be bound. 369161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 369261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 369361847f8eSopenharmony_ci * @atomicservice 369461847f8eSopenharmony_ci * @since 12 369561847f8eSopenharmony_ci */ 369661847f8eSopenharmony_ci sort(compareFn?: TypedArrayCompareFn<number>): Uint16Array; 369761847f8eSopenharmony_ci /** 369861847f8eSopenharmony_ci * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements 369961847f8eSopenharmony_ci * at begin, inclusive, up to end, exclusive. 370061847f8eSopenharmony_ci * 370161847f8eSopenharmony_ci * @param { number } [begin] - The index of the beginning of the array. 370261847f8eSopenharmony_ci * @param { number } [end] - The index of the end of the array. 370361847f8eSopenharmony_ci * @returns { Uint16Array } A new Uint16Array object. 370461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 370561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The subarray method cannot be bound. 370661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 370761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 370861847f8eSopenharmony_ci * @atomicservice 370961847f8eSopenharmony_ci * @since 12 371061847f8eSopenharmony_ci */ 371161847f8eSopenharmony_ci subarray(begin?: number, end?: number): Uint16Array; 371261847f8eSopenharmony_ci /** 371361847f8eSopenharmony_ci * Returns the item located at the specified index. 371461847f8eSopenharmony_ci * 371561847f8eSopenharmony_ci * @param { number } index - The zero-based index of the desired code unit.<br/> 371661847f8eSopenharmony_ci * A negative index will count back from the last item. 371761847f8eSopenharmony_ci * @returns { number | undefined } The element in the array matching the given index.<br/> 371861847f8eSopenharmony_ci * Always returns undefined if index < -array.length or 371961847f8eSopenharmony_ci * index >= array.length without attempting to access the corresponding property. 372061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 372161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The at method cannot be bound. 372261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 372361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 372461847f8eSopenharmony_ci * @atomicservice 372561847f8eSopenharmony_ci * @since 12 372661847f8eSopenharmony_ci */ 372761847f8eSopenharmony_ci at(index: number): number | undefined; 372861847f8eSopenharmony_ci /** 372961847f8eSopenharmony_ci * Returns an iterator that iterates over numbers. 373061847f8eSopenharmony_ci * 373161847f8eSopenharmony_ci * @returns { IterableIterator<number> } Iterator object that yields numbers. 373261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. 373361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 373461847f8eSopenharmony_ci * @atomicservice 373561847f8eSopenharmony_ci * @since 12 373661847f8eSopenharmony_ci */ 373761847f8eSopenharmony_ci [Symbol.iterator](): IterableIterator<number>; 373861847f8eSopenharmony_ci /** 373961847f8eSopenharmony_ci * Returns an iterable of key, value pairs for every entry in the array 374061847f8eSopenharmony_ci * 374161847f8eSopenharmony_ci * @returns { IterableIterator<[number, number]> } A new iterable iterator object. 374261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 374361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 374461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 374561847f8eSopenharmony_ci * @atomicservice 374661847f8eSopenharmony_ci * @since 12 374761847f8eSopenharmony_ci */ 374861847f8eSopenharmony_ci entries(): IterableIterator<[number, number]>; 374961847f8eSopenharmony_ci /** 375061847f8eSopenharmony_ci * Returns an iterable of keys in the array 375161847f8eSopenharmony_ci * 375261847f8eSopenharmony_ci * @returns { IterableIterator<number> } A new iterable iterator object. 375361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 375461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 375561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 375661847f8eSopenharmony_ci * @atomicservice 375761847f8eSopenharmony_ci * @since 12 375861847f8eSopenharmony_ci */ 375961847f8eSopenharmony_ci keys(): IterableIterator<number>; 376061847f8eSopenharmony_ci /** 376161847f8eSopenharmony_ci * Returns an iterable of values in the array 376261847f8eSopenharmony_ci * 376361847f8eSopenharmony_ci * @returns { IterableIterator<number> } A new iterable iterator object. 376461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 376561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 376661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 376761847f8eSopenharmony_ci * @atomicservice 376861847f8eSopenharmony_ci * @since 12 376961847f8eSopenharmony_ci */ 377061847f8eSopenharmony_ci values(): IterableIterator<number>; 377161847f8eSopenharmony_ci /** 377261847f8eSopenharmony_ci * Determines whether an array includes a certain element, returning true or false as appropriate. 377361847f8eSopenharmony_ci * 377461847f8eSopenharmony_ci * @param { number } searchElement - The element to search for. 377561847f8eSopenharmony_ci * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement. 377661847f8eSopenharmony_ci * @returns { boolean } A boolean value which is true if the value searchElement is found <br/> 377761847f8eSopenharmony_ci * within the typed array (or the part of the typed array indicated by the index fromIndex, if specified). 377861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 377961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The at method cannot be bound. 378061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 378161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 378261847f8eSopenharmony_ci * @atomicservice 378361847f8eSopenharmony_ci * @since 12 378461847f8eSopenharmony_ci */ 378561847f8eSopenharmony_ci includes(searchElement: number, fromIndex?: number): boolean; 378661847f8eSopenharmony_ci /** 378761847f8eSopenharmony_ci * Returns the item at that index. 378861847f8eSopenharmony_ci * 378961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 379061847f8eSopenharmony_ci * @atomicservice 379161847f8eSopenharmony_ci * @since 12 379261847f8eSopenharmony_ci */ 379361847f8eSopenharmony_ci [index: number]: number; 379461847f8eSopenharmony_ci } 379561847f8eSopenharmony_ci 379661847f8eSopenharmony_ci /** 379761847f8eSopenharmony_ci * A typed array of 32-bit integer values. The contents are initialized to 0. 379861847f8eSopenharmony_ci * If multiple threads access a Int32Array instance concurrently, 379961847f8eSopenharmony_ci * and at least one of the threads modifies the array structurally, 380061847f8eSopenharmony_ci * it must be synchronized externally. 380161847f8eSopenharmony_ci * 380261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 380361847f8eSopenharmony_ci * @atomicservice 380461847f8eSopenharmony_ci * @since 12 380561847f8eSopenharmony_ci */ 380661847f8eSopenharmony_ci @Sendable 380761847f8eSopenharmony_ci class Int32Array { 380861847f8eSopenharmony_ci /** 380961847f8eSopenharmony_ci * The size in bytes of each element in the array. 381061847f8eSopenharmony_ci * 381161847f8eSopenharmony_ci * @type { number } 381261847f8eSopenharmony_ci * @readonly 381361847f8eSopenharmony_ci * @static 381461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 381561847f8eSopenharmony_ci * @atomicservice 381661847f8eSopenharmony_ci * @since 12 381761847f8eSopenharmony_ci */ 381861847f8eSopenharmony_ci static readonly BYTES_PER_ELEMENT: number; 381961847f8eSopenharmony_ci /** 382061847f8eSopenharmony_ci * The ArrayBuffer instance referenced by the array. 382161847f8eSopenharmony_ci * 382261847f8eSopenharmony_ci * @type { ArrayBuffer } 382361847f8eSopenharmony_ci * @readonly 382461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 382561847f8eSopenharmony_ci * @atomicservice 382661847f8eSopenharmony_ci * @since 12 382761847f8eSopenharmony_ci */ 382861847f8eSopenharmony_ci readonly buffer: ArrayBuffer; 382961847f8eSopenharmony_ci /** 383061847f8eSopenharmony_ci * The length in bytes of the array. 383161847f8eSopenharmony_ci * 383261847f8eSopenharmony_ci * @type { number } 383361847f8eSopenharmony_ci * @readonly 383461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 383561847f8eSopenharmony_ci * @atomicservice 383661847f8eSopenharmony_ci * @since 12 383761847f8eSopenharmony_ci */ 383861847f8eSopenharmony_ci readonly byteLength: number; 383961847f8eSopenharmony_ci /** 384061847f8eSopenharmony_ci * The offset in bytes of the array. 384161847f8eSopenharmony_ci * 384261847f8eSopenharmony_ci * @type { number } 384361847f8eSopenharmony_ci * @readonly 384461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 384561847f8eSopenharmony_ci * @atomicservice 384661847f8eSopenharmony_ci * @since 12 384761847f8eSopenharmony_ci */ 384861847f8eSopenharmony_ci readonly byteOffset: number; 384961847f8eSopenharmony_ci /** 385061847f8eSopenharmony_ci * The length of the array. 385161847f8eSopenharmony_ci * 385261847f8eSopenharmony_ci * @type { number } 385361847f8eSopenharmony_ci * @readonly 385461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 385561847f8eSopenharmony_ci * @atomicservice 385661847f8eSopenharmony_ci * @since 12 385761847f8eSopenharmony_ci */ 385861847f8eSopenharmony_ci readonly length: number; 385961847f8eSopenharmony_ci /** 386061847f8eSopenharmony_ci * A constructor used to create an Int32Array. 386161847f8eSopenharmony_ci * 386261847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Int32Array's constructor cannot be directly invoked. 386361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 386461847f8eSopenharmony_ci * @atomicservice 386561847f8eSopenharmony_ci * @since 12 386661847f8eSopenharmony_ci */ 386761847f8eSopenharmony_ci constructor(); 386861847f8eSopenharmony_ci /** 386961847f8eSopenharmony_ci * A constructor used to create an Int32Array. 387061847f8eSopenharmony_ci * 387161847f8eSopenharmony_ci * @param { number } length - The length of the array 387261847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Int32Array's constructor cannot be directly invoked. 387361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 387461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 387561847f8eSopenharmony_ci * @atomicservice 387661847f8eSopenharmony_ci * @since 12 387761847f8eSopenharmony_ci */ 387861847f8eSopenharmony_ci constructor(length: number); 387961847f8eSopenharmony_ci /** 388061847f8eSopenharmony_ci * A constructor used to create an Int32Array. 388161847f8eSopenharmony_ci * 388261847f8eSopenharmony_ci * @param { Iterable<number> } elements - An iterable object to convert to an Int32Array. 388361847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Int32Array's constructor cannot be directly invoked. 388461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 388561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 388661847f8eSopenharmony_ci * @atomicservice 388761847f8eSopenharmony_ci * @since 12 388861847f8eSopenharmony_ci */ 388961847f8eSopenharmony_ci constructor(elements: Iterable<number>); 389061847f8eSopenharmony_ci /** 389161847f8eSopenharmony_ci * A constructor used to create an Int32Array. 389261847f8eSopenharmony_ci * 389361847f8eSopenharmony_ci * @param { ArrayLike<number> | ArrayBuffer } array - An array is initialized with the given elements 389461847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Int32Array's constructor cannot be directly invoked. 389561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 389661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 389761847f8eSopenharmony_ci * @atomicservice 389861847f8eSopenharmony_ci * @since 12 389961847f8eSopenharmony_ci */ 390061847f8eSopenharmony_ci constructor(array: ArrayLike<number> | ArrayBuffer); 390161847f8eSopenharmony_ci /** 390261847f8eSopenharmony_ci * A constructor used to create an Int32Array. 390361847f8eSopenharmony_ci * 390461847f8eSopenharmony_ci * @param { ArrayBuffer } buffer - An array is initialized with the given elements 390561847f8eSopenharmony_ci * @param { number } [byteOffset] - The byteOffset (in bytes) parameter specifies the memory range 390661847f8eSopenharmony_ci * that will be exposed by the typed array view. 390761847f8eSopenharmony_ci * @param { number } [length] - The length parameter specifies the memory range 390861847f8eSopenharmony_ci * that will be exposed by the typed array view. 390961847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Int32Array's constructor cannot be directly invoked. 391061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 391161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 391261847f8eSopenharmony_ci * @atomicservice 391361847f8eSopenharmony_ci * @since 12 391461847f8eSopenharmony_ci */ 391561847f8eSopenharmony_ci constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number); 391661847f8eSopenharmony_ci /** 391761847f8eSopenharmony_ci * Creates an Int32Array from an array-like object. 391861847f8eSopenharmony_ci * 391961847f8eSopenharmony_ci * @param { ArrayLike<number> } arrayLike - An array-like object to convert to an Int32Array. 392061847f8eSopenharmony_ci * @returns { Int32Array } A new Int32Array instance 392161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 392261847f8eSopenharmony_ci * @static 392361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 392461847f8eSopenharmony_ci * @atomicservice 392561847f8eSopenharmony_ci * @since 12 392661847f8eSopenharmony_ci */ 392761847f8eSopenharmony_ci static from(arrayLike: ArrayLike<number>): Int32Array; 392861847f8eSopenharmony_ci /** 392961847f8eSopenharmony_ci * Creates an Int32Array from an array-like object. 393061847f8eSopenharmony_ci * 393161847f8eSopenharmony_ci * @param { ArrayLike<T> } arrayLike - An array-like object to convert to an Int32Array. 393261847f8eSopenharmony_ci * @param { TypedArrayFromMapFn<T, number> } mapFn - A mapping function to call on every element of the array. 393361847f8eSopenharmony_ci * @returns { Int32Array } A new Int32Array instance 393461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 393561847f8eSopenharmony_ci * @static 393661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 393761847f8eSopenharmony_ci * @atomicservice 393861847f8eSopenharmony_ci * @since 12 393961847f8eSopenharmony_ci */ 394061847f8eSopenharmony_ci static from<T>(arrayLike: ArrayLike<T>, mapFn: TypedArrayFromMapFn<T, number>): Int32Array; 394161847f8eSopenharmony_ci /** 394261847f8eSopenharmony_ci * Creates an Int32Array from an iterable object. 394361847f8eSopenharmony_ci * 394461847f8eSopenharmony_ci * @param { Iterable<number> } arrayLike - An iterable object to convert to an Int32Array. 394561847f8eSopenharmony_ci * @param { TypedArrayFromMapFn<number, number> } [mapFn] - A mapping function to 394661847f8eSopenharmony_ci * call on every element of the array. 394761847f8eSopenharmony_ci * @returns { Int32Array } A new Int32Array instance 394861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 394961847f8eSopenharmony_ci * @static 395061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 395161847f8eSopenharmony_ci * @atomicservice 395261847f8eSopenharmony_ci * @since 12 395361847f8eSopenharmony_ci */ 395461847f8eSopenharmony_ci static from(arrayLike: Iterable<number>, mapFn?: TypedArrayFromMapFn<number, number>): Int32Array; 395561847f8eSopenharmony_ci /** 395661847f8eSopenharmony_ci * Returns the this object after copying a section of the array identified by start and end 395761847f8eSopenharmony_ci * to the same array starting at position target. 395861847f8eSopenharmony_ci * 395961847f8eSopenharmony_ci * @param { number } target - If target is negative, it is treated as length+target where length is the 396061847f8eSopenharmony_ci * length of the array. 396161847f8eSopenharmony_ci * @param { number } start - If start is negative, it is treated as length+start. If end is negative, it 396261847f8eSopenharmony_ci * is treated as length+end. 396361847f8eSopenharmony_ci * @param { number } [end] - If not specified, length of the this object is used as its default value. 396461847f8eSopenharmony_ci * @returns { Int32Array } The array itself. 396561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 396661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound. 396761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 396861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 396961847f8eSopenharmony_ci * @atomicservice 397061847f8eSopenharmony_ci * @since 12 397161847f8eSopenharmony_ci */ 397261847f8eSopenharmony_ci copyWithin(target: number, start: number, end?: number): Int32Array; 397361847f8eSopenharmony_ci /** 397461847f8eSopenharmony_ci * Determines whether all the members of an array satisfy the specified test. 397561847f8eSopenharmony_ci * 397661847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Int32Array> } predicate - A function that accepts up to three arguments. 397761847f8eSopenharmony_ci * The every method calls the predicate function for each element in the array until 397861847f8eSopenharmony_ci * the predicate returns a value which is coercible to the Boolean value false, or until the end of the array. 397961847f8eSopenharmony_ci * @returns { boolean } true unless predicate returns a false value for a typed array element, 398061847f8eSopenharmony_ci * in which case false is immediately returned. 398161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 398261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The every method cannot be bound. 398361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 398461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 398561847f8eSopenharmony_ci * @atomicservice 398661847f8eSopenharmony_ci * @since 12 398761847f8eSopenharmony_ci */ 398861847f8eSopenharmony_ci every(predicate: TypedArrayPredicateFn<number, Int32Array>): boolean; 398961847f8eSopenharmony_ci /** 399061847f8eSopenharmony_ci * Returns the this object after filling the section identified by start and end with value. 399161847f8eSopenharmony_ci * 399261847f8eSopenharmony_ci * @param { number } value - value to fill array section with. 399361847f8eSopenharmony_ci * @param { number } [start] - index to start filling the array at. If start is negative, it is treated as 399461847f8eSopenharmony_ci * length+start where length is the length of the array. 399561847f8eSopenharmony_ci * @param { number } [end] - index to stop filling the array at. If end is negative, it is treated as 399661847f8eSopenharmony_ci * length+end. 399761847f8eSopenharmony_ci * @returns { Int32Array } The array itself. 399861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 399961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The fill method cannot be bound. 400061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 400161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 400261847f8eSopenharmony_ci * @atomicservice 400361847f8eSopenharmony_ci * @since 12 400461847f8eSopenharmony_ci */ 400561847f8eSopenharmony_ci fill(value: number, start?: number, end?: number): Int32Array; 400661847f8eSopenharmony_ci /** 400761847f8eSopenharmony_ci * Returns the elements of an array that meet the condition specified in a callback function. 400861847f8eSopenharmony_ci * 400961847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Int32Array> } predicate - A function that accepts up to three arguments. 401061847f8eSopenharmony_ci * The filter method calls the predicate function one time for each element in the array. 401161847f8eSopenharmony_ci * @returns { Int32Array } The array itself. 401261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 401361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The filter method cannot be bound. 401461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 401561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 401661847f8eSopenharmony_ci * @atomicservice 401761847f8eSopenharmony_ci * @since 12 401861847f8eSopenharmony_ci */ 401961847f8eSopenharmony_ci filter(predicate: TypedArrayPredicateFn<number, Int32Array>): Int32Array; 402061847f8eSopenharmony_ci /** 402161847f8eSopenharmony_ci * Returns the value of the first element in the array where predicate is true, and undefined 402261847f8eSopenharmony_ci * otherwise. 402361847f8eSopenharmony_ci * 402461847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Int32Array> } predicate - find calls predicate once for each element of 402561847f8eSopenharmony_ci * the array, in ascending order, until it finds one where predicate returns true. 402661847f8eSopenharmony_ci * If such an element is found, find immediately returns that element value. Otherwise, find returns undefined. 402761847f8eSopenharmony_ci * @returns { number | undefined } The first element in the typed array 402861847f8eSopenharmony_ci * that satisfies the provided testing function. Otherwise, undefined is returned. 402961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 403061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The find method cannot be bound. 403161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 403261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 403361847f8eSopenharmony_ci * @atomicservice 403461847f8eSopenharmony_ci * @since 12 403561847f8eSopenharmony_ci */ 403661847f8eSopenharmony_ci find(predicate: TypedArrayPredicateFn<number, Int32Array>): number | undefined; 403761847f8eSopenharmony_ci /** 403861847f8eSopenharmony_ci * Returns the index of the first element in the array where predicate is true, and -1 403961847f8eSopenharmony_ci * otherwise. 404061847f8eSopenharmony_ci * 404161847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Int32Array> } predicate - find calls predicate once for each element of 404261847f8eSopenharmony_ci * the array, in ascending order, until it finds one where predicate returns true. If such an element is found, 404361847f8eSopenharmony_ci * findIndex immediately returns that element index. Otherwise, findIndex returns -1. 404461847f8eSopenharmony_ci * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1. 404561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 404661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The findIndex method cannot be bound. 404761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 404861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 404961847f8eSopenharmony_ci * @atomicservice 405061847f8eSopenharmony_ci * @since 12 405161847f8eSopenharmony_ci */ 405261847f8eSopenharmony_ci findIndex(predicate: TypedArrayPredicateFn<number, Int32Array>): number; 405361847f8eSopenharmony_ci /** 405461847f8eSopenharmony_ci * Performs the specified action for each element in an array. 405561847f8eSopenharmony_ci * 405661847f8eSopenharmony_ci * @param { TypedArrayForEachCallback<number, Int32Array> } callbackFn - A function that 405761847f8eSopenharmony_ci * accepts up to three arguments. 405861847f8eSopenharmony_ci * forEach calls the callbackfn function one time for each element in the array. 405961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 406061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The forEach method cannot be bound. 406161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 406261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 406361847f8eSopenharmony_ci * @atomicservice 406461847f8eSopenharmony_ci * @since 12 406561847f8eSopenharmony_ci */ 406661847f8eSopenharmony_ci forEach(callbackFn: TypedArrayForEachCallback<number, Int32Array>): void; 406761847f8eSopenharmony_ci /** 406861847f8eSopenharmony_ci * Returns the index of the first occurrence of a value in an array. 406961847f8eSopenharmony_ci * 407061847f8eSopenharmony_ci * @param { number } searchElement - The value to locate in the array. 407161847f8eSopenharmony_ci * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the 407261847f8eSopenharmony_ci * search starts at index 0. 407361847f8eSopenharmony_ci * @returns { number } The first index of searchElement in the typed array; -1 if not found. 407461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 407561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The indexOf method cannot be bound. 407661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 407761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 407861847f8eSopenharmony_ci * @atomicservice 407961847f8eSopenharmony_ci * @since 12 408061847f8eSopenharmony_ci */ 408161847f8eSopenharmony_ci indexOf(searchElement: number, fromIndex?: number): number; 408261847f8eSopenharmony_ci /** 408361847f8eSopenharmony_ci * Adds all the elements of an array separated by the specified separator string. 408461847f8eSopenharmony_ci * @param { string } [separator] - A string used to separate one element of an array from the next in the 408561847f8eSopenharmony_ci * resulting String. If omitted, the array elements are separated with a comma. 408661847f8eSopenharmony_ci * @returns { string } A string with all typed array elements joined. 408761847f8eSopenharmony_ci * If array.length is 0, the empty string is returned. 408861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 408961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The join method cannot be bound. 409061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 409161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 409261847f8eSopenharmony_ci * @atomicservice 409361847f8eSopenharmony_ci * @since 12 409461847f8eSopenharmony_ci */ 409561847f8eSopenharmony_ci join(separator?: string): string; 409661847f8eSopenharmony_ci /** 409761847f8eSopenharmony_ci * Calls a defined callback function on each element of an array, and returns an array that 409861847f8eSopenharmony_ci * contains the results. 409961847f8eSopenharmony_ci * 410061847f8eSopenharmony_ci * @param { TypedArrayMapCallback<number, Int32Array> } callbackFn - A function that 410161847f8eSopenharmony_ci * accepts up to three arguments. 410261847f8eSopenharmony_ci * The map method calls the callbackfn function one time for each element in the array. 410361847f8eSopenharmony_ci * @returns { Int32Array } The array itself. 410461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 410561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The map method cannot be bound. 410661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 410761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 410861847f8eSopenharmony_ci * @atomicservice 410961847f8eSopenharmony_ci * @since 12 411061847f8eSopenharmony_ci */ 411161847f8eSopenharmony_ci map(callbackFn: TypedArrayMapCallback<number, Int32Array>): Int32Array; 411261847f8eSopenharmony_ci /** 411361847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 411461847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 411561847f8eSopenharmony_ci * call to the callback function. 411661847f8eSopenharmony_ci * 411761847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<number, number, Int32Array> } callbackFn - A function that 411861847f8eSopenharmony_ci * accepts up to four arguments. 411961847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 412061847f8eSopenharmony_ci * @returns { number } The value that results from running the "reducer" callback function to 412161847f8eSopenharmony_ci * completion over the entire typed array. 412261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 412361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 412461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 412561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 412661847f8eSopenharmony_ci * @atomicservice 412761847f8eSopenharmony_ci * @since 12 412861847f8eSopenharmony_ci */ 412961847f8eSopenharmony_ci reduce(callbackFn: TypedArrayReduceCallback<number, number, Int32Array>): number; 413061847f8eSopenharmony_ci /** 413161847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 413261847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 413361847f8eSopenharmony_ci * call to the callback function. 413461847f8eSopenharmony_ci * 413561847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<number, number, Int32Array> } callbackFn - A function that 413661847f8eSopenharmony_ci * accepts up to four arguments. 413761847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 413861847f8eSopenharmony_ci * @param { number } initialValue - If initialValue is specified, it is used as the initial value to start 413961847f8eSopenharmony_ci * the accumulation. The first call to the callbackfn function provides this value as an argument 414061847f8eSopenharmony_ci * instead of an array value. 414161847f8eSopenharmony_ci * @returns { number } The value that results from running the "reducer" callback function to 414261847f8eSopenharmony_ci * completion over the entire typed array. 414361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 414461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 414561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 414661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 414761847f8eSopenharmony_ci * @atomicservice 414861847f8eSopenharmony_ci * @since 12 414961847f8eSopenharmony_ci */ 415061847f8eSopenharmony_ci reduce(callbackFn: TypedArrayReduceCallback<number, number, Int32Array>, initialValue: number): number; 415161847f8eSopenharmony_ci /** 415261847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 415361847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 415461847f8eSopenharmony_ci * call to the callback function. 415561847f8eSopenharmony_ci * 415661847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<U, number, Int32Array> } callbackFn - A function that 415761847f8eSopenharmony_ci * accepts up to four arguments. 415861847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 415961847f8eSopenharmony_ci * @param { U } initialValue - If initialValue is specified, it is used as the initial value to start 416061847f8eSopenharmony_ci * the accumulation. The first call to the callbackfn function provides this value as an argument 416161847f8eSopenharmony_ci * instead of an array value. 416261847f8eSopenharmony_ci * @returns { U } The value that results from running the "reducer" callback function to 416361847f8eSopenharmony_ci * completion over the entire typed array. 416461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 416561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 416661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 416761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 416861847f8eSopenharmony_ci * @atomicservice 416961847f8eSopenharmony_ci * @since 12 417061847f8eSopenharmony_ci */ 417161847f8eSopenharmony_ci reduce<U>(callbackFn: TypedArrayReduceCallback<U, number, Int32Array>, initialValue: U): U; 417261847f8eSopenharmony_ci /** 417361847f8eSopenharmony_ci * Reverses the elements in an Array. 417461847f8eSopenharmony_ci * 417561847f8eSopenharmony_ci * @returns { Int32Array } The reference to the original typed array, now reversed. 417661847f8eSopenharmony_ci * <br/>Note that the typed array is reversed in place, and no copy is made. 417761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reverse method cannot be bound. 417861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 417961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 418061847f8eSopenharmony_ci * @atomicservice 418161847f8eSopenharmony_ci * @since 12 418261847f8eSopenharmony_ci */ 418361847f8eSopenharmony_ci reverse(): Int32Array; 418461847f8eSopenharmony_ci /** 418561847f8eSopenharmony_ci * Sets a value or an array of values. 418661847f8eSopenharmony_ci * 418761847f8eSopenharmony_ci * @param { ArrayLike<number> } array - A typed or untyped array of values to set. 418861847f8eSopenharmony_ci * @param { number } [offset] - The index in the current array at which the values are to be written. 418961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 419061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The set method cannot be bound. 419161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 419261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 419361847f8eSopenharmony_ci * @atomicservice 419461847f8eSopenharmony_ci * @since 12 419561847f8eSopenharmony_ci */ 419661847f8eSopenharmony_ci set(array: ArrayLike<number>, offset?: number): void; 419761847f8eSopenharmony_ci /** 419861847f8eSopenharmony_ci * Returns a section of an array. 419961847f8eSopenharmony_ci * 420061847f8eSopenharmony_ci * @param { number } [start] - The beginning of the specified portion of the array. 420161847f8eSopenharmony_ci * @param { number } [end] - The end of the specified portion of the array. 420261847f8eSopenharmony_ci * This is exclusive of the element at the index 'end'. 420361847f8eSopenharmony_ci * @returns { Int32Array } A new typed array containing the extracted elements. 420461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 420561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The slice method cannot be bound. 420661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 420761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 420861847f8eSopenharmony_ci * @atomicservice 420961847f8eSopenharmony_ci * @since 12 421061847f8eSopenharmony_ci */ 421161847f8eSopenharmony_ci slice(start?: number, end?: number): Int32Array; 421261847f8eSopenharmony_ci /** 421361847f8eSopenharmony_ci * Determines whether the specified callback function returns true for any element of an array. 421461847f8eSopenharmony_ci * 421561847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Int32Array> } predicate - A function that accepts up to three arguments. 421661847f8eSopenharmony_ci * The some method calls the predicate function for each element in the array until 421761847f8eSopenharmony_ci * the predicate returns a value which is coercible to the Boolean value true, or until the end of the array. 421861847f8eSopenharmony_ci * @returns { boolean } false unless predicate returns a truthy value for a typed array element, 421961847f8eSopenharmony_ci * in which case true is immediately returned. 422061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 422161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The some method cannot be bound. 422261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 422361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 422461847f8eSopenharmony_ci * @atomicservice 422561847f8eSopenharmony_ci * @since 12 422661847f8eSopenharmony_ci */ 422761847f8eSopenharmony_ci some(predicate: TypedArrayPredicateFn<number, Int32Array>): boolean; 422861847f8eSopenharmony_ci /** 422961847f8eSopenharmony_ci * Sorts an array. 423061847f8eSopenharmony_ci * 423161847f8eSopenharmony_ci * @param { TypedArrayCompareFn<number> } [compareFn] - Function used to determine the order of the elements. 423261847f8eSopenharmony_ci * It is expected to return a negative value if first argument is less than second argument, 423361847f8eSopenharmony_ci * zero if they're equal and a positive value otherwise. 423461847f8eSopenharmony_ci * If omitted, the elements are sorted in ascending, ASCII character order. 423561847f8eSopenharmony_ci * @returns { Int32Array } The reference to the original typed array, now sorted. 423661847f8eSopenharmony_ci * Note that the typed array is sorted in place and no copy is made. 423761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 423861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The sort method cannot be bound. 423961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 424061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 424161847f8eSopenharmony_ci * @atomicservice 424261847f8eSopenharmony_ci * @since 12 424361847f8eSopenharmony_ci */ 424461847f8eSopenharmony_ci sort(compareFn?: TypedArrayCompareFn<number>): Int32Array; 424561847f8eSopenharmony_ci /** 424661847f8eSopenharmony_ci * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements 424761847f8eSopenharmony_ci * at begin, inclusive, up to end, exclusive. 424861847f8eSopenharmony_ci * 424961847f8eSopenharmony_ci * @param { number } [begin] - The index of the beginning of the array. 425061847f8eSopenharmony_ci * @param { number } [end] - The index of the end of the array. 425161847f8eSopenharmony_ci * @returns { Int32Array } A new Int32Array object. 425261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 425361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The subarray method cannot be bound. 425461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 425561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 425661847f8eSopenharmony_ci * @atomicservice 425761847f8eSopenharmony_ci * @since 12 425861847f8eSopenharmony_ci */ 425961847f8eSopenharmony_ci subarray(begin?: number, end?: number): Int32Array; 426061847f8eSopenharmony_ci /** 426161847f8eSopenharmony_ci * Returns the item located at the specified index. 426261847f8eSopenharmony_ci * 426361847f8eSopenharmony_ci * @param { number } index - The zero-based index of the desired code unit.<br/> 426461847f8eSopenharmony_ci * A negative index will count back from the last item. 426561847f8eSopenharmony_ci * @returns { number | undefined } The element in the array matching the given index.<br/> 426661847f8eSopenharmony_ci * Always returns undefined if index < -array.length or 426761847f8eSopenharmony_ci * index >= array.length without attempting to access the corresponding property. 426861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 426961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The at method cannot be bound. 427061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 427161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 427261847f8eSopenharmony_ci * @atomicservice 427361847f8eSopenharmony_ci * @since 12 427461847f8eSopenharmony_ci */ 427561847f8eSopenharmony_ci at(index: number): number | undefined; 427661847f8eSopenharmony_ci /** 427761847f8eSopenharmony_ci * Returns an iterator that iterates over numbers. 427861847f8eSopenharmony_ci * 427961847f8eSopenharmony_ci * @returns { IterableIterator<number> } Iterator object that yields numbers. 428061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. 428161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 428261847f8eSopenharmony_ci * @atomicservice 428361847f8eSopenharmony_ci * @since 12 428461847f8eSopenharmony_ci */ 428561847f8eSopenharmony_ci [Symbol.iterator](): IterableIterator<number>; 428661847f8eSopenharmony_ci /** 428761847f8eSopenharmony_ci * Returns an iterable of key, value pairs for every entry in the array 428861847f8eSopenharmony_ci * 428961847f8eSopenharmony_ci * @returns { IterableIterator<[number, number]> } A new iterable iterator object. 429061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 429161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 429261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 429361847f8eSopenharmony_ci * @atomicservice 429461847f8eSopenharmony_ci * @since 12 429561847f8eSopenharmony_ci */ 429661847f8eSopenharmony_ci entries(): IterableIterator<[number, number]>; 429761847f8eSopenharmony_ci /** 429861847f8eSopenharmony_ci * Returns an iterable of keys in the array 429961847f8eSopenharmony_ci * 430061847f8eSopenharmony_ci * @returns { IterableIterator<number> } A new iterable iterator object. 430161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 430261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 430361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 430461847f8eSopenharmony_ci * @atomicservice 430561847f8eSopenharmony_ci * @since 12 430661847f8eSopenharmony_ci */ 430761847f8eSopenharmony_ci keys(): IterableIterator<number>; 430861847f8eSopenharmony_ci /** 430961847f8eSopenharmony_ci * Returns an iterable of values in the array 431061847f8eSopenharmony_ci * 431161847f8eSopenharmony_ci * @returns { IterableIterator<number> } A new iterable iterator object. 431261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 431361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 431461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 431561847f8eSopenharmony_ci * @atomicservice 431661847f8eSopenharmony_ci * @since 12 431761847f8eSopenharmony_ci */ 431861847f8eSopenharmony_ci values(): IterableIterator<number>; 431961847f8eSopenharmony_ci /** 432061847f8eSopenharmony_ci * Determines whether an array includes a certain element, returning true or false as appropriate. 432161847f8eSopenharmony_ci * 432261847f8eSopenharmony_ci * @param { number } searchElement - The element to search for. 432361847f8eSopenharmony_ci * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement. 432461847f8eSopenharmony_ci * @returns { boolean } A boolean value which is true if the value searchElement is found <br/> 432561847f8eSopenharmony_ci * within the typed array (or the part of the typed array indicated by the index fromIndex, if specified). 432661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 432761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The at method cannot be bound. 432861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 432961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 433061847f8eSopenharmony_ci * @atomicservice 433161847f8eSopenharmony_ci * @since 12 433261847f8eSopenharmony_ci */ 433361847f8eSopenharmony_ci includes(searchElement: number, fromIndex?: number): boolean; 433461847f8eSopenharmony_ci /** 433561847f8eSopenharmony_ci * Returns the item at that index. 433661847f8eSopenharmony_ci * 433761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 433861847f8eSopenharmony_ci * @atomicservice 433961847f8eSopenharmony_ci * @since 12 434061847f8eSopenharmony_ci */ 434161847f8eSopenharmony_ci [index: number]: number; 434261847f8eSopenharmony_ci } 434361847f8eSopenharmony_ci 434461847f8eSopenharmony_ci /** 434561847f8eSopenharmony_ci * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. 434661847f8eSopenharmony_ci * If multiple threads access a Uint32Array instance concurrently, 434761847f8eSopenharmony_ci * and at least one of the threads modifies the array structurally, 434861847f8eSopenharmony_ci * it must be synchronized externally. 434961847f8eSopenharmony_ci * 435061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 435161847f8eSopenharmony_ci * @atomicservice 435261847f8eSopenharmony_ci * @since 12 435361847f8eSopenharmony_ci */ 435461847f8eSopenharmony_ci @Sendable 435561847f8eSopenharmony_ci class Uint32Array { 435661847f8eSopenharmony_ci /** 435761847f8eSopenharmony_ci * The size in bytes of each element in the array. 435861847f8eSopenharmony_ci * 435961847f8eSopenharmony_ci * @type { number } 436061847f8eSopenharmony_ci * @readonly 436161847f8eSopenharmony_ci * @static 436261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 436361847f8eSopenharmony_ci * @atomicservice 436461847f8eSopenharmony_ci * @since 12 436561847f8eSopenharmony_ci */ 436661847f8eSopenharmony_ci static readonly BYTES_PER_ELEMENT: number; 436761847f8eSopenharmony_ci /** 436861847f8eSopenharmony_ci * The ArrayBuffer instance referenced by the array. 436961847f8eSopenharmony_ci * 437061847f8eSopenharmony_ci * @type { ArrayBuffer } 437161847f8eSopenharmony_ci * @readonly 437261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 437361847f8eSopenharmony_ci * @atomicservice 437461847f8eSopenharmony_ci * @since 12 437561847f8eSopenharmony_ci */ 437661847f8eSopenharmony_ci readonly buffer: ArrayBuffer; 437761847f8eSopenharmony_ci /** 437861847f8eSopenharmony_ci * The length in bytes of the array. 437961847f8eSopenharmony_ci * 438061847f8eSopenharmony_ci * @type { number } 438161847f8eSopenharmony_ci * @readonly 438261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 438361847f8eSopenharmony_ci * @atomicservice 438461847f8eSopenharmony_ci * @since 12 438561847f8eSopenharmony_ci */ 438661847f8eSopenharmony_ci readonly byteLength: number; 438761847f8eSopenharmony_ci /** 438861847f8eSopenharmony_ci * The offset in bytes of the array. 438961847f8eSopenharmony_ci * 439061847f8eSopenharmony_ci * @type { number } 439161847f8eSopenharmony_ci * @readonly 439261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 439361847f8eSopenharmony_ci * @atomicservice 439461847f8eSopenharmony_ci * @since 12 439561847f8eSopenharmony_ci */ 439661847f8eSopenharmony_ci readonly byteOffset: number; 439761847f8eSopenharmony_ci /** 439861847f8eSopenharmony_ci * The length of the array. 439961847f8eSopenharmony_ci * 440061847f8eSopenharmony_ci * @type { number } 440161847f8eSopenharmony_ci * @readonly 440261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 440361847f8eSopenharmony_ci * @atomicservice 440461847f8eSopenharmony_ci * @since 12 440561847f8eSopenharmony_ci */ 440661847f8eSopenharmony_ci readonly length: number; 440761847f8eSopenharmony_ci /** 440861847f8eSopenharmony_ci * A constructor used to create an Uint32Array. 440961847f8eSopenharmony_ci * 441061847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Uint32Array's constructor cannot be directly invoked. 441161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 441261847f8eSopenharmony_ci * @atomicservice 441361847f8eSopenharmony_ci * @since 12 441461847f8eSopenharmony_ci */ 441561847f8eSopenharmony_ci constructor(); 441661847f8eSopenharmony_ci /** 441761847f8eSopenharmony_ci * A constructor used to create an Uint32Array. 441861847f8eSopenharmony_ci * 441961847f8eSopenharmony_ci * @param { number } length - The length of the array 442061847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Uint32Array's constructor cannot be directly invoked. 442161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 442261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 442361847f8eSopenharmony_ci * @atomicservice 442461847f8eSopenharmony_ci * @since 12 442561847f8eSopenharmony_ci */ 442661847f8eSopenharmony_ci constructor(length: number); 442761847f8eSopenharmony_ci /** 442861847f8eSopenharmony_ci * A constructor used to create an Uint32Array. 442961847f8eSopenharmony_ci * 443061847f8eSopenharmony_ci * @param { Iterable<number> } elements - An iterable object to convert to an Uint32Array. 443161847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Uint32Array's constructor cannot be directly invoked. 443261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 443361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 443461847f8eSopenharmony_ci * @atomicservice 443561847f8eSopenharmony_ci * @since 12 443661847f8eSopenharmony_ci */ 443761847f8eSopenharmony_ci constructor(elements: Iterable<number>); 443861847f8eSopenharmony_ci /** 443961847f8eSopenharmony_ci * A constructor used to create an Uint32Array. 444061847f8eSopenharmony_ci * 444161847f8eSopenharmony_ci * @param { ArrayLike<number> | ArrayBuffer } array - An array is initialized with the given elements 444261847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Uint32Array's constructor cannot be directly invoked. 444361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 444461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 444561847f8eSopenharmony_ci * @atomicservice 444661847f8eSopenharmony_ci * @since 12 444761847f8eSopenharmony_ci */ 444861847f8eSopenharmony_ci constructor(array: ArrayLike<number> | ArrayBuffer); 444961847f8eSopenharmony_ci /** 445061847f8eSopenharmony_ci * A constructor used to create an Uint32Array. 445161847f8eSopenharmony_ci * 445261847f8eSopenharmony_ci * @param { ArrayBuffer } buffer - An array is initialized with the given elements 445361847f8eSopenharmony_ci * @param { number } [byteOffset] - The byteOffset (in bytes) parameter specifies the memory range 445461847f8eSopenharmony_ci * that will be exposed by the typed array view. 445561847f8eSopenharmony_ci * @param { number } [length] - The length parameter specifies the memory range 445661847f8eSopenharmony_ci * that will be exposed by the typed array view. 445761847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Uint32Array's constructor cannot be directly invoked. 445861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 445961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 446061847f8eSopenharmony_ci * @atomicservice 446161847f8eSopenharmony_ci * @since 12 446261847f8eSopenharmony_ci */ 446361847f8eSopenharmony_ci constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number); 446461847f8eSopenharmony_ci /** 446561847f8eSopenharmony_ci * Creates an Uint32Array from an array-like object. 446661847f8eSopenharmony_ci * 446761847f8eSopenharmony_ci * @param { ArrayLike<number> } arrayLike - An array-like object to convert to an Uint32Array. 446861847f8eSopenharmony_ci * @returns { Uint32Array } A new Uint32Array instance 446961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 447061847f8eSopenharmony_ci * @static 447161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 447261847f8eSopenharmony_ci * @atomicservice 447361847f8eSopenharmony_ci * @since 12 447461847f8eSopenharmony_ci */ 447561847f8eSopenharmony_ci static from(arrayLike: ArrayLike<number>): Uint32Array; 447661847f8eSopenharmony_ci /** 447761847f8eSopenharmony_ci * Creates an Uint32Array from an array-like object. 447861847f8eSopenharmony_ci * 447961847f8eSopenharmony_ci * @param { ArrayLike<T> } arrayLike - An array-like object to convert to an Uint32Array. 448061847f8eSopenharmony_ci * @param { TypedArrayFromMapFn<T, number> } mapFn - A mapping function to call on every element of the array. 448161847f8eSopenharmony_ci * @returns { Uint32Array } A new Uint32Array instance 448261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 448361847f8eSopenharmony_ci * @static 448461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 448561847f8eSopenharmony_ci * @atomicservice 448661847f8eSopenharmony_ci * @since 12 448761847f8eSopenharmony_ci */ 448861847f8eSopenharmony_ci static from<T>(arrayLike: ArrayLike<T>, mapFn: TypedArrayFromMapFn<T, number>): Uint32Array; 448961847f8eSopenharmony_ci /** 449061847f8eSopenharmony_ci * Creates an Uint32Array from an iterable object. 449161847f8eSopenharmony_ci * 449261847f8eSopenharmony_ci * @param { Iterable<number> } arrayLike - An iterable object to convert to an Uint32Array. 449361847f8eSopenharmony_ci * @param { TypedArrayFromMapFn<number, number> } [mapFn] - A mapping function to 449461847f8eSopenharmony_ci * call on every element of the array. 449561847f8eSopenharmony_ci * @returns { Uint32Array } A new Uint32Array instance 449661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 449761847f8eSopenharmony_ci * @static 449861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 449961847f8eSopenharmony_ci * @atomicservice 450061847f8eSopenharmony_ci * @since 12 450161847f8eSopenharmony_ci */ 450261847f8eSopenharmony_ci static from(arrayLike: Iterable<number>, mapFn?: TypedArrayFromMapFn<number, number>): Uint32Array; 450361847f8eSopenharmony_ci /** 450461847f8eSopenharmony_ci * Returns the this object after copying a section of the array identified by start and end 450561847f8eSopenharmony_ci * to the same array starting at position target. 450661847f8eSopenharmony_ci * 450761847f8eSopenharmony_ci * @param { number } target - If target is negative, it is treated as length+target where length is the 450861847f8eSopenharmony_ci * length of the array. 450961847f8eSopenharmony_ci * @param { number } start - If start is negative, it is treated as length+start. If end is negative, it 451061847f8eSopenharmony_ci * is treated as length+end. 451161847f8eSopenharmony_ci * @param { number } [end] - If not specified, length of the this object is used as its default value. 451261847f8eSopenharmony_ci * @returns { Uint32Array } The array itself. 451361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 451461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound. 451561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 451661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 451761847f8eSopenharmony_ci * @atomicservice 451861847f8eSopenharmony_ci * @since 12 451961847f8eSopenharmony_ci */ 452061847f8eSopenharmony_ci copyWithin(target: number, start: number, end?: number): Uint32Array; 452161847f8eSopenharmony_ci /** 452261847f8eSopenharmony_ci * Determines whether all the members of an array satisfy the specified test. 452361847f8eSopenharmony_ci * 452461847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Uint32Array> } predicate - A function that accepts up to three arguments. 452561847f8eSopenharmony_ci * The every method calls the predicate function for each element in the array until 452661847f8eSopenharmony_ci * the predicate returns a value which is coercible to the Boolean value false, or until the end of the array. 452761847f8eSopenharmony_ci * @returns { boolean } true unless predicate returns a false value for a typed array element, 452861847f8eSopenharmony_ci * in which case false is immediately returned. 452961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 453061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The every method cannot be bound. 453161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 453261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 453361847f8eSopenharmony_ci * @atomicservice 453461847f8eSopenharmony_ci * @since 12 453561847f8eSopenharmony_ci */ 453661847f8eSopenharmony_ci every(predicate: TypedArrayPredicateFn<number, Uint32Array>): boolean; 453761847f8eSopenharmony_ci /** 453861847f8eSopenharmony_ci * Returns the this object after filling the section identified by start and end with value. 453961847f8eSopenharmony_ci * 454061847f8eSopenharmony_ci * @param { number } value - value to fill array section with. 454161847f8eSopenharmony_ci * @param { number } [start] - index to start filling the array at. If start is negative, it is treated as 454261847f8eSopenharmony_ci * length+start where length is the length of the array. 454361847f8eSopenharmony_ci * @param { number } [end] - index to stop filling the array at. If end is negative, it is treated as 454461847f8eSopenharmony_ci * length+end. 454561847f8eSopenharmony_ci * @returns { Uint32Array } The array itself. 454661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 454761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The fill method cannot be bound. 454861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 454961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 455061847f8eSopenharmony_ci * @atomicservice 455161847f8eSopenharmony_ci * @since 12 455261847f8eSopenharmony_ci */ 455361847f8eSopenharmony_ci fill(value: number, start?: number, end?: number): Uint32Array; 455461847f8eSopenharmony_ci /** 455561847f8eSopenharmony_ci * Returns the elements of an array that meet the condition specified in a callback function. 455661847f8eSopenharmony_ci * 455761847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Uint32Array> } predicate - A function that accepts up to three arguments. 455861847f8eSopenharmony_ci * The filter method calls the predicate function one time for each element in the array. 455961847f8eSopenharmony_ci * @returns { Uint32Array } The array itself. 456061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 456161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The filter method cannot be bound. 456261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 456361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 456461847f8eSopenharmony_ci * @atomicservice 456561847f8eSopenharmony_ci * @since 12 456661847f8eSopenharmony_ci */ 456761847f8eSopenharmony_ci filter(predicate: TypedArrayPredicateFn<number, Uint32Array>): Uint32Array; 456861847f8eSopenharmony_ci /** 456961847f8eSopenharmony_ci * Returns the value of the first element in the array where predicate is true, and undefined 457061847f8eSopenharmony_ci * otherwise. 457161847f8eSopenharmony_ci * 457261847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Uint32Array> } predicate - find calls predicate once for each element of 457361847f8eSopenharmony_ci * the array, in ascending order, until it finds one where predicate returns true. 457461847f8eSopenharmony_ci * If such an element is found, find immediately returns that element value. Otherwise, find returns undefined. 457561847f8eSopenharmony_ci * @returns { number | undefined } The first element in the typed array 457661847f8eSopenharmony_ci * that satisfies the provided testing function. Otherwise, undefined is returned. 457761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 457861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The find method cannot be bound. 457961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 458061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 458161847f8eSopenharmony_ci * @atomicservice 458261847f8eSopenharmony_ci * @since 12 458361847f8eSopenharmony_ci */ 458461847f8eSopenharmony_ci find(predicate: TypedArrayPredicateFn<number, Uint32Array>): number | undefined; 458561847f8eSopenharmony_ci /** 458661847f8eSopenharmony_ci * Returns the index of the first element in the array where predicate is true, and -1 458761847f8eSopenharmony_ci * otherwise. 458861847f8eSopenharmony_ci * 458961847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Uint32Array> } predicate - find calls predicate once for each element of 459061847f8eSopenharmony_ci * the array, in ascending order, until it finds one where predicate returns true. If such an element is found, 459161847f8eSopenharmony_ci * findIndex immediately returns that element index. Otherwise, findIndex returns -1. 459261847f8eSopenharmony_ci * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1. 459361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 459461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The findIndex method cannot be bound. 459561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 459661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 459761847f8eSopenharmony_ci * @atomicservice 459861847f8eSopenharmony_ci * @since 12 459961847f8eSopenharmony_ci */ 460061847f8eSopenharmony_ci findIndex(predicate: TypedArrayPredicateFn<number, Uint32Array>): number; 460161847f8eSopenharmony_ci /** 460261847f8eSopenharmony_ci * Performs the specified action for each element in an array. 460361847f8eSopenharmony_ci * 460461847f8eSopenharmony_ci * @param { TypedArrayForEachCallback<number, Uint32Array> } callbackFn - A function that 460561847f8eSopenharmony_ci * accepts up to three arguments. 460661847f8eSopenharmony_ci * forEach calls the callbackfn function one time for each element in the array. 460761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 460861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The forEach method cannot be bound. 460961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 461061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 461161847f8eSopenharmony_ci * @atomicservice 461261847f8eSopenharmony_ci * @since 12 461361847f8eSopenharmony_ci */ 461461847f8eSopenharmony_ci forEach(callbackFn: TypedArrayForEachCallback<number, Uint32Array>): void; 461561847f8eSopenharmony_ci /** 461661847f8eSopenharmony_ci * Returns the index of the first occurrence of a value in an array. 461761847f8eSopenharmony_ci * 461861847f8eSopenharmony_ci * @param { number } searchElement - The value to locate in the array. 461961847f8eSopenharmony_ci * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the 462061847f8eSopenharmony_ci * search starts at index 0. 462161847f8eSopenharmony_ci * @returns { number } The first index of searchElement in the typed array; -1 if not found. 462261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 462361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The indexOf method cannot be bound. 462461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 462561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 462661847f8eSopenharmony_ci * @atomicservice 462761847f8eSopenharmony_ci * @since 12 462861847f8eSopenharmony_ci */ 462961847f8eSopenharmony_ci indexOf(searchElement: number, fromIndex?: number): number; 463061847f8eSopenharmony_ci /** 463161847f8eSopenharmony_ci * Adds all the elements of an array separated by the specified separator string. 463261847f8eSopenharmony_ci * @param { string } [separator] - A string used to separate one element of an array from the next in the 463361847f8eSopenharmony_ci * resulting String. If omitted, the array elements are separated with a comma. 463461847f8eSopenharmony_ci * @returns { string } A string with all typed array elements joined. 463561847f8eSopenharmony_ci * If array.length is 0, the empty string is returned. 463661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 463761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The join method cannot be bound. 463861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 463961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 464061847f8eSopenharmony_ci * @atomicservice 464161847f8eSopenharmony_ci * @since 12 464261847f8eSopenharmony_ci */ 464361847f8eSopenharmony_ci join(separator?: string): string; 464461847f8eSopenharmony_ci /** 464561847f8eSopenharmony_ci * Calls a defined callback function on each element of an array, and returns an array that 464661847f8eSopenharmony_ci * contains the results. 464761847f8eSopenharmony_ci * 464861847f8eSopenharmony_ci * @param { TypedArrayMapCallback<number, Uint32Array> } callbackFn - A function that accepts up to 464961847f8eSopenharmony_ci * three arguments. The map method calls the callbackfn function one time for each element in the array. 465061847f8eSopenharmony_ci * @returns { Uint32Array } The array itself. 465161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 465261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The map method cannot be bound. 465361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 465461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 465561847f8eSopenharmony_ci * @atomicservice 465661847f8eSopenharmony_ci * @since 12 465761847f8eSopenharmony_ci */ 465861847f8eSopenharmony_ci map(callbackFn: TypedArrayMapCallback<number, Uint32Array>): Uint32Array; 465961847f8eSopenharmony_ci /** 466061847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 466161847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 466261847f8eSopenharmony_ci * call to the callback function. 466361847f8eSopenharmony_ci * 466461847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<number, number, Uint32Array> } callbackFn - A function that 466561847f8eSopenharmony_ci * accepts up to four arguments. 466661847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 466761847f8eSopenharmony_ci * @returns { number } The value that results from running the "reducer" callback function to 466861847f8eSopenharmony_ci * completion over the entire typed array. 466961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 467061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 467161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 467261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 467361847f8eSopenharmony_ci * @atomicservice 467461847f8eSopenharmony_ci * @since 12 467561847f8eSopenharmony_ci */ 467661847f8eSopenharmony_ci reduce(callbackFn: TypedArrayReduceCallback<number, number, Uint32Array>): number; 467761847f8eSopenharmony_ci /** 467861847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 467961847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 468061847f8eSopenharmony_ci * call to the callback function. 468161847f8eSopenharmony_ci * 468261847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<number, number, Uint32Array> } callbackFn - A function that 468361847f8eSopenharmony_ci * accepts up to four arguments. 468461847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 468561847f8eSopenharmony_ci * @param { number } initialValue - If initialValue is specified, it is used as the initial value to start 468661847f8eSopenharmony_ci * the accumulation. The first call to the callbackfn function provides this value as an argument 468761847f8eSopenharmony_ci * instead of an array value. 468861847f8eSopenharmony_ci * @returns { number } The value that results from running the "reducer" callback function to 468961847f8eSopenharmony_ci * completion over the entire typed array. 469061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 469161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 469261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 469361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 469461847f8eSopenharmony_ci * @atomicservice 469561847f8eSopenharmony_ci * @since 12 469661847f8eSopenharmony_ci */ 469761847f8eSopenharmony_ci reduce(callbackFn: TypedArrayReduceCallback<number, number, Uint32Array>, initialValue: number): number; 469861847f8eSopenharmony_ci /** 469961847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 470061847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 470161847f8eSopenharmony_ci * call to the callback function. 470261847f8eSopenharmony_ci * 470361847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<U, number, Uint32Array> } callbackFn - A function that 470461847f8eSopenharmony_ci * accepts up to four arguments. 470561847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 470661847f8eSopenharmony_ci * @param { U } initialValue - If initialValue is specified, it is used as the initial value to start 470761847f8eSopenharmony_ci * the accumulation. The first call to the callbackfn function provides this value as an argument 470861847f8eSopenharmony_ci * instead of an array value. 470961847f8eSopenharmony_ci * @returns { U } The value that results from running the "reducer" callback function to 471061847f8eSopenharmony_ci * completion over the entire typed array. 471161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 471261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 471361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 471461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 471561847f8eSopenharmony_ci * @atomicservice 471661847f8eSopenharmony_ci * @since 12 471761847f8eSopenharmony_ci */ 471861847f8eSopenharmony_ci reduce<U>(callbackFn: TypedArrayReduceCallback<U, number, Uint32Array>, initialValue: U): U; 471961847f8eSopenharmony_ci /** 472061847f8eSopenharmony_ci * Reverses the elements in an Array. 472161847f8eSopenharmony_ci * 472261847f8eSopenharmony_ci * @returns { Uint32Array } The reference to the original typed array, now reversed. 472361847f8eSopenharmony_ci * <br>Note that the typed array is reversed in place, and no copy is made. 472461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reverse method cannot be bound. 472561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 472661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 472761847f8eSopenharmony_ci * @atomicservice 472861847f8eSopenharmony_ci * @since 12 472961847f8eSopenharmony_ci */ 473061847f8eSopenharmony_ci reverse(): Uint32Array; 473161847f8eSopenharmony_ci /** 473261847f8eSopenharmony_ci * Sets a value or an array of values. 473361847f8eSopenharmony_ci * 473461847f8eSopenharmony_ci * @param { ArrayLike<number> } array - A typed or untyped array of values to set. 473561847f8eSopenharmony_ci * @param { number } [offset] - The index in the current array at which the values are to be written. 473661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 473761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The set method cannot be bound. 473861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 473961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 474061847f8eSopenharmony_ci * @atomicservice 474161847f8eSopenharmony_ci * @since 12 474261847f8eSopenharmony_ci */ 474361847f8eSopenharmony_ci set(array: ArrayLike<number>, offset?: number): void; 474461847f8eSopenharmony_ci /** 474561847f8eSopenharmony_ci * Returns a section of an array. 474661847f8eSopenharmony_ci * 474761847f8eSopenharmony_ci * @param { number } [start] - The beginning of the specified portion of the array. 474861847f8eSopenharmony_ci * @param { number } [end] - The end of the specified portion of the array. 474961847f8eSopenharmony_ci * This is exclusive of the element at the index 'end'. 475061847f8eSopenharmony_ci * @returns { Uint32Array } A new typed array containing the extracted elements. 475161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 475261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The slice method cannot be bound. 475361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 475461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 475561847f8eSopenharmony_ci * @atomicservice 475661847f8eSopenharmony_ci * @since 12 475761847f8eSopenharmony_ci */ 475861847f8eSopenharmony_ci slice(start?: number, end?: number): Uint32Array; 475961847f8eSopenharmony_ci /** 476061847f8eSopenharmony_ci * Determines whether the specified callback function returns true for any element of an array. 476161847f8eSopenharmony_ci * 476261847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Uint32Array> } predicate - A function that accepts up to three arguments. 476361847f8eSopenharmony_ci * The some method calls the predicate function for each element in the array until 476461847f8eSopenharmony_ci * the predicate returns a value which is coercible to the Boolean value true, or until the end of the array. 476561847f8eSopenharmony_ci * @returns { boolean } false unless predicate returns a truthy value for a typed array element, 476661847f8eSopenharmony_ci * in which case true is immediately returned. 476761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 476861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The some method cannot be bound. 476961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 477061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 477161847f8eSopenharmony_ci * @atomicservice 477261847f8eSopenharmony_ci * @since 12 477361847f8eSopenharmony_ci */ 477461847f8eSopenharmony_ci some(predicate: TypedArrayPredicateFn<number, Uint32Array>): boolean; 477561847f8eSopenharmony_ci /** 477661847f8eSopenharmony_ci * Sorts an array. 477761847f8eSopenharmony_ci * 477861847f8eSopenharmony_ci * @param { TypedArrayCompareFn<number> } [compareFn] - Function used to determine the order of the elements. 477961847f8eSopenharmony_ci * It is expected to return a negative value if first argument is less than second argument, 478061847f8eSopenharmony_ci * zero if they're equal and a positive value otherwise. 478161847f8eSopenharmony_ci * If omitted, the elements are sorted in ascending, ASCII character order. 478261847f8eSopenharmony_ci * @returns { Uint32Array } The reference to the original typed array, now sorted. 478361847f8eSopenharmony_ci * Note that the typed array is sorted in place and no copy is made. 478461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 478561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The sort method cannot be bound. 478661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 478761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 478861847f8eSopenharmony_ci * @atomicservice 478961847f8eSopenharmony_ci * @since 12 479061847f8eSopenharmony_ci */ 479161847f8eSopenharmony_ci sort(compareFn?: TypedArrayCompareFn<number>): Uint32Array; 479261847f8eSopenharmony_ci /** 479361847f8eSopenharmony_ci * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements 479461847f8eSopenharmony_ci * at begin, inclusive, up to end, exclusive. 479561847f8eSopenharmony_ci * 479661847f8eSopenharmony_ci * @param { number } [begin] - The index of the beginning of the array. 479761847f8eSopenharmony_ci * @param { number } [end] - The index of the end of the array. 479861847f8eSopenharmony_ci * @returns { Uint32Array } A new Uint32Array object. 479961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 480061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The subarray method cannot be bound. 480161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 480261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 480361847f8eSopenharmony_ci * @atomicservice 480461847f8eSopenharmony_ci * @since 12 480561847f8eSopenharmony_ci */ 480661847f8eSopenharmony_ci subarray(begin?: number, end?: number): Uint32Array; 480761847f8eSopenharmony_ci /** 480861847f8eSopenharmony_ci * Returns the item located at the specified index. 480961847f8eSopenharmony_ci * 481061847f8eSopenharmony_ci * @param { number } index - The zero-based index of the desired code unit.<br/> 481161847f8eSopenharmony_ci * A negative index will count back from the last item. 481261847f8eSopenharmony_ci * @returns { number | undefined } The element in the array matching the given index.<br/> 481361847f8eSopenharmony_ci * Always returns undefined if index < -array.length or 481461847f8eSopenharmony_ci * index >= array.length without attempting to access the corresponding property. 481561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 481661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The at method cannot be bound. 481761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 481861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 481961847f8eSopenharmony_ci * @atomicservice 482061847f8eSopenharmony_ci * @since 12 482161847f8eSopenharmony_ci */ 482261847f8eSopenharmony_ci at(index: number): number | undefined; 482361847f8eSopenharmony_ci /** 482461847f8eSopenharmony_ci * Returns an iterator that iterates over numbers. 482561847f8eSopenharmony_ci * 482661847f8eSopenharmony_ci * @returns { IterableIterator<number> } Iterator object that yields numbers. 482761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. 482861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 482961847f8eSopenharmony_ci * @atomicservice 483061847f8eSopenharmony_ci * @since 12 483161847f8eSopenharmony_ci */ 483261847f8eSopenharmony_ci [Symbol.iterator](): IterableIterator<number>; 483361847f8eSopenharmony_ci /** 483461847f8eSopenharmony_ci * Returns an iterable of key, value pairs for every entry in the array 483561847f8eSopenharmony_ci * 483661847f8eSopenharmony_ci * @returns { IterableIterator<[number, number]> } A new iterable iterator object. 483761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 483861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 483961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 484061847f8eSopenharmony_ci * @atomicservice 484161847f8eSopenharmony_ci * @since 12 484261847f8eSopenharmony_ci */ 484361847f8eSopenharmony_ci entries(): IterableIterator<[number, number]>; 484461847f8eSopenharmony_ci /** 484561847f8eSopenharmony_ci * Returns an iterable of keys in the array 484661847f8eSopenharmony_ci * 484761847f8eSopenharmony_ci * @returns { IterableIterator<number> } A new iterable iterator object. 484861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 484961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 485061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 485161847f8eSopenharmony_ci * @atomicservice 485261847f8eSopenharmony_ci * @since 12 485361847f8eSopenharmony_ci */ 485461847f8eSopenharmony_ci keys(): IterableIterator<number>; 485561847f8eSopenharmony_ci /** 485661847f8eSopenharmony_ci * Returns an iterable of values in the array 485761847f8eSopenharmony_ci * 485861847f8eSopenharmony_ci * @returns { IterableIterator<number> } A new iterable iterator object. 485961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 486061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 486161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 486261847f8eSopenharmony_ci * @atomicservice 486361847f8eSopenharmony_ci * @since 12 486461847f8eSopenharmony_ci */ 486561847f8eSopenharmony_ci values(): IterableIterator<number>; 486661847f8eSopenharmony_ci /** 486761847f8eSopenharmony_ci * Determines whether an array includes a certain element, returning true or false as appropriate. 486861847f8eSopenharmony_ci * 486961847f8eSopenharmony_ci * @param { number } searchElement - The element to search for. 487061847f8eSopenharmony_ci * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement. 487161847f8eSopenharmony_ci * @returns { boolean } A boolean value which is true if the value searchElement is found <br/> 487261847f8eSopenharmony_ci * within the typed array (or the part of the typed array indicated by the index fromIndex, if specified). 487361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 487461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The at method cannot be bound. 487561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 487661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 487761847f8eSopenharmony_ci * @atomicservice 487861847f8eSopenharmony_ci * @since 12 487961847f8eSopenharmony_ci */ 488061847f8eSopenharmony_ci includes(searchElement: number, fromIndex?: number): boolean; 488161847f8eSopenharmony_ci /** 488261847f8eSopenharmony_ci * Returns the item at that index. 488361847f8eSopenharmony_ci * 488461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 488561847f8eSopenharmony_ci * @atomicservice 488661847f8eSopenharmony_ci * @since 12 488761847f8eSopenharmony_ci */ 488861847f8eSopenharmony_ci [index: number]: number; 488961847f8eSopenharmony_ci } 489061847f8eSopenharmony_ci /** 489161847f8eSopenharmony_ci * The Float32Array typed array represents an array of 32-bit float numbers. 489261847f8eSopenharmony_ci * The contents are initialized to 0. 489361847f8eSopenharmony_ci * If multiple threads access a Float32Array instance concurrently, 489461847f8eSopenharmony_ci * and at least one of the threads modifies the array structurally, 489561847f8eSopenharmony_ci * it must be synchronized externally. 489661847f8eSopenharmony_ci * 489761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 489861847f8eSopenharmony_ci * @atomicservice 489961847f8eSopenharmony_ci * @since 12 490061847f8eSopenharmony_ci */ 490161847f8eSopenharmony_ci @Sendable 490261847f8eSopenharmony_ci class Float32Array { 490361847f8eSopenharmony_ci /** 490461847f8eSopenharmony_ci * The size in bytes of each element in the array. 490561847f8eSopenharmony_ci * 490661847f8eSopenharmony_ci * @type { number } 490761847f8eSopenharmony_ci * @readonly 490861847f8eSopenharmony_ci * @static 490961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 491061847f8eSopenharmony_ci * @atomicservice 491161847f8eSopenharmony_ci * @since 12 491261847f8eSopenharmony_ci */ 491361847f8eSopenharmony_ci static readonly BYTES_PER_ELEMENT: number; 491461847f8eSopenharmony_ci /** 491561847f8eSopenharmony_ci * The ArrayBuffer instance referenced by the array. 491661847f8eSopenharmony_ci * 491761847f8eSopenharmony_ci * @type { ArrayBuffer } 491861847f8eSopenharmony_ci * @readonly 491961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 492061847f8eSopenharmony_ci * @atomicservice 492161847f8eSopenharmony_ci * @since 12 492261847f8eSopenharmony_ci */ 492361847f8eSopenharmony_ci readonly buffer: ArrayBuffer; 492461847f8eSopenharmony_ci /** 492561847f8eSopenharmony_ci * The length in bytes of the array. 492661847f8eSopenharmony_ci * 492761847f8eSopenharmony_ci * @type { number } 492861847f8eSopenharmony_ci * @readonly 492961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 493061847f8eSopenharmony_ci * @atomicservice 493161847f8eSopenharmony_ci * @since 12 493261847f8eSopenharmony_ci */ 493361847f8eSopenharmony_ci readonly byteLength: number; 493461847f8eSopenharmony_ci /** 493561847f8eSopenharmony_ci * The offset in bytes of the array. 493661847f8eSopenharmony_ci * 493761847f8eSopenharmony_ci * @type { number } 493861847f8eSopenharmony_ci * @readonly 493961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 494061847f8eSopenharmony_ci * @atomicservice 494161847f8eSopenharmony_ci * @since 12 494261847f8eSopenharmony_ci */ 494361847f8eSopenharmony_ci readonly byteOffset: number; 494461847f8eSopenharmony_ci /** 494561847f8eSopenharmony_ci * The length of the array. 494661847f8eSopenharmony_ci * 494761847f8eSopenharmony_ci * @type { number } 494861847f8eSopenharmony_ci * @readonly 494961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 495061847f8eSopenharmony_ci * @atomicservice 495161847f8eSopenharmony_ci * @since 12 495261847f8eSopenharmony_ci */ 495361847f8eSopenharmony_ci readonly length: number; 495461847f8eSopenharmony_ci /** 495561847f8eSopenharmony_ci * A constructor used to create an Float32Array. 495661847f8eSopenharmony_ci * 495761847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Float32Array's constructor cannot be directly invoked. 495861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 495961847f8eSopenharmony_ci * @atomicservice 496061847f8eSopenharmony_ci * @since 12 496161847f8eSopenharmony_ci */ 496261847f8eSopenharmony_ci constructor(); 496361847f8eSopenharmony_ci /** 496461847f8eSopenharmony_ci * A constructor used to create an Float32Array. 496561847f8eSopenharmony_ci * 496661847f8eSopenharmony_ci * @param { number } length - The length of the array 496761847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Float32Array's constructor cannot be directly invoked. 496861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 496961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 497061847f8eSopenharmony_ci * @atomicservice 497161847f8eSopenharmony_ci * @since 12 497261847f8eSopenharmony_ci */ 497361847f8eSopenharmony_ci constructor(length: number); 497461847f8eSopenharmony_ci /** 497561847f8eSopenharmony_ci * A constructor used to create an Float32Array. 497661847f8eSopenharmony_ci * 497761847f8eSopenharmony_ci * @param { Iterable<number> } elements - An iterable object to convert to an Float32Array. 497861847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Float32Array's constructor cannot be directly invoked. 497961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 498061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 498161847f8eSopenharmony_ci * @atomicservice 498261847f8eSopenharmony_ci * @since 12 498361847f8eSopenharmony_ci */ 498461847f8eSopenharmony_ci constructor(elements: Iterable<number>); 498561847f8eSopenharmony_ci /** 498661847f8eSopenharmony_ci * A constructor used to create an Float32Array. 498761847f8eSopenharmony_ci * 498861847f8eSopenharmony_ci * @param { ArrayLike<number> | ArrayBuffer } array - An array is initialized with the given elements 498961847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Float32Array's constructor cannot be directly invoked. 499061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 499161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 499261847f8eSopenharmony_ci * @atomicservice 499361847f8eSopenharmony_ci * @since 12 499461847f8eSopenharmony_ci */ 499561847f8eSopenharmony_ci constructor(array: ArrayLike<number> | ArrayBuffer); 499661847f8eSopenharmony_ci /** 499761847f8eSopenharmony_ci * A constructor used to create an Float32Array. 499861847f8eSopenharmony_ci * 499961847f8eSopenharmony_ci * @param { ArrayBuffer } buffer - An array is initialized with the given elements 500061847f8eSopenharmony_ci * @param { number } [byteOffset] - The byteOffset (in bytes) parameter specifies the memory range 500161847f8eSopenharmony_ci * that will be exposed by the typed array view. 500261847f8eSopenharmony_ci * @param { number } [length] - The length parameter specifies the memory range 500361847f8eSopenharmony_ci * that will be exposed by the typed array view. 500461847f8eSopenharmony_ci * @throws { BusinessError } 10200012 - The Float32Array's constructor cannot be directly invoked. 500561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 500661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 500761847f8eSopenharmony_ci * @atomicservice 500861847f8eSopenharmony_ci * @since 12 500961847f8eSopenharmony_ci */ 501061847f8eSopenharmony_ci constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number); 501161847f8eSopenharmony_ci /** 501261847f8eSopenharmony_ci * Creates an Float32Array from an array-like object. 501361847f8eSopenharmony_ci * 501461847f8eSopenharmony_ci * @param { ArrayLike<number> } arrayLike - An array-like object to convert to an Float32Array. 501561847f8eSopenharmony_ci * @returns { Float32Array } A new Float32Array instance 501661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 501761847f8eSopenharmony_ci * @static 501861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 501961847f8eSopenharmony_ci * @atomicservice 502061847f8eSopenharmony_ci * @since 12 502161847f8eSopenharmony_ci */ 502261847f8eSopenharmony_ci static from(arrayLike: ArrayLike<number>): Float32Array; 502361847f8eSopenharmony_ci /** 502461847f8eSopenharmony_ci * Creates an Float32Array from an array-like object. 502561847f8eSopenharmony_ci * 502661847f8eSopenharmony_ci * @param { ArrayLike<T> } arrayLike - An array-like object to convert to an Float32Array. 502761847f8eSopenharmony_ci * @param { TypedArrayFromMapFn<T, number> } mapFn - A mapping function to call on every element of the array. 502861847f8eSopenharmony_ci * @returns { Float32Array } A new Float32Array instance 502961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 503061847f8eSopenharmony_ci * @static 503161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 503261847f8eSopenharmony_ci * @atomicservice 503361847f8eSopenharmony_ci * @since 12 503461847f8eSopenharmony_ci */ 503561847f8eSopenharmony_ci static from<T>(arrayLike: ArrayLike<T>, mapFn: TypedArrayFromMapFn<T, number>): Float32Array; 503661847f8eSopenharmony_ci /** 503761847f8eSopenharmony_ci * Creates an Float32Array from an iterable object. 503861847f8eSopenharmony_ci * 503961847f8eSopenharmony_ci * @param { Iterable<number> } arrayLike - An iterable object to convert to an Float32Array. 504061847f8eSopenharmony_ci * @param { TypedArrayFromMapFn<number, number> } [mapFn] - A mapping function to 504161847f8eSopenharmony_ci * call on every element of the array. 504261847f8eSopenharmony_ci * @returns { Float32Array } A new Float32Array instance 504361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 504461847f8eSopenharmony_ci * @static 504561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 504661847f8eSopenharmony_ci * @atomicservice 504761847f8eSopenharmony_ci * @since 12 504861847f8eSopenharmony_ci */ 504961847f8eSopenharmony_ci static from(arrayLike: Iterable<number>, mapFn?: TypedArrayFromMapFn<number, number>): Float32Array; 505061847f8eSopenharmony_ci /** 505161847f8eSopenharmony_ci * Returns the this object after copying a section of the array identified by start and end 505261847f8eSopenharmony_ci * to the same array starting at position target. 505361847f8eSopenharmony_ci * 505461847f8eSopenharmony_ci * @param { number } target - If target is negative, it is treated as length+target where length is the 505561847f8eSopenharmony_ci * length of the array. 505661847f8eSopenharmony_ci * @param { number } start - If start is negative, it is treated as length+start. If end is negative, it 505761847f8eSopenharmony_ci * is treated as length+end. 505861847f8eSopenharmony_ci * @param { number } [end] - If not specified, length of the this object is used as its default value. 505961847f8eSopenharmony_ci * @returns { Float32Array } The array itself. 506061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 506161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound. 506261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 506361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 506461847f8eSopenharmony_ci * @atomicservice 506561847f8eSopenharmony_ci * @since 12 506661847f8eSopenharmony_ci */ 506761847f8eSopenharmony_ci copyWithin(target: number, start: number, end?: number): Float32Array; 506861847f8eSopenharmony_ci /** 506961847f8eSopenharmony_ci * Determines whether all the members of an array satisfy the specified test. 507061847f8eSopenharmony_ci * 507161847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Float32Array> } predicate - A function 507261847f8eSopenharmony_ci * that accepts up to three arguments. 507361847f8eSopenharmony_ci * The every method calls the predicate function for each element in the array until 507461847f8eSopenharmony_ci * the predicate returns a value which is coercible to the Boolean value false, or until the end of the array. 507561847f8eSopenharmony_ci * @returns { boolean } true unless predicate returns a false value for a typed array element, 507661847f8eSopenharmony_ci * in which case false is immediately returned. 507761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 507861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The every method cannot be bound. 507961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 508061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 508161847f8eSopenharmony_ci * @atomicservice 508261847f8eSopenharmony_ci * @since 12 508361847f8eSopenharmony_ci */ 508461847f8eSopenharmony_ci every(predicate: TypedArrayPredicateFn<number, Float32Array>): boolean; 508561847f8eSopenharmony_ci /** 508661847f8eSopenharmony_ci * Returns the this object after filling the section identified by start and end with value. 508761847f8eSopenharmony_ci * 508861847f8eSopenharmony_ci * @param { number } value - value to fill array section with. 508961847f8eSopenharmony_ci * @param { number } [start] - index to start filling the array at. If start is negative, it is treated as 509061847f8eSopenharmony_ci * length+start where length is the length of the array. 509161847f8eSopenharmony_ci * @param { number } [end] - index to stop filling the array at. If end is negative, it is treated as 509261847f8eSopenharmony_ci * length+end. 509361847f8eSopenharmony_ci * @returns { Float32Array } The array itself. 509461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 509561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The fill method cannot be bound. 509661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 509761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 509861847f8eSopenharmony_ci * @atomicservice 509961847f8eSopenharmony_ci * @since 12 510061847f8eSopenharmony_ci */ 510161847f8eSopenharmony_ci fill(value: number, start?: number, end?: number): Float32Array; 510261847f8eSopenharmony_ci /** 510361847f8eSopenharmony_ci * Returns the elements of an array that meet the condition specified in a callback function. 510461847f8eSopenharmony_ci * 510561847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Float32Array> } predicate - A function 510661847f8eSopenharmony_ci * that accepts up to three arguments. 510761847f8eSopenharmony_ci * The filter method calls the predicate function one time for each element in the array. 510861847f8eSopenharmony_ci * @returns { Float32Array } The array itself. 510961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 511061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The filter method cannot be bound. 511161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 511261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 511361847f8eSopenharmony_ci * @atomicservice 511461847f8eSopenharmony_ci * @since 12 511561847f8eSopenharmony_ci */ 511661847f8eSopenharmony_ci filter(predicate: TypedArrayPredicateFn<number, Float32Array>): Float32Array; 511761847f8eSopenharmony_ci /** 511861847f8eSopenharmony_ci * Returns the value of the first element in the array where predicate is true, and undefined 511961847f8eSopenharmony_ci * otherwise. 512061847f8eSopenharmony_ci * 512161847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Float32Array> } predicate - find calls predicate once for 512261847f8eSopenharmony_ci * each element of the array, in ascending order, until it finds one where predicate returns true. 512361847f8eSopenharmony_ci * If such an element is found, find immediately returns that element value. Otherwise, find returns undefined. 512461847f8eSopenharmony_ci * @returns { number | undefined } The first element in the typed array 512561847f8eSopenharmony_ci * that satisfies the provided testing function. Otherwise, undefined is returned. 512661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 512761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The find method cannot be bound. 512861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 512961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 513061847f8eSopenharmony_ci * @atomicservice 513161847f8eSopenharmony_ci * @since 12 513261847f8eSopenharmony_ci */ 513361847f8eSopenharmony_ci find(predicate: TypedArrayPredicateFn<number, Float32Array>): number | undefined; 513461847f8eSopenharmony_ci /** 513561847f8eSopenharmony_ci * Returns the index of the first element in the array where predicate is true, and -1 513661847f8eSopenharmony_ci * otherwise. 513761847f8eSopenharmony_ci * 513861847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Float32Array> } predicate - find calls predicate once for 513961847f8eSopenharmony_ci * each element of the array, in ascending order, until it finds one where predicate returns true. 514061847f8eSopenharmony_ci * If such an element is found, findIndex immediately returns that element index. 514161847f8eSopenharmony_ci * Otherwise, findIndex returns -1. 514261847f8eSopenharmony_ci * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1. 514361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 514461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The findIndex method cannot be bound. 514561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 514661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 514761847f8eSopenharmony_ci * @atomicservice 514861847f8eSopenharmony_ci * @since 12 514961847f8eSopenharmony_ci */ 515061847f8eSopenharmony_ci findIndex(predicate: TypedArrayPredicateFn<number, Float32Array>): number; 515161847f8eSopenharmony_ci /** 515261847f8eSopenharmony_ci * Performs the specified action for each element in an array. 515361847f8eSopenharmony_ci * 515461847f8eSopenharmony_ci * @param { TypedArrayForEachCallback<number, Float32Array> } callbackFn - A function that 515561847f8eSopenharmony_ci * accepts up to three arguments. 515661847f8eSopenharmony_ci * forEach calls the callbackfn function one time for each element in the array. 515761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 515861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The forEach method cannot be bound. 515961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 516061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 516161847f8eSopenharmony_ci * @atomicservice 516261847f8eSopenharmony_ci * @since 12 516361847f8eSopenharmony_ci */ 516461847f8eSopenharmony_ci forEach(callbackFn: TypedArrayForEachCallback<number, Float32Array>): void; 516561847f8eSopenharmony_ci /** 516661847f8eSopenharmony_ci * Returns the index of the first occurrence of a value in an array. 516761847f8eSopenharmony_ci * 516861847f8eSopenharmony_ci * @param { number } searchElement - The value to locate in the array. 516961847f8eSopenharmony_ci * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the 517061847f8eSopenharmony_ci * search starts at index 0. 517161847f8eSopenharmony_ci * @returns { number } The first index of searchElement in the typed array; -1 if not found. 517261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 517361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The indexOf method cannot be bound. 517461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 517561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 517661847f8eSopenharmony_ci * @atomicservice 517761847f8eSopenharmony_ci * @since 12 517861847f8eSopenharmony_ci */ 517961847f8eSopenharmony_ci indexOf(searchElement: number, fromIndex?: number): number; 518061847f8eSopenharmony_ci /** 518161847f8eSopenharmony_ci * Adds all the elements of an array separated by the specified separator string. 518261847f8eSopenharmony_ci * @param { string } [separator] - A string used to separate one element of an array from the next in the 518361847f8eSopenharmony_ci * resulting String. If omitted, the array elements are separated with a comma. 518461847f8eSopenharmony_ci * @returns { string } A string with all typed array elements joined. 518561847f8eSopenharmony_ci * If array.length is 0, the empty string is returned. 518661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 518761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The join method cannot be bound. 518861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 518961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 519061847f8eSopenharmony_ci * @atomicservice 519161847f8eSopenharmony_ci * @since 12 519261847f8eSopenharmony_ci */ 519361847f8eSopenharmony_ci join(separator?: string): string; 519461847f8eSopenharmony_ci /** 519561847f8eSopenharmony_ci * Calls a defined callback function on each element of an array, and returns an array that 519661847f8eSopenharmony_ci * contains the results. 519761847f8eSopenharmony_ci * 519861847f8eSopenharmony_ci * @param { TypedArrayMapCallback<number, Float32Array> } callbackFn - A function that 519961847f8eSopenharmony_ci * accepts up to three arguments. 520061847f8eSopenharmony_ci * The map method calls the callbackfn function one time for each element in the array. 520161847f8eSopenharmony_ci * @returns { Float32Array } The array itself. 520261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 520361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The map method cannot be bound. 520461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 520561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 520661847f8eSopenharmony_ci * @atomicservice 520761847f8eSopenharmony_ci * @since 12 520861847f8eSopenharmony_ci */ 520961847f8eSopenharmony_ci map(callbackFn: TypedArrayMapCallback<number, Float32Array>): Float32Array; 521061847f8eSopenharmony_ci /** 521161847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 521261847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 521361847f8eSopenharmony_ci * call to the callback function. 521461847f8eSopenharmony_ci * 521561847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<number, number, Float32Array> } callbackFn - A function that 521661847f8eSopenharmony_ci * accepts up to four arguments. 521761847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 521861847f8eSopenharmony_ci * @returns { number } The value that results from running the "reducer" callback function to 521961847f8eSopenharmony_ci * completion over the entire typed array. 522061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 522161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 522261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 522361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 522461847f8eSopenharmony_ci * @atomicservice 522561847f8eSopenharmony_ci * @since 12 522661847f8eSopenharmony_ci */ 522761847f8eSopenharmony_ci reduce(callbackFn: TypedArrayReduceCallback<number, number, Float32Array>): number; 522861847f8eSopenharmony_ci /** 522961847f8eSopenharmony_ci * Calls the specified callback function for all the elements in an array. The return value of 523061847f8eSopenharmony_ci * the callback function is the accumulated result, and is provided as an argument in the next 523161847f8eSopenharmony_ci * call to the callback function. 523261847f8eSopenharmony_ci * 523361847f8eSopenharmony_ci * @param { TypedArrayReduceCallback<U, number, Float32Array> } callbackFn - A function that 523461847f8eSopenharmony_ci * accepts up to four arguments. 523561847f8eSopenharmony_ci * The reduce method calls the callbackfn function one time for each element in the array. 523661847f8eSopenharmony_ci * @param { U } initialValue - If initialValue is specified, it is used as the initial value to start 523761847f8eSopenharmony_ci * the accumulation. The first call to the callbackfn function provides this value as an argument 523861847f8eSopenharmony_ci * instead of an array value. 523961847f8eSopenharmony_ci * @returns { U } The value that results from running the "reducer" callback function to 524061847f8eSopenharmony_ci * completion over the entire typed array. 524161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 524261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reduce method cannot be bound. 524361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 524461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 524561847f8eSopenharmony_ci * @atomicservice 524661847f8eSopenharmony_ci * @since 12 524761847f8eSopenharmony_ci */ 524861847f8eSopenharmony_ci reduce<U = number>(callbackFn: TypedArrayReduceCallback<U, number, Float32Array>, initialValue: U): U; 524961847f8eSopenharmony_ci /** 525061847f8eSopenharmony_ci * Reverses the elements in an Array. 525161847f8eSopenharmony_ci * 525261847f8eSopenharmony_ci * @returns { Float32Array } The reference to the original typed array, now reversed. 525361847f8eSopenharmony_ci * <br>Note that the typed array is reversed in place, and no copy is made. 525461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The reverse method cannot be bound. 525561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 525661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 525761847f8eSopenharmony_ci * @atomicservice 525861847f8eSopenharmony_ci * @since 12 525961847f8eSopenharmony_ci */ 526061847f8eSopenharmony_ci reverse(): Float32Array; 526161847f8eSopenharmony_ci /** 526261847f8eSopenharmony_ci * Sets a value or an array of values. 526361847f8eSopenharmony_ci * 526461847f8eSopenharmony_ci * @param { ArrayLike<number> } array - A typed or untyped array of values to set. 526561847f8eSopenharmony_ci * @param { number } [offset] - The index in the current array at which the values are to be written. 526661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 526761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The set method cannot be bound. 526861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 526961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 527061847f8eSopenharmony_ci * @atomicservice 527161847f8eSopenharmony_ci * @since 12 527261847f8eSopenharmony_ci */ 527361847f8eSopenharmony_ci set(array: ArrayLike<number>, offset?: number): void; 527461847f8eSopenharmony_ci /** 527561847f8eSopenharmony_ci * Returns a section of an array. 527661847f8eSopenharmony_ci * 527761847f8eSopenharmony_ci * @param { number } [start] - The beginning of the specified portion of the array. 527861847f8eSopenharmony_ci * @param { number } [end] - The end of the specified portion of the array. 527961847f8eSopenharmony_ci * This is exclusive of the element at the index 'end'. 528061847f8eSopenharmony_ci * @returns { Float32Array } A new typed array containing the extracted elements. 528161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 528261847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The slice method cannot be bound. 528361847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 528461847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 528561847f8eSopenharmony_ci * @atomicservice 528661847f8eSopenharmony_ci * @since 12 528761847f8eSopenharmony_ci */ 528861847f8eSopenharmony_ci slice(start?: number, end?: number): Float32Array; 528961847f8eSopenharmony_ci /** 529061847f8eSopenharmony_ci * Determines whether the specified callback function returns true for any element of an array. 529161847f8eSopenharmony_ci * 529261847f8eSopenharmony_ci * @param { TypedArrayPredicateFn<number, Float32Array> } predicate - A function 529361847f8eSopenharmony_ci * that accepts up to three arguments. 529461847f8eSopenharmony_ci * The some method calls the predicate function for each element in the array until 529561847f8eSopenharmony_ci * the predicate returns a value which is coercible to the Boolean value true, or until the end of the array. 529661847f8eSopenharmony_ci * @returns { boolean } false unless predicate returns a truthy value for a typed array element, 529761847f8eSopenharmony_ci * in which case true is immediately returned. 529861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 529961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The some method cannot be bound. 530061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 530161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 530261847f8eSopenharmony_ci * @atomicservice 530361847f8eSopenharmony_ci * @since 12 530461847f8eSopenharmony_ci */ 530561847f8eSopenharmony_ci some(predicate: TypedArrayPredicateFn<number, Float32Array>): boolean; 530661847f8eSopenharmony_ci /** 530761847f8eSopenharmony_ci * Sorts an array. 530861847f8eSopenharmony_ci * 530961847f8eSopenharmony_ci * @param { TypedArrayCompareFn<number> } [compareFn] - Function used to determine the order of the elements. 531061847f8eSopenharmony_ci * It is expected to return a negative value if first argument is less than second argument, 531161847f8eSopenharmony_ci * zero if they're equal and a positive value otherwise. 531261847f8eSopenharmony_ci * If omitted, the elements are sorted in ascending, ASCII character order. 531361847f8eSopenharmony_ci * @returns { Float32Array } The reference to the original typed array, now sorted. 531461847f8eSopenharmony_ci * Note that the typed array is sorted in place and no copy is made. 531561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 531661847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The sort method cannot be bound. 531761847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 531861847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 531961847f8eSopenharmony_ci * @atomicservice 532061847f8eSopenharmony_ci * @since 12 532161847f8eSopenharmony_ci */ 532261847f8eSopenharmony_ci sort(compareFn?: TypedArrayCompareFn<number>): Float32Array; 532361847f8eSopenharmony_ci /** 532461847f8eSopenharmony_ci * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements 532561847f8eSopenharmony_ci * at begin, inclusive, up to end, exclusive. 532661847f8eSopenharmony_ci * 532761847f8eSopenharmony_ci * @param { number } [begin] - The index of the beginning of the array. 532861847f8eSopenharmony_ci * @param { number } [end] - The index of the end of the array. 532961847f8eSopenharmony_ci * @returns { Float32Array } A new Float32Array object. 533061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 533161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The subarray method cannot be bound. 533261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 533361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 533461847f8eSopenharmony_ci * @atomicservice 533561847f8eSopenharmony_ci * @since 12 533661847f8eSopenharmony_ci */ 533761847f8eSopenharmony_ci subarray(begin?: number, end?: number): Float32Array; 533861847f8eSopenharmony_ci /** 533961847f8eSopenharmony_ci * Returns the item located at the specified index. 534061847f8eSopenharmony_ci * 534161847f8eSopenharmony_ci * @param { number } index - The zero-based index of the desired code unit.<br/> 534261847f8eSopenharmony_ci * A negative index will count back from the last item. 534361847f8eSopenharmony_ci * @returns { number | undefined } The element in the array matching the given index.<br/> 534461847f8eSopenharmony_ci * Always returns undefined if index < -array.length or 534561847f8eSopenharmony_ci * index >= array.length without attempting to access the corresponding property. 534661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 534761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The at method cannot be bound. 534861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 534961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 535061847f8eSopenharmony_ci * @atomicservice 535161847f8eSopenharmony_ci * @since 12 535261847f8eSopenharmony_ci */ 535361847f8eSopenharmony_ci at(index: number): number | undefined; 535461847f8eSopenharmony_ci /** 535561847f8eSopenharmony_ci * Returns an iterator that iterates over numbers. 535661847f8eSopenharmony_ci * 535761847f8eSopenharmony_ci * @returns { IterableIterator<number> } Iterator object that yields numbers. 535861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. 535961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 536061847f8eSopenharmony_ci * @atomicservice 536161847f8eSopenharmony_ci * @since 12 536261847f8eSopenharmony_ci */ 536361847f8eSopenharmony_ci [Symbol.iterator](): IterableIterator<number>; 536461847f8eSopenharmony_ci /** 536561847f8eSopenharmony_ci * Returns an iterable of key, value pairs for every entry in the array 536661847f8eSopenharmony_ci * 536761847f8eSopenharmony_ci * @returns { IterableIterator<[number, number]> } A new iterable iterator object. 536861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 536961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 537061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 537161847f8eSopenharmony_ci * @atomicservice 537261847f8eSopenharmony_ci * @since 12 537361847f8eSopenharmony_ci */ 537461847f8eSopenharmony_ci entries(): IterableIterator<[number, number]>; 537561847f8eSopenharmony_ci /** 537661847f8eSopenharmony_ci * Returns an iterable of keys in the array 537761847f8eSopenharmony_ci * 537861847f8eSopenharmony_ci * @returns { IterableIterator<number> } A new iterable iterator object. 537961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 538061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 538161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 538261847f8eSopenharmony_ci * @atomicservice 538361847f8eSopenharmony_ci * @since 12 538461847f8eSopenharmony_ci */ 538561847f8eSopenharmony_ci keys(): IterableIterator<number>; 538661847f8eSopenharmony_ci /** 538761847f8eSopenharmony_ci * Returns an iterable of values in the array 538861847f8eSopenharmony_ci * 538961847f8eSopenharmony_ci * @returns { IterableIterator<number> } A new iterable iterator object. 539061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The method cannot be bound. 539161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 539261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 539361847f8eSopenharmony_ci * @atomicservice 539461847f8eSopenharmony_ci * @since 12 539561847f8eSopenharmony_ci */ 539661847f8eSopenharmony_ci values(): IterableIterator<number>; 539761847f8eSopenharmony_ci /** 539861847f8eSopenharmony_ci * Determines whether an array includes a certain element, returning true or false as appropriate. 539961847f8eSopenharmony_ci * 540061847f8eSopenharmony_ci * @param { number } searchElement - The element to search for. 540161847f8eSopenharmony_ci * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement. 540261847f8eSopenharmony_ci * @returns { boolean } A boolean value which is true if the value searchElement is found <br/> 540361847f8eSopenharmony_ci * within the typed array (or the part of the typed array indicated by the index fromIndex, if specified). 540461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 540561847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The at method cannot be bound. 540661847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 540761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 540861847f8eSopenharmony_ci * @atomicservice 540961847f8eSopenharmony_ci * @since 12 541061847f8eSopenharmony_ci */ 541161847f8eSopenharmony_ci includes(searchElement: number, fromIndex?: number): boolean; 541261847f8eSopenharmony_ci /** 541361847f8eSopenharmony_ci * Returns the item at that index. 541461847f8eSopenharmony_ci * 541561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 541661847f8eSopenharmony_ci * @atomicservice 541761847f8eSopenharmony_ci * @since 12 541861847f8eSopenharmony_ci */ 541961847f8eSopenharmony_ci [index: number]: number; 542061847f8eSopenharmony_ci } 542161847f8eSopenharmony_ci /** 542261847f8eSopenharmony_ci * An ordered collections of bit values, which are either 0 or 1. 542361847f8eSopenharmony_ci * If multiple threads access a BitVector instance concurrently, 542461847f8eSopenharmony_ci * and at least one of the threads modifies the array structurally, 542561847f8eSopenharmony_ci * it must be synchronized externally. 542661847f8eSopenharmony_ci * 542761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 542861847f8eSopenharmony_ci * @atomicservice 542961847f8eSopenharmony_ci * @since 12 543061847f8eSopenharmony_ci */ 543161847f8eSopenharmony_ci @Sendable 543261847f8eSopenharmony_ci class BitVector { 543361847f8eSopenharmony_ci /** 543461847f8eSopenharmony_ci * A constructor used to create a BitVector object. 543561847f8eSopenharmony_ci * 543661847f8eSopenharmony_ci * @param { number } length - The length of BitVector object. 543761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 543861847f8eSopenharmony_ci * @atomicservice 543961847f8eSopenharmony_ci * @since 12 544061847f8eSopenharmony_ci */ 544161847f8eSopenharmony_ci constructor(length: number); 544261847f8eSopenharmony_ci /** 544361847f8eSopenharmony_ci * Gets the element number of the BitVector. This is a number one higher than the highest index in the bit vector. 544461847f8eSopenharmony_ci * It can be changed by resize(). 544561847f8eSopenharmony_ci * 544661847f8eSopenharmony_ci * @readonly 544761847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 544861847f8eSopenharmony_ci * @atomicservice 544961847f8eSopenharmony_ci * @since 12 545061847f8eSopenharmony_ci */ 545161847f8eSopenharmony_ci readonly length: number; 545261847f8eSopenharmony_ci /** 545361847f8eSopenharmony_ci * Appends the bit element to the end of this bit vector. 545461847f8eSopenharmony_ci * 545561847f8eSopenharmony_ci * @param { number } element - Element to be appended to this bit vector (0 means 0, else means 1). 545661847f8eSopenharmony_ci * @returns { boolean } The boolean type, returns true if the addition is successful, and returns false if it fails. 545761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 545861847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified. 545961847f8eSopenharmony_ci * 2.Incorrect parameter types. 546061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The push method cannot be bound. 546161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 546261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 546361847f8eSopenharmony_ci * @atomicservice 546461847f8eSopenharmony_ci * @since 12 546561847f8eSopenharmony_ci */ 546661847f8eSopenharmony_ci push(element: number): boolean; 546761847f8eSopenharmony_ci /** 546861847f8eSopenharmony_ci * Retrieves and removes the bit element to the end of this bit vector. 546961847f8eSopenharmony_ci * 547061847f8eSopenharmony_ci * @returns { number } The boolean type, if the bit push successfully, return true, else return false. 547161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The pop method cannot be bound. 547261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 547361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 547461847f8eSopenharmony_ci * @atomicservice 547561847f8eSopenharmony_ci * @since 12 547661847f8eSopenharmony_ci */ 547761847f8eSopenharmony_ci pop(): number; 547861847f8eSopenharmony_ci /** 547961847f8eSopenharmony_ci * Check if bit vector contains a particular bit element. 548061847f8eSopenharmony_ci * 548161847f8eSopenharmony_ci * @param { number } element - Element to be contained (0 means 0, else means 1). 548261847f8eSopenharmony_ci * @param { number } fromIndex - The starting position of the index, containing the value at that index position. 548361847f8eSopenharmony_ci * @param { number } toIndex - The end of the index, containing the value at that index. 548461847f8eSopenharmony_ci * @returns { boolean } The boolean type, if bit vector contains the specified element, return true, 548561847f8eSopenharmony_ci else return false. 548661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 548761847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified. 548861847f8eSopenharmony_ci * 2.Incorrect parameter types. 548961847f8eSopenharmony_ci * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range. 549061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The has method cannot be bound. 549161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 549261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 549361847f8eSopenharmony_ci * @atomicservice 549461847f8eSopenharmony_ci * @since 12 549561847f8eSopenharmony_ci */ 549661847f8eSopenharmony_ci has(element: number, fromIndex: number, toIndex: number): boolean; 549761847f8eSopenharmony_ci /** 549861847f8eSopenharmony_ci * Sets a range of bits in a bit vector to a particular element. 549961847f8eSopenharmony_ci * 550061847f8eSopenharmony_ci * @param { number } element - Element to be set (0 means 0, else means 1). 550161847f8eSopenharmony_ci * @param { number } fromIndex - The starting position of the index, containing the value at that index position. 550261847f8eSopenharmony_ci * @param { number } toIndex - The end of the index, excluding the value at that index. 550361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 550461847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified. 550561847f8eSopenharmony_ci * 2.Incorrect parameter types. 550661847f8eSopenharmony_ci * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range. 550761847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The setBitsByRange method cannot be bound. 550861847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 550961847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 551061847f8eSopenharmony_ci * @atomicservice 551161847f8eSopenharmony_ci * @since 12 551261847f8eSopenharmony_ci */ 551361847f8eSopenharmony_ci setBitsByRange(element: number, fromIndex: number, toIndex: number): void; 551461847f8eSopenharmony_ci /** 551561847f8eSopenharmony_ci * Sets all of bits in a bit vector to a particular element. 551661847f8eSopenharmony_ci * 551761847f8eSopenharmony_ci * @param { number } element - Element to be set (0 means 0, else means 1). 551861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 551961847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified. 552061847f8eSopenharmony_ci * 2.Incorrect parameter types. 552161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The setAllBits method cannot be bound. 552261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 552361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 552461847f8eSopenharmony_ci * @atomicservice 552561847f8eSopenharmony_ci * @since 12 552661847f8eSopenharmony_ci */ 552761847f8eSopenharmony_ci setAllBits(element: number): void; 552861847f8eSopenharmony_ci /** 552961847f8eSopenharmony_ci * Returns the bit values in a range of indices in a bit vector. 553061847f8eSopenharmony_ci * 553161847f8eSopenharmony_ci * @param { number } fromIndex - The starting position of the index, containing the value at that index position. 553261847f8eSopenharmony_ci * @param { number } toIndex - The end of the index, excluding the value at that index. 553361847f8eSopenharmony_ci * @returns { BitVector } The BitVector type, returns the bit values in a range of indices in a bit vector. 553461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 553561847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified. 553661847f8eSopenharmony_ci * 2.Incorrect parameter types. 553761847f8eSopenharmony_ci * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range. 553861847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The getBitsByRange method cannot be bound. 553961847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 554061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 554161847f8eSopenharmony_ci * @atomicservice 554261847f8eSopenharmony_ci * @since 12 554361847f8eSopenharmony_ci */ 554461847f8eSopenharmony_ci getBitsByRange(fromIndex: number, toIndex: number): BitVector; 554561847f8eSopenharmony_ci /** 554661847f8eSopenharmony_ci * Resize the bitVector's length. 554761847f8eSopenharmony_ci * 554861847f8eSopenharmony_ci * @param { number } size - The new size for bitVector. If count is greater than the current size of bitVector, 554961847f8eSopenharmony_ci * the additional bit elements are set to 0. 555061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 555161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified. 555261847f8eSopenharmony_ci * 2.Incorrect parameter types. 555361847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The resize method cannot be bound. 555461847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 555561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 555661847f8eSopenharmony_ci * @atomicservice 555761847f8eSopenharmony_ci * @since 12 555861847f8eSopenharmony_ci */ 555961847f8eSopenharmony_ci resize(size: number): void; 556061847f8eSopenharmony_ci /** 556161847f8eSopenharmony_ci * Counts the number of times a certain bit element occurs within a range of bits in a bit vector. 556261847f8eSopenharmony_ci * 556361847f8eSopenharmony_ci * @param { number } element - Element to be counted (0 means 0, else means 1). 556461847f8eSopenharmony_ci * @param { number } fromIndex - The starting position of the index, containing the value at that index position. 556561847f8eSopenharmony_ci * @param { number } toIndex - The end of the index, excluding the value at that index. 556661847f8eSopenharmony_ci * @returns { number } The number type, return the number of times a certain bit element 556761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 556861847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified. 556961847f8eSopenharmony_ci * 2.Incorrect parameter types. 557061847f8eSopenharmony_ci * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range. 557161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The getBitCountByRange method cannot be bound. 557261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 557361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 557461847f8eSopenharmony_ci * @atomicservice 557561847f8eSopenharmony_ci * @since 12 557661847f8eSopenharmony_ci */ 557761847f8eSopenharmony_ci getBitCountByRange(element: number, fromIndex: number, toIndex: number): number; 557861847f8eSopenharmony_ci /** 557961847f8eSopenharmony_ci * Locates the first occurrence of a certain bit value within a range of bits in a bit vector. 558061847f8eSopenharmony_ci * 558161847f8eSopenharmony_ci * @param { number } element - Element to be Located (0 means 0, else means 1). 558261847f8eSopenharmony_ci * @param { number } fromIndex - The starting position of the index, containing the value at that index position. 558361847f8eSopenharmony_ci * @param { number } toIndex - The end of the index, excluding the value at that index. 558461847f8eSopenharmony_ci * @returns { number } The number type, return the first index of specified bit within a range, 558561847f8eSopenharmony_ci * or -1 if this range of the bitVector does not contain the element. 558661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 558761847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified. 558861847f8eSopenharmony_ci * 2.Incorrect parameter types. 558961847f8eSopenharmony_ci * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range. 559061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The getIndexOf method cannot be bound. 559161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 559261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 559361847f8eSopenharmony_ci * @atomicservice 559461847f8eSopenharmony_ci * @since 12 559561847f8eSopenharmony_ci */ 559661847f8eSopenharmony_ci getIndexOf(element: number, fromIndex: number, toIndex: number): number; 559761847f8eSopenharmony_ci /** 559861847f8eSopenharmony_ci * Locates the last occurrence of a certain bit value within a range of bits in a bit vector. 559961847f8eSopenharmony_ci * 560061847f8eSopenharmony_ci * @param { number } element - Element to be Located (0 means 0, else means 1). 560161847f8eSopenharmony_ci * @param { number } fromIndex - The starting position of the index, containing the value at that index position. 560261847f8eSopenharmony_ci * @param { number } toIndex - The end of the index, excluding the value at that index. 560361847f8eSopenharmony_ci * @returns { number } The number type, return the last index of specified bit within a range, 560461847f8eSopenharmony_ci * or -1 if this range of the bitVector does not contain the element. 560561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 560661847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified. 560761847f8eSopenharmony_ci * 2.Incorrect parameter types. 560861847f8eSopenharmony_ci * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range. 560961847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The getLastIndexOf method cannot be bound. 561061847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 561161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 561261847f8eSopenharmony_ci * @atomicservice 561361847f8eSopenharmony_ci * @since 12 561461847f8eSopenharmony_ci */ 561561847f8eSopenharmony_ci getLastIndexOf(element: number, fromIndex: number, toIndex: number): number; 561661847f8eSopenharmony_ci /** 561761847f8eSopenharmony_ci * Flips the bit value by index in a bit vector.(Flip 0 to 1, flip 1 to 0) 561861847f8eSopenharmony_ci * 561961847f8eSopenharmony_ci * @param { number } index - The index in the bit vector. 562061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 562161847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified. 562261847f8eSopenharmony_ci * 2.Incorrect parameter types. 562361847f8eSopenharmony_ci * @throws { BusinessError } 10200001 - The value of index is out of range. 562461847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The flipBitByIndex method cannot be bound. 562561847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 562661847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 562761847f8eSopenharmony_ci * @atomicservice 562861847f8eSopenharmony_ci * @since 12 562961847f8eSopenharmony_ci */ 563061847f8eSopenharmony_ci flipBitByIndex(index: number): void; 563161847f8eSopenharmony_ci /** 563261847f8eSopenharmony_ci * Flips a range of bit values in a bit vector.(Flip 0 to 1, flip 1 to 0). 563361847f8eSopenharmony_ci * 563461847f8eSopenharmony_ci * @param { number } fromIndex - The starting position of the index, containing the value at that index position. 563561847f8eSopenharmony_ci * @param { number } toIndex - The end of the index, excluding the value at that index. 563661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 563761847f8eSopenharmony_ci * 1.Mandatory parameters are left unspecified. 563861847f8eSopenharmony_ci * 2.Incorrect parameter types. 563961847f8eSopenharmony_ci * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range. 564061847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The flipBitsByRange method cannot be bound. 564161847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 564261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 564361847f8eSopenharmony_ci * @atomicservice 564461847f8eSopenharmony_ci * @since 12 564561847f8eSopenharmony_ci */ 564661847f8eSopenharmony_ci flipBitsByRange(fromIndex: number, toIndex: number): void; 564761847f8eSopenharmony_ci /** 564861847f8eSopenharmony_ci * Returns an iterator that iterates over bit vector. 564961847f8eSopenharmony_ci * 565061847f8eSopenharmony_ci * @returns { IterableIterator<number> } A new iterable iterator object. 565161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. 565261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 565361847f8eSopenharmony_ci * @atomicservice 565461847f8eSopenharmony_ci * @since 12 565561847f8eSopenharmony_ci */ 565661847f8eSopenharmony_ci [Symbol.iterator](): IterableIterator<number>; 565761847f8eSopenharmony_ci /** 565861847f8eSopenharmony_ci * Returns an iterable of values in the bit vector 565961847f8eSopenharmony_ci * 566061847f8eSopenharmony_ci * @returns { IterableIterator<number> } A new iterable iterator object. 566161847f8eSopenharmony_ci * @throws { BusinessError } 10200011 - The values method cannot be bound. 566261847f8eSopenharmony_ci * @throws { BusinessError } 10200201 - Concurrent modification error. 566361847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 566461847f8eSopenharmony_ci * @atomicservice 566561847f8eSopenharmony_ci * @since 12 566661847f8eSopenharmony_ci */ 566761847f8eSopenharmony_ci values(): IterableIterator<number>; 566861847f8eSopenharmony_ci /** 566961847f8eSopenharmony_ci * Returns the item at that index. 567061847f8eSopenharmony_ci * 567161847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang 567261847f8eSopenharmony_ci * @atomicservice 567361847f8eSopenharmony_ci * @since 12 567461847f8eSopenharmony_ci */ 567561847f8eSopenharmony_ci [index: number]: number; 567661847f8eSopenharmony_ci } 567761847f8eSopenharmony_ci} 567861847f8eSopenharmony_ci 567961847f8eSopenharmony_ciexport default collections;