diff --git a/arkts/@arkts.collections.d.ets b/arkts/@arkts.collections.d.ets index 926792874631733e85fe0020e0418ae4784fa10b..88d030737b34c95e4c143d3a04de49bb988be074 100644 --- a/arkts/@arkts.collections.d.ets +++ b/arkts/@arkts.collections.d.ets @@ -3808,7 +3808,7 @@ declare namespace collections { static from(arrayLike: ArrayLike): Uint8ClampedArray; /** - * Creates an Uint8ClampedArray from an array-like object. + * Creates an ArkTS Uint8ClampedArray from an array-like object. * * @param { ArrayLike } arrayLike - Array-like object used to construct the ArkTS Uint8ClampedArray. * @param { TypedArrayFromMapFn } mapFn - A mapping function to call on every element of the array. @@ -3834,7 +3834,7 @@ declare namespace collections { */ static from(arrayLike: ArrayLike, mapFn: TypedArrayFromMapFn): Uint8ClampedArray; /** - * Creates an Uint8ClampedArray from an iterable object. + * Creates an ArkTS Uint8ClampedArray from an iterator object. * * @param { Iterable } arrayLike - Iterator object used to construct the ArkTS Uint8ClampedArray. * @param { TypedArrayFromMapFn } [mapFn] - Mapping function. If no value is passed in, @@ -3970,12 +3970,12 @@ declare namespace collections { */ fill(value: number, start?: number, end?: number): Uint8ClampedArray; /** - * Returns the elements of an array that meet the condition specified in a callback function. + * Returns a new ArkTS Uint8ClampedArray that contains all elements that meet the given condition. * * @param { TypedArrayPredicateFn } predicate - A function * that accepts up to three arguments. * The filter method calls the predicate function one time for each element in the array. - * @returns { Uint8ClampedArray } The array itself. + * @returns { Uint8ClampedArray } Filtered ArkTS Uint8ClampedArray. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The filter method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -3984,12 +3984,12 @@ declare namespace collections { * @since 12 */ /** - * Returns the elements of an array that meet the condition specified in a callback function. + * Returns a new ArkTS Uint8ClampedArray that contains all elements that meet the given condition. * * @param { TypedArrayPredicateFn } predicate - A function * that accepts up to three arguments. * The filter method calls the predicate function one time for each element in the array. - * @returns { Uint8ClampedArray } The array itself. + * @returns { Uint8ClampedArray } Filtered ArkTS Uint8ClampedArray. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The filter method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4000,14 +4000,14 @@ declare namespace collections { */ filter(predicate: TypedArrayPredicateFn): Uint8ClampedArray; /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. + * Returns the value of the first element that passes a test provided by a callback function. + * If none of the elements pass the test, undefined is returned. * * @param { TypedArrayPredicateFn } predicate - find calls predicate once for * each element of the array, in ascending order, until it finds one where predicate returns true. * If such an element is found, find immediately returns that element value. Otherwise, find returns undefined. - * @returns { number | undefined } The first element in the typed array - * that satisfies the provided testing function. Otherwise, undefined is returned. + * @returns { number | undefined } Value of the first element that passes the test. + * If none of the elements pass the test, undefined is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The find method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4016,14 +4016,14 @@ declare namespace collections { * @since 12 */ /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. + * Returns the value of the first element that passes a test provided by a callback function. + * If none of the elements pass the test, undefined is returned. * * @param { TypedArrayPredicateFn } predicate - find calls predicate once for * each element of the array, in ascending order, until it finds one where predicate returns true. * If such an element is found, find immediately returns that element value. Otherwise, find returns undefined. - * @returns { number | undefined } The first element in the typed array - * that satisfies the provided testing function. Otherwise, undefined is returned. + * @returns { number | undefined } Value of the first element that passes the test. + * If none of the elements pass the test, undefined is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The find method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4034,14 +4034,15 @@ declare namespace collections { */ find(predicate: TypedArrayPredicateFn): number | undefined; /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. + * Returns the index of the first element that passes a test provided by a callback function. + * If none of the elements pass the test, -1 is returned. * * @param { TypedArrayPredicateFn } predicate - find calls predicate once for * each element of the array, in ascending order, until it finds one where predicate returns true. * If such an element is found, findIndex immediately returns that element index. * Otherwise, findIndex returns -1. - * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1. + * @returns { number } Index of the first element that passes the test. + * If none of the elements pass the test, -1 is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The findIndex method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4050,14 +4051,15 @@ declare namespace collections { * @since 12 */ /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. + * Returns the index of the first element that passes a test provided by a callback function. + * If none of the elements pass the test, -1 is returned. * * @param { TypedArrayPredicateFn } predicate - find calls predicate once for * each element of the array, in ascending order, until it finds one where predicate returns true. * If such an element is found, findIndex immediately returns that element index. * Otherwise, findIndex returns -1. - * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1. + * @returns { number } Index of the first element that passes the test. + * If none of the elements pass the test, -1 is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The findIndex method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4068,7 +4070,7 @@ declare namespace collections { */ findIndex(predicate: TypedArrayPredicateFn): number; /** - * Performs the specified action for each element in an array. + * Calls a callback function for each element in this ArkTS Uint8ClampedArray. * * @param { TypedArrayForEachCallback } callbackFn - A function that * accepts up to three arguments. @@ -4081,7 +4083,7 @@ declare namespace collections { * @since 12 */ /** - * Performs the specified action for each element in an array. + * Calls a callback function for each element in this ArkTS Uint8ClampedArray. * * @param { TypedArrayForEachCallback } callbackFn - A function that * accepts up to three arguments. @@ -4096,12 +4098,14 @@ declare namespace collections { */ forEach(callbackFn: TypedArrayForEachCallback): void; /** - * Returns the index of the first occurrence of a value in an array. + * Returns the index of the first occurrence of a value in this ArkTS Uint8ClampedArray. + * If the value is not found, -1 is returned. * - * @param { number } searchElement - The value to locate in the array. - * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - * @returns { number } The first index of searchElement in the typed array; -1 if not found. + * @param { number } searchElement - Value to search for. + * @param { number } [fromIndex] - Index from which the search starts. The default value is 0. + * If the index is greater than or equal to the length of the ArkTS Uint8ClampedArray, -1 is returned. + * If a negative number is passed in, the search starts from the end of the ArkTS Uint8ClampedArray. + * @returns { number } Index of the first occurrence of the value. If the value is not found, -1 is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The indexOf method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4110,12 +4114,14 @@ declare namespace collections { * @since 12 */ /** - * Returns the index of the first occurrence of a value in an array. + * Returns the index of the first occurrence of a value in this ArkTS Uint8ClampedArray. + * If the value is not found, -1 is returned. * - * @param { number } searchElement - The value to locate in the array. - * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - * @returns { number } The first index of searchElement in the typed array; -1 if not found. + * @param { number } searchElement - Value to search for. + * @param { number } [fromIndex] - Index from which the search starts. The default value is 0. + * If the index is greater than or equal to the length of the ArkTS Uint8ClampedArray, -1 is returned. + * If a negative number is passed in, the search starts from the end of the ArkTS Uint8ClampedArray. + * @returns { number } Index of the first occurrence of the value. If the value is not found, -1 is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The indexOf method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4126,11 +4132,10 @@ declare namespace collections { */ indexOf(searchElement: number, fromIndex?: number): number; /** - * Adds all the elements of an array separated by the specified separator string. - * @param { string } [separator] - A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - * @returns { string } A string with all typed array elements joined. - * If array.length is 0, the empty string is returned. + * Concatenates all elements in this ArkTS Uint8ClampedArray into a string, with a given separator. + * @param { string } [separator] - Separator to be used. + * If no value is passed in, a comma (,) is used as the separator. + * @returns { string } String obtained. If the array is empty, an empty string is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The join method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4139,11 +4144,10 @@ declare namespace collections { * @since 12 */ /** - * Adds all the elements of an array separated by the specified separator string. - * @param { string } [separator] - A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - * @returns { string } A string with all typed array elements joined. - * If array.length is 0, the empty string is returned. + * Concatenates all elements in this ArkTS Uint8ClampedArray into a string, with a given separator. + * @param { string } [separator] - Separator to be used. + * If no value is passed in, a comma (,) is used as the separator. + * @returns { string } String obtained. If the array is empty, an empty string is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The join method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4154,13 +4158,13 @@ declare namespace collections { */ join(separator?: string): string; /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. + * Applies a callback function to each element in this ArkTS Uint8ClampedArray + * and uses the result to create an ArkTS Uint8ClampedArray. * * @param { TypedArrayMapCallback } callbackFn - A function that * accepts up to three arguments. * The map method calls the callbackfn function one time for each element in the array. - * @returns { Uint8ClampedArray } The array itself. + * @returns { Uint8ClampedArray } New ArkTS Uint8ClampedArray generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The map method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4169,13 +4173,13 @@ declare namespace collections { * @since 12 */ /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. + * Applies a callback function to each element in this ArkTS Uint8ClampedArray + * and uses the result to create an ArkTS Uint8ClampedArray. * * @param { TypedArrayMapCallback } callbackFn - A function that * accepts up to three arguments. * The map method calls the callbackfn function one time for each element in the array. - * @returns { Uint8ClampedArray } The array itself. + * @returns { Uint8ClampedArray } New ArkTS Uint8ClampedArray generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The map method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4264,7 +4268,7 @@ declare namespace collections { */ reduce(callbackFn: TypedArrayReduceCallback, initialValue: U): U; /** - * Reverses the elements in an Array. + * Reverses this ArkTS Uint8ClampedArray. * * @returns { Uint8ClampedArray } The reference to the original typed array, now reversed. *
Note that the typed array is reversed in place, and no copy is made. @@ -4275,7 +4279,7 @@ declare namespace collections { * @since 12 */ /** - * Reverses the elements in an Array. + * Reverses this ArkTS Uint8ClampedArray. * * @returns { Uint8ClampedArray } The reference to the original typed array, now reversed. *
Note that the typed array is reversed in place, and no copy is made. @@ -4288,10 +4292,10 @@ declare namespace collections { */ reverse(): Uint8ClampedArray; /** - * Sets a value or an array of values. + * Writes the elements in an array-like object to the given start position in sequence. * - * @param { ArrayLike } array - A typed or untyped array of values to set. - * @param { number } [offset] - The index in the current array at which the values are to be written. + * @param { ArrayLike } array - Array-like object whose elements will be written. + * @param { number } [offset] - Start position for writing data. The default value is 0. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The set method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4300,10 +4304,10 @@ declare namespace collections { * @since 12 */ /** - * Sets a value or an array of values. + * Writes the elements in an array-like object to the given start position in sequence. * - * @param { ArrayLike } array - A typed or untyped array of values to set. - * @param { number } [offset] - The index in the current array at which the values are to be written. + * @param { ArrayLike } array - Array-like object whose elements will be written. + * @param { number } [offset] - Start position for writing data. The default value is 0. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The set method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4314,12 +4318,14 @@ declare namespace collections { */ set(array: ArrayLike, offset?: number): void; /** - * Returns a section of an array. + * Selects a range of elements in this ArkTS Uint8ClampedArray to create an ArkTS Uint8ClampedArray. * - * @param { number } [start] - The beginning of the specified portion of the array. - * @param { number } [end] - The end of the specified portion of the array. - * This is exclusive of the element at the index 'end'. - * @returns { Uint8ClampedArray } A new typed array containing the extracted elements. + * @param { number } [start] - Start index of the range. If a negative number is passed in, + * it refers to the index of start + Uint8ClampedArray.length. The default value is 0. + * @param { number } [end] - End index of the range (exclusive). If a negative number is passed in, + * it refers to the index of end + Uint8ClampedArray.length. + * The default value is the length of the ArkTS Uint8ClampedArray. + * @returns { Uint8ClampedArray } New ArkTS Uint8ClampedArray generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The slice method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4328,12 +4334,14 @@ declare namespace collections { * @since 12 */ /** - * Returns a section of an array. + * Selects a range of elements in this ArkTS Uint8ClampedArray to create an ArkTS Uint8ClampedArray. * - * @param { number } [start] - The beginning of the specified portion of the array. - * @param { number } [end] - The end of the specified portion of the array. - * This is exclusive of the element at the index 'end'. - * @returns { Uint8ClampedArray } A new typed array containing the extracted elements. + * @param { number } [start] - Start index of the range. If a negative number is passed in, + * it refers to the index of start + Uint8ClampedArray.length. The default value is 0. + * @param { number } [end] - End index of the range (exclusive). If a negative number is passed in, + * it refers to the index of end + Uint8ClampedArray.length. + * The default value is the length of the ArkTS Uint8ClampedArray. + * @returns { Uint8ClampedArray } New ArkTS Uint8ClampedArray generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The slice method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4344,14 +4352,14 @@ declare namespace collections { */ slice(start?: number, end?: number): Uint8ClampedArray; /** - * Determines whether the specified callback function returns true for any element of an array. + * Checks whether any element in this ArkTS Uint8ClampedArray meets a given condition. * * @param { TypedArrayPredicateFn } predicate - A function * that accepts up to three arguments. * The some method calls the predicate function for each element in the array until * the predicate returns a value which is coercible to the Boolean value true, or until the end of the array. - * @returns { boolean } false unless predicate returns a truthy value for a typed array element, - * in which case true is immediately returned. + * @returns { boolean } Check result. The value true is returned if an element meeting the given condition exists; + * otherwise, false is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The some method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4360,14 +4368,14 @@ declare namespace collections { * @since 12 */ /** - * Determines whether the specified callback function returns true for any element of an array. + * Checks whether any element in this ArkTS Uint8ClampedArray meets a given condition. * * @param { TypedArrayPredicateFn } predicate - A function * that accepts up to three arguments. * The some method calls the predicate function for each element in the array until * the predicate returns a value which is coercible to the Boolean value true, or until the end of the array. - * @returns { boolean } false unless predicate returns a truthy value for a typed array element, - * in which case true is immediately returned. + * @returns { boolean } Check result. The value true is returned if an element meeting the given condition exists; + * otherwise, false is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The some method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4378,7 +4386,7 @@ declare namespace collections { */ some(predicate: TypedArrayPredicateFn): boolean; /** - * Sorts an array. + * Sorts elements in this ArkTS Uint8ClampedArray and returns the sorted ArkTS Uint8ClampedArray. * * @param { TypedArrayCompareFn } [compareFn] - Function used to determine the order of the elements. * It is expected to return a negative value if first argument is less than second argument, @@ -4394,7 +4402,7 @@ declare namespace collections { * @since 12 */ /** - * Sorts an array. + * Sorts elements in this ArkTS Uint8ClampedArray and returns the sorted ArkTS Uint8ClampedArray. * * @param { TypedArrayCompareFn } [compareFn] - Function used to determine the order of the elements. * It is expected to return a negative value if first argument is less than second argument, @@ -4412,12 +4420,14 @@ declare namespace collections { */ sort(compareFn?: TypedArrayCompareFn): Uint8ClampedArray; /** - * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. + * Returns a new ArkTS Uint8ClampedArray based on the same ArkTS ArrayBuffer. * - * @param { number } [begin] - The index of the beginning of the array. - * @param { number } [end] - The index of the end of the array. - * @returns { Uint8ClampedArray } A new Uint8ClampedArray object. + * @param { number } [begin] - Start index of the range. If a negative number is passed in, + * it refers to the index of begin + Uint8ClampedArray.length. The default value is 0. + * @param { number } [end] - End index of the range (exclusive). If a negative number is passed in, + * it refers to the index of end + Uint8ClampedArray.length. + * The default value is the length of the ArkTS Uint8ClampedArray. + * @returns { Uint8ClampedArray } New ArkTS Uint8ClampedArray generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The subarray method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4426,12 +4436,14 @@ declare namespace collections { * @since 12 */ /** - * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. + * Returns a new ArkTS Uint8ClampedArray based on the same ArkTS ArrayBuffer. * - * @param { number } [begin] - The index of the beginning of the array. - * @param { number } [end] - The index of the end of the array. - * @returns { Uint8ClampedArray } A new Uint8ClampedArray object. + * @param { number } [begin] - Start index of the range. If a negative number is passed in, + * it refers to the index of begin + Uint8ClampedArray.length. The default value is 0. + * @param { number } [end] - End index of the range (exclusive). If a negative number is passed in, + * it refers to the index of end + Uint8ClampedArray.length. + * The default value is the length of the ArkTS Uint8ClampedArray. + * @returns { Uint8ClampedArray } New ArkTS Uint8ClampedArray generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The subarray method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4442,10 +4454,10 @@ declare namespace collections { */ subarray(begin?: number, end?: number): Uint8ClampedArray; /** - * Returns the item located at the specified index. + * Returns the element at the given index. If no element is found, undefined is returned. * - * @param { number } index - The zero-based index of the desired code unit.
- * A negative index will count back from the last item. + * @param { number } index - Index of the element. The index in an array always starts from 0 and is an integer. + * If a negative number is passed in, it refers to the index of index + Uint8ClampedArray.length. * @returns { number | undefined } The element in the array matching the given index.
* Always returns undefined if index < -array.length or * index >= array.length without attempting to access the corresponding property. @@ -4457,10 +4469,10 @@ declare namespace collections { * @since 12 */ /** - * Returns the item located at the specified index. + * Returns the element at the given index. If no element is found, undefined is returned. * - * @param { number } index - The zero-based index of the desired code unit.
- * A negative index will count back from the last item. + * @param { number } index - Index of the element. The index in an array always starts from 0 and is an integer. + * If a negative number is passed in, it refers to the index of index + Uint8ClampedArray.length. * @returns { number | undefined } The element in the array matching the given index.
* Always returns undefined if index < -array.length or * index >= array.length without attempting to access the corresponding property. @@ -4474,7 +4486,9 @@ declare namespace collections { */ at(index: number): number | undefined; /** - * Returns an iterator that iterates over numbers. + * Returns an iterator, each item of which is a JavaScript object. + * NOTE: + * This API cannot be used in .ets files. * * @returns { IterableIterator } Iterator object that yields numbers. * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. @@ -4483,7 +4497,9 @@ declare namespace collections { * @since 12 */ /** - * Returns an iterator that iterates over numbers. + * Returns an iterator, each item of which is a JavaScript object. + * NOTE: + * This API cannot be used in .ets files. * * @returns { IterableIterator } Iterator object that yields numbers. * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. @@ -4494,20 +4510,20 @@ declare namespace collections { */ [Symbol.iterator](): IterableIterator; /** - * Returns an iterable of key, value pairs for every entry in the array + * Returns an iterator object that contains the key-value pair of each element in this ArkTS Uint8ClampedArray. * * @returns { IterableIterator<[number, number]> } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The method cannot be bound. + * @throws { BusinessError } 10200011 - The entries method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Returns an iterable of key, value pairs for every entry in the array + * Returns an iterator object that contains the key-value pair of each element in this ArkTS Uint8ClampedArray. * * @returns { IterableIterator<[number, number]> } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The method cannot be bound. + * @throws { BusinessError } 10200011 - The entries method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -4516,20 +4532,20 @@ declare namespace collections { */ entries(): IterableIterator<[number, number]>; /** - * Returns an iterable of keys in the array + * Returns an iterator object that contains the key (index) of each element in this ArkTS Uint8ClampedArray. * * @returns { IterableIterator } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The method cannot be bound. + * @throws { BusinessError } 10200011 - The keys method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Returns an iterable of keys in the array + * Returns an iterator object that contains the key (index) of each element in this ArkTS Uint8ClampedArray. * * @returns { IterableIterator } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The method cannot be bound. + * @throws { BusinessError } 10200011 - The keys method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -4538,20 +4554,20 @@ declare namespace collections { */ keys(): IterableIterator; /** - * Returns an iterable of values in the array + * Returns an iterator object that contains the value of each element in this ArkTS Uint8ClampedArray. * * @returns { IterableIterator } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The method cannot be bound. + * @throws { BusinessError } 10200011 - The values method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Returns an iterable of values in the array + * Returns an iterator object that contains the value of each element in this ArkTS Uint8ClampedArray. * * @returns { IterableIterator } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The method cannot be bound. + * @throws { BusinessError } 10200011 - The values method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -4560,12 +4576,13 @@ declare namespace collections { */ values(): IterableIterator; /** - * Determines whether an array includes a certain element, returning true or false as appropriate. + * Checks whether elements are contained in this ArkTS Uint8ClampedArray. * - * @param { number } searchElement - The element to search for. - * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement. - * @returns { boolean } A boolean value which is true if the value searchElement is found
- * within the typed array (or the part of the typed array indicated by the index fromIndex, if specified). + * @param { number } searchElement - Element to search for. + * @param { number } [fromIndex] - Index from which the search starts. If a negative number is passed in, + * it refers to the index of fromIndex + Uint8ClampedArray.length. The default value is 0. + * @returns { boolean } Check result. The value true is returned if the element exists; + * otherwise, false is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The at method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4574,12 +4591,13 @@ declare namespace collections { * @since 12 */ /** - * Determines whether an array includes a certain element, returning true or false as appropriate. + * Checks whether elements are contained in this ArkTS Uint8ClampedArray. * - * @param { number } searchElement - The element to search for. - * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement. - * @returns { boolean } A boolean value which is true if the value searchElement is found
- * within the typed array (or the part of the typed array indicated by the index fromIndex, if specified). + * @param { number } searchElement - Element to search for. + * @param { number } [fromIndex] - Index from which the search starts. If a negative number is passed in, + * it refers to the index of fromIndex + Uint8ClampedArray.length. The default value is 0. + * @returns { boolean } Check result. The value true is returned if the element exists; + * otherwise, false is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The at method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -4590,14 +4608,14 @@ declare namespace collections { */ includes(searchElement: number, fromIndex?: number): boolean; /** - * Returns the item at that index. + * Returns the element at a given index in this Uint8ClampedArray. * * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Returns the item at that index. + * Returns the element at a given index in this Uint8ClampedArray. * * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -4606,11 +4624,12 @@ declare namespace collections { */ [index: number]: number; /** - * Find the last occurrence of a specified element in an Uint8ClampedArray. + * Obtains the index of the last occurrence of the specified value in this ArkTS Uint8ClampedArray. * * @param { number } searchElement - Element to search for in the Uint8ClampedArray.. - * @param { number } fromIndex - The index at which to start the search. If provided: - *
If this index is negative, it is treated as Uint8ClampedArray.length + fromIndex. + * @param { number } fromIndex - Index from which the search starts. The default value is 0. + * If the index is greater than or equal to the length of the ArkTS Uint8ClampedArray, -1 is returned. + * If a negative number is passed in, the search starts from the end of the ArkTS Uint8ClampedArray. * @returns { number } Returns the last index of the specified element if found; otherwise, returns -1. * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range. * @throws { BusinessError } 10200011 - The lastIndexOf method cannot be bound. @@ -4718,7 +4737,7 @@ declare namespace collections { @Sendable class Uint8Array { /** - * The size in bytes of each element in the array. + * Number of bytes occupied by each element in the ArkTS array. * * @type { number } * @readonly @@ -4728,7 +4747,7 @@ declare namespace collections { * @since 12 */ /** - * The size in bytes of each element in the array. + * Number of bytes occupied by each element in the ArkTS array. * * @type { number } * @readonly @@ -4740,7 +4759,7 @@ declare namespace collections { */ static readonly BYTES_PER_ELEMENT: number; /** - * The ArrayBuffer instance referenced by the array. + * Bottom-layer buffer used by an ArkTS array. * * @type { ArrayBuffer } * @readonly @@ -4749,7 +4768,7 @@ declare namespace collections { * @since 12 */ /** - * The ArrayBuffer instance referenced by the array. + * Bottom-layer buffer used by an ArkTS array. * * @type { ArrayBuffer } * @readonly @@ -4760,7 +4779,7 @@ declare namespace collections { */ readonly buffer: ArrayBuffer; /** - * The length in bytes of the array. + * Number of bytes occupied by the ArkTS array. * * @type { number } * @readonly @@ -4769,7 +4788,7 @@ declare namespace collections { * @since 12 */ /** - * The length in bytes of the array. + * Number of bytes occupied by the ArkTS array. * * @type { number } * @readonly @@ -4780,7 +4799,7 @@ declare namespace collections { */ readonly byteLength: number; /** - * The offset in bytes of the array. + * Offset between the ArkTS array and the start position of the ArrayBuffer. * * @type { number } * @readonly @@ -4789,7 +4808,7 @@ declare namespace collections { * @since 12 */ /** - * The offset in bytes of the array. + * Offset between the ArkTS array and the start position of the ArrayBuffer. * * @type { number } * @readonly @@ -4800,7 +4819,7 @@ declare namespace collections { */ readonly byteOffset: number; /** - * The length of the array. + * Number of elements in the ArkTS array. * * @type { number } * @readonly @@ -4809,7 +4828,7 @@ declare namespace collections { * @since 12 */ /** - * The length of the array. + * Number of elements in the ArkTS array. * * @type { number } * @readonly @@ -4820,7 +4839,7 @@ declare namespace collections { */ readonly length: number; /** - * A constructor used to create an Uint8Array. + * A constructor used to create an empty ArkTS Uint8Array. * * @throws { BusinessError } 10200012 - The Uint8Array's constructor cannot be directly invoked. * @syscap SystemCapability.Utils.Lang @@ -4828,7 +4847,7 @@ declare namespace collections { * @since 12 */ /** - * A constructor used to create an Uint8Array. + * A constructor used to create an empty ArkTS Uint8Array. * * @throws { BusinessError } 10200012 - The Uint8Array's constructor cannot be directly invoked. * @syscap SystemCapability.Utils.Lang @@ -4838,9 +4857,9 @@ declare namespace collections { */ constructor(); /** - * A constructor used to create an Uint8Array. + * A constructor used to create an ArkTS Uint8Array of a given length. * - * @param { number } length - The length of the array + * @param { number } length - Length of the ArkTS Uint8Array. * @throws { BusinessError } 10200012 - The Uint8Array's constructor cannot be directly invoked. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Utils.Lang @@ -4848,9 +4867,9 @@ declare namespace collections { * @since 12 */ /** - * A constructor used to create an Uint8Array. + * A constructor used to create an ArkTS Uint8Array of a given length. * - * @param { number } length - The length of the array + * @param { number } length - Length of the ArkTS Uint8Array. * @throws { BusinessError } 10200012 - The Uint8Array's constructor cannot be directly invoked. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Utils.Lang @@ -4882,9 +4901,10 @@ declare namespace collections { */ constructor(elements: Iterable); /** - * A constructor used to create an Uint8Array. + * A constructor that creates an ArkTS Uint8Array from an array-like object or ArkTS ArrayBuffer. * - * @param { ArrayLike | ArrayBuffer } array - An array is initialized with the given elements + * @param { ArrayLike | ArrayBuffer } array - Object used to construct the ArkTS Uint8Array. When the + * parameter type is ArrayBuffer, the number of bytes occupied by the buffer must be an integer multiple of 4. * @throws { BusinessError } 10200012 - The Uint8Array's constructor cannot be directly invoked. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Utils.Lang @@ -4892,9 +4912,11 @@ declare namespace collections { * @since 12 */ /** - * A constructor used to create an Uint8Array. + * A constructor that creates an ArkTS Uint8Array from an array-like object or ArkTS ArrayBuffer. * - * @param { ArrayLike | ArrayBuffer } array - An array is initialized with the given elements + * @param { ArrayLike | ArrayBuffer } array - Object used to construct the ArkTS Uint8Array. + * When the parameter type is ArrayBuffer, the number of bytes occupied by the buffer must be + * an integer multiple of 4. * @throws { BusinessError } 10200012 - The Uint8Array's constructor cannot be directly invoked. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Utils.Lang @@ -4904,13 +4926,12 @@ declare namespace collections { */ constructor(array: ArrayLike | ArrayBuffer); /** - * A constructor used to create an Uint8Array. + * A constructor that creates an ArkTS Uint8Array from an ArrayBuffer. * - * @param { ArrayBuffer } buffer - An array is initialized with the given elements - * @param { number } [byteOffset] - The byteOffset (in bytes) parameter specifies the memory range - * that will be exposed by the typed array view. - * @param { number } [length] - The length parameter specifies the memory range - * that will be exposed by the typed array view. + * @param { ArrayBuffer } buffer - ArrayBuffer object used to construct the ArkTS Uint8Array. + * The number of bytes occupied by the buffer must be an integer multiple of 4. + * @param { number } [byteOffset] - Byte offset of the buffer, beginning at 0. The default value is 0. + * @param { number } [length] - Length of the ArkTS Uint8Array. The default value is 0. * @throws { BusinessError } 10200012 - The Uint8Array's constructor cannot be directly invoked. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Utils.Lang @@ -4918,13 +4939,12 @@ declare namespace collections { * @since 12 */ /** - * A constructor used to create an Uint8Array. + * A constructor that creates an ArkTS Uint8Array from an ArrayBuffer. * - * @param { ArrayBuffer } buffer - An array is initialized with the given elements - * @param { number } [byteOffset] - The byteOffset (in bytes) parameter specifies the memory range - * that will be exposed by the typed array view. - * @param { number } [length] - The length parameter specifies the memory range - * that will be exposed by the typed array view. + * @param { ArrayBuffer } buffer - ArrayBuffer object used to construct the ArkTS Uint8Array. + * The number of bytes occupied by the buffer must be an integer multiple of 4. + * @param { number } [byteOffset] - Byte offset of the buffer, beginning at 0. The default value is 0. + * @param { number } [length] - Length of the ArkTS Uint8Array. The default value is 0. * @throws { BusinessError } 10200012 - The Uint8Array's constructor cannot be directly invoked. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Utils.Lang @@ -4934,10 +4954,10 @@ declare namespace collections { */ constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number); /** - * Creates an Uint8Array from an array-like object. + * Creates an ArkTS Uint8Array from an array-like or iterator object. * - * @param { ArrayLike } arrayLike - An array-like object to convert to an Uint8Array. - * @returns { Uint8Array } A new Uint8Array instance + * @param { ArrayLike } arrayLike - Array-like object used to construct the ArkTS Uint8Array. + * @returns { Uint8Array } New ArkTS Uint8Array generated. * @throws { BusinessError } 401 - Parameter error. * @static * @syscap SystemCapability.Utils.Lang @@ -4945,10 +4965,10 @@ declare namespace collections { * @since 12 */ /** - * Creates an Uint8Array from an array-like object. + * Creates an ArkTS Uint8Array from an array-like or iterator object. * - * @param { ArrayLike } arrayLike - An array-like object to convert to an Uint8Array. - * @returns { Uint8Array } A new Uint8Array instance + * @param { ArrayLike } arrayLike - Array-like object used to construct the ArkTS Uint8Array. + * @returns { Uint8Array } New ArkTS Uint8Array generated. * @throws { BusinessError } 401 - Parameter error. * @static * @syscap SystemCapability.Utils.Lang @@ -4958,11 +4978,11 @@ declare namespace collections { */ static from(arrayLike: ArrayLike): Uint8Array; /** - * Creates an Uint8Array from an array-like object. + * Creates an ArkTS Uint8Array from an array-like object. * - * @param { ArrayLike } arrayLike - An array-like object to convert to an Uint8Array. + * @param { ArrayLike } arrayLike - Array-like object used to construct the ArkTS Uint8Array. * @param { TypedArrayFromMapFn } mapFn - A mapping function to call on every element of the array. - * @returns { Uint8Array } A new Uint8Array instance + * @returns { Uint8Array } New ArkTS Uint8Array generated. * @throws { BusinessError } 401 - Parameter error. * @static * @syscap SystemCapability.Utils.Lang @@ -4970,11 +4990,11 @@ declare namespace collections { * @since 12 */ /** - * Creates an Uint8Array from an array-like object. + * Creates an ArkTS Uint8Array from an array-like object. * - * @param { ArrayLike } arrayLike - An array-like object to convert to an Uint8Array. + * @param { ArrayLike } arrayLike - Array-like object used to construct the ArkTS Uint8Array. * @param { TypedArrayFromMapFn } mapFn - A mapping function to call on every element of the array. - * @returns { Uint8Array } A new Uint8Array instance + * @returns { Uint8Array } New ArkTS Uint8Array generated. * @throws { BusinessError } 401 - Parameter error. * @static * @syscap SystemCapability.Utils.Lang @@ -4984,11 +5004,11 @@ declare namespace collections { */ static from(arrayLike: ArrayLike, mapFn: TypedArrayFromMapFn): Uint8Array; /** - * Creates an Uint8Array from an iterable object. + * Creates an ArkTS Uint8Array from an iterator object. * - * @param { Iterable } arrayLike - An iterable object to convert to an Uint8Array. - * @param { TypedArrayFromMapFn } [mapFn] - A mapping function to - * call on every element of the array. + * @param { Iterable } arrayLike - Iterator object used to construct the ArkTS Uint8Array. + * @param { TypedArrayFromMapFn } [mapFn] - Mapping function. If no value is passed in, + * no special processing is conducted on the elements. * @returns { Uint8Array } A new Uint8Array instance * @throws { BusinessError } 401 - Parameter error. * @static @@ -4997,11 +5017,11 @@ declare namespace collections { * @since 12 */ /** - * Creates an Uint8Array from an iterable object. + * Creates an ArkTS Uint8Array from an iterator object. * - * @param { Iterable } arrayLike - An iterable object to convert to an Uint8Array. - * @param { TypedArrayFromMapFn } [mapFn] - A mapping function to - * call on every element of the array. + * @param { Iterable } arrayLike - Iterator object used to construct the ArkTS Uint8Array. + * @param { TypedArrayFromMapFn } [mapFn] - Mapping function. If no value is passed in, + * no special processing is conducted on the elements. * @returns { Uint8Array } A new Uint8Array instance * @throws { BusinessError } 401 - Parameter error. * @static @@ -5012,15 +5032,16 @@ declare namespace collections { */ static from(arrayLike: Iterable, mapFn?: TypedArrayFromMapFn): Uint8Array; /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target. + * Copies elements within a given range from this ArkTS Uint8Array to another position in sequence. * * @param { number } target - If target is negative, it is treated as length+target where length is the * length of the array. - * @param { number } start - If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param { number } [end] - If not specified, length of the this object is used as its default value. - * @returns { Uint8Array } The array itself. + * @param { number } start - Start index of the range. + * If a negative number is passed in, it refers to the index of start + Uint8Array.length. + * @param { number } [end] - End index of the range. + * If a negative number is passed in, it refers to the index of end + Uint8Array.length. + * The default value is the length of the ArkTS Uint8Array. + * @returns { Uint8Array } ArkTS Uint8Array after being modified. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5029,15 +5050,16 @@ declare namespace collections { * @since 12 */ /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target. + * Copies elements within a given range from this ArkTS Uint8Array to another position in sequence. * * @param { number } target - If target is negative, it is treated as length+target where length is the * length of the array. - * @param { number } start - If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param { number } [end] - If not specified, length of the this object is used as its default value. - * @returns { Uint8Array } The array itself. + * @param { number } start - Start index of the range. + * If a negative number is passed in, it refers to the index of start + Uint8Array.length. + * @param { number } [end] - End index of the range. + * If a negative number is passed in, it refers to the index of end + Uint8Array.length. + * The default value is the length of the ArkTS Uint8Array. + * @returns { Uint8Array } ArkTS Uint8Array after being modified. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5048,13 +5070,13 @@ declare namespace collections { */ copyWithin(target: number, start: number, end?: number): Uint8Array; /** - * Determines whether all the members of an array satisfy the specified test. + * Checks whether all elements in this ArkTS Uint8Array meet a given condition. * * @param { TypedArrayPredicateFn } predicate - A function that accepts up to three arguments. * The every method calls the predicate function for each element in the array until * the predicate returns a value which is coercible to the Boolean value false, or until the end of the array. - * @returns { boolean } true unless predicate returns a false value for a typed array element, - * in which case false is immediately returned. + * @returns { boolean } Check result. The value true is returned if all elements meet the given condition; + * otherwise, false is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The every method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5063,13 +5085,13 @@ declare namespace collections { * @since 12 */ /** - * Determines whether all the members of an array satisfy the specified test. + * Checks whether all elements in this ArkTS Uint8Array meet a given condition. * * @param { TypedArrayPredicateFn } predicate - A function that accepts up to three arguments. * The every method calls the predicate function for each element in the array until * the predicate returns a value which is coercible to the Boolean value false, or until the end of the array. - * @returns { boolean } true unless predicate returns a false value for a typed array element, - * in which case false is immediately returned. + * @returns { boolean } Check result. The value true is returned if all elements meet the given condition; + * otherwise, false is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The every method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5080,14 +5102,14 @@ declare namespace collections { */ every(predicate: TypedArrayPredicateFn): boolean; /** - * Returns the this object after filling the section identified by start and end with value. + * Fills all elements in a given range in this ArkTS Uint8Array with a value. * - * @param { number } value - value to fill array section with. - * @param { number } [start] - index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param { number } [end] - index to stop filling the array at. If end is negative, it is treated as - * length+end. - * @returns { Uint8Array } The array itself. + * @param { number } value - Value to fill in. + * @param { number } [start] - Start index of the range. If a negative number is passed in, + * it refers to the index of start + Uint8Array.length. The default value is 0. + * @param { number } [end] - End index of the range (exclusive). If a negative number is passed in, + * it refers to the index of end + Uint8Array.length. The default value is the length of the ArkTS Uint8Array. + * @returns { Uint8Array } Filled ArkTS Uint8Array. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The fill method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5096,14 +5118,14 @@ declare namespace collections { * @since 12 */ /** - * Returns the this object after filling the section identified by start and end with value. + * Fills all elements in a given range in this ArkTS Uint8Array with a value. * - * @param { number } value - value to fill array section with. - * @param { number } [start] - index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param { number } [end] - index to stop filling the array at. If end is negative, it is treated as - * length+end. - * @returns { Uint8Array } The array itself. + * @param { number } value - Value to fill in. + * @param { number } [start] - Start index of the range. If a negative number is passed in, + * it refers to the index of start + Uint8Array.length. The default value is 0. + * @param { number } [end] - End index of the range (exclusive). If a negative number is passed in, + * it refers to the index of end + Uint8Array.length. The default value is the length of the ArkTS Uint8Array. + * @returns { Uint8Array } Filled ArkTS Uint8Array. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The fill method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5114,11 +5136,11 @@ declare namespace collections { */ fill(value: number, start?: number, end?: number): Uint8Array; /** - * Returns the elements of an array that meet the condition specified in a callback function. + * Returns a new ArkTS Uint8Array that contains all elements that meet the given condition. * * @param { TypedArrayPredicateFn } predicate - A function that accepts up to three arguments. * The filter method calls the predicate function one time for each element in the array. - * @returns { Uint8Array } The array itself. + * @returns { Uint8Array } Filtered ArkTS Uint8Array. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The filter method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5127,11 +5149,11 @@ declare namespace collections { * @since 12 */ /** - * Returns the elements of an array that meet the condition specified in a callback function. + * Returns a new ArkTS Uint8Array that contains all elements that meet the given condition. * * @param { TypedArrayPredicateFn } predicate - A function that accepts up to three arguments. * The filter method calls the predicate function one time for each element in the array. - * @returns { Uint8Array } The array itself. + * @returns { Uint8Array } Filtered ArkTS Uint8Array. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The filter method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5142,14 +5164,14 @@ declare namespace collections { */ filter(predicate: TypedArrayPredicateFn): Uint8Array; /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. + * Returns the value of the first element that passes a test provided by a callback function. + * If none of the elements pass the test, undefined is returned. * * @param { TypedArrayPredicateFn } predicate - find calls predicate once for each element of * the array, in ascending order, until it finds one where predicate returns true. * If such an element is found, find immediately returns that element value. Otherwise, find returns undefined. - * @returns { number | undefined } The first element in the typed array - * that satisfies the provided testing function. Otherwise, undefined is returned. + * @returns { number | undefined } Value of the first element that passes the test. + * If none of the elements pass the test, undefined is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The find method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5158,14 +5180,14 @@ declare namespace collections { * @since 12 */ /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. + * Returns the value of the first element that passes a test provided by a callback function. + * If none of the elements pass the test, undefined is returned. * * @param { TypedArrayPredicateFn } predicate - find calls predicate once for each element of * the array, in ascending order, until it finds one where predicate returns true. * If such an element is found, find immediately returns that element value. Otherwise, find returns undefined. - * @returns { number | undefined } The first element in the typed array - * that satisfies the provided testing function. Otherwise, undefined is returned. + * @returns { number | undefined } Value of the first element that passes the test. + * If none of the elements pass the test, undefined is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The find method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5176,13 +5198,14 @@ declare namespace collections { */ find(predicate: TypedArrayPredicateFn): number | undefined; /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. + * Returns the index of the first element that passes a test provided by a callback function. + * If none of the elements pass the test, -1 is returned. * * @param { TypedArrayPredicateFn } predicate - find calls predicate once for each element of * the array, in ascending order, until it finds one where predicate returns true. If such an element is found, * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1. + * @returns { number } Index of the first element that passes the test. + * If none of the elements pass the test, -1 is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The findIndex method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5191,13 +5214,14 @@ declare namespace collections { * @since 12 */ /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. + * Returns the index of the first element that passes a test provided by a callback function. + * If none of the elements pass the test, -1 is returned. * * @param { TypedArrayPredicateFn } predicate - find calls predicate once for each element of * the array, in ascending order, until it finds one where predicate returns true. If such an element is found, * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1. + * @returns { number } Index of the first element that passes the test. + * If none of the elements pass the test, -1 is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The findIndex method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5208,7 +5232,7 @@ declare namespace collections { */ findIndex(predicate: TypedArrayPredicateFn): number; /** - * Performs the specified action for each element in an array. + * Calls a callback function for each element in this ArkTS Uint8Array. * * @param { TypedArrayForEachCallback } callbackFn - A function that * accepts up to three arguments. @@ -5221,7 +5245,7 @@ declare namespace collections { * @since 12 */ /** - * Performs the specified action for each element in an array. + * Calls a callback function for each element in this ArkTS Uint8Array. * * @param { TypedArrayForEachCallback } callbackFn - A function that * accepts up to three arguments. @@ -5236,12 +5260,14 @@ declare namespace collections { */ forEach(callbackFn: TypedArrayForEachCallback): void; /** - * Returns the index of the first occurrence of a value in an array. + * Returns the index of the first occurrence of a value in this ArkTS Uint8Array. + * If the value is not found, -1 is returned. * - * @param { number } searchElement - The value to locate in the array. - * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - * @returns { number } The first index of searchElement in the typed array; -1 if not found. + * @param { number } searchElement - Value to search for. + * @param { number } [fromIndex] - Index from which the search starts. The default value is 0. + * If the index is greater than or equal to the length of the ArkTS Uint8Array, -1 is returned. + * If a negative number is passed in, the search starts from the end of the ArkTS Uint8Array. + * @returns { number } Index of the first occurrence of the value. If the value is not found, -1 is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The indexOf method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5250,12 +5276,14 @@ declare namespace collections { * @since 12 */ /** - * Returns the index of the first occurrence of a value in an array. + * Returns the index of the first occurrence of a value in this ArkTS Uint8Array. + * If the value is not found, -1 is returned. * - * @param { number } searchElement - The value to locate in the array. - * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - * @returns { number } The first index of searchElement in the typed array; -1 if not found. + * @param { number } searchElement - Value to search for. + * @param { number } [fromIndex] - Index from which the search starts. The default value is 0. + * If the index is greater than or equal to the length of the ArkTS Uint8Array, -1 is returned. + * If a negative number is passed in, the search starts from the end of the ArkTS Uint8Array. + * @returns { number } Index of the first occurrence of the value. If the value is not found, -1 is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The indexOf method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5266,11 +5294,10 @@ declare namespace collections { */ indexOf(searchElement: number, fromIndex?: number): number; /** - * Adds all the elements of an array separated by the specified separator string. - * @param { string } [separator] - A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - * @returns { string } A string with all typed array elements joined. - * If array.length is 0, the empty string is returned. + * Concatenates all elements in this ArkTS Uint8Array into a string, with a given separator. + * @param { string } [separator] - Separator to be used. + * If no value is passed in, a comma (,) is used as the separator. + * @returns { string } String obtained. If the array is empty, an empty string is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The join method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5279,11 +5306,10 @@ declare namespace collections { * @since 12 */ /** - * Adds all the elements of an array separated by the specified separator string. - * @param { string } [separator] - A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - * @returns { string } A string with all typed array elements joined. - * If array.length is 0, the empty string is returned. + * Concatenates all elements in this ArkTS Uint8Array into a string, with a given separator. + * @param { string } [separator] - Separator to be used. + * If no value is passed in, a comma (,) is used as the separator. + * @returns { string } String obtained. If the array is empty, an empty string is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The join method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5294,13 +5320,13 @@ declare namespace collections { */ join(separator?: string): string; /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. + * Applies a callback function to each element in this ArkTS Uint8Array + * and uses the result to create an ArkTS Uint8Array. * * @param { TypedArrayMapCallback } callbackFn - A function that * accepts up to three arguments. * The map method calls the callbackfn function one time for each element in the array. - * @returns { Uint8Array } The array itself. + * @returns { Uint8Array } New ArkTS Uint8Array generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The map method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5309,13 +5335,13 @@ declare namespace collections { * @since 12 */ /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. + * Applies a callback function to each element in this ArkTS Uint8Array + * and uses the result to create an ArkTS Uint8Array. * * @param { TypedArrayMapCallback } callbackFn - A function that * accepts up to three arguments. * The map method calls the callbackfn function one time for each element in the array. - * @returns { Uint8Array } The array itself. + * @returns { Uint8Array } New ArkTS Uint8Array generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The map method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5446,7 +5472,7 @@ declare namespace collections { */ reduce(callbackFn: TypedArrayReduceCallback, initialValue: U): U; /** - * Reverses the elements in an Array. + * Reverses this ArkTS Uint8Array. * * @returns { Uint8Array } The reference to the original typed array, now reversed. *
Note that the typed array is reversed in place, and no copy is made. @@ -5457,7 +5483,7 @@ declare namespace collections { * @since 12 */ /** - * Reverses the elements in an Array. + * Reverses this ArkTS Uint8Array. * * @returns { Uint8Array } The reference to the original typed array, now reversed. *
Note that the typed array is reversed in place, and no copy is made. @@ -5470,10 +5496,10 @@ declare namespace collections { */ reverse(): Uint8Array; /** - * Sets a value or an array of values. + * Writes the elements in an array-like object to the given start position in sequence. * - * @param { ArrayLike } array - A typed or untyped array of values to set. - * @param { number } [offset] - The index in the current array at which the values are to be written. + * @param { ArrayLike } array - Array-like object whose elements will be written. + * @param { number } [offset] - Start position for writing data. The default value is 0. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The set method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5482,10 +5508,10 @@ declare namespace collections { * @since 12 */ /** - * Sets a value or an array of values. + * Writes the elements in an array-like object to the given start position in sequence. * - * @param { ArrayLike } array - A typed or untyped array of values to set. - * @param { number } [offset] - The index in the current array at which the values are to be written. + * @param { ArrayLike } array - Array-like object whose elements will be written. + * @param { number } [offset] - Start position for writing data. The default value is 0. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The set method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5496,12 +5522,13 @@ declare namespace collections { */ set(array: ArrayLike, offset?: number): void; /** - * Returns a section of an array. + * Selects a range of elements in this ArkTS Uint8Array to create an ArkTS Uint8Array. * - * @param { number } [start] - The beginning of the specified portion of the array. - * @param { number } [end] - The end of the specified portion of the array. - * This is exclusive of the element at the index 'end'. - * @returns { Uint8Array } A new typed array containing the extracted elements. + * @param { number } [start] - Start index of the range. If a negative number is passed in, + * it refers to the index of start + Uint8Array.length. The default value is 0. + * @param { number } [end] - End index of the range (exclusive). If a negative number is passed in, + * it refers to the index of end + Uint8Array.length. The default value is the length of the ArkTS Uint8Array. + * @returns { Uint8Array } New ArkTS Uint8Array generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The slice method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5510,12 +5537,13 @@ declare namespace collections { * @since 12 */ /** - * Returns a section of an array. + * Selects a range of elements in this ArkTS Uint8Array to create an ArkTS Uint8Array. * - * @param { number } [start] - The beginning of the specified portion of the array. - * @param { number } [end] - The end of the specified portion of the array. - * This is exclusive of the element at the index 'end'. - * @returns { Uint8Array } A new typed array containing the extracted elements. + * @param { number } [start] - Start index of the range. If a negative number is passed in, + * it refers to the index of start + Uint8Array.length. The default value is 0. + * @param { number } [end] - End index of the range (exclusive). If a negative number is passed in, + * it refers to the index of end + Uint8Array.length. The default value is the length of the ArkTS Uint8Array. + * @returns { Uint8Array } New ArkTS Uint8Array generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The slice method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5526,13 +5554,13 @@ declare namespace collections { */ slice(start?: number, end?: number): Uint8Array; /** - * Determines whether the specified callback function returns true for any element of an array. + * Checks whether any element in this ArkTS Uint8Array meets a given condition. * * @param { TypedArrayPredicateFn } predicate - A function that accepts up to three arguments. * The some method calls the predicate function for each element in the array until * the predicate returns a value which is coercible to the Boolean value true, or until the end of the array. - * @returns { boolean } false unless predicate returns a truthy value for a typed array element, - * in which case true is immediately returned. + * @returns { boolean } Check result. The value true is returned if an element meeting the given condition exists; + * otherwise, false is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The some method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5541,13 +5569,13 @@ declare namespace collections { * @since 12 */ /** - * Determines whether the specified callback function returns true for any element of an array. + * Checks whether any element in this ArkTS Uint8Array meets a given condition. * * @param { TypedArrayPredicateFn } predicate - A function that accepts up to three arguments. * The some method calls the predicate function for each element in the array until * the predicate returns a value which is coercible to the Boolean value true, or until the end of the array. - * @returns { boolean } false unless predicate returns a truthy value for a typed array element, - * in which case true is immediately returned. + * @returns { boolean } Check result. The value true is returned if an element meeting the given condition exists; + * otherwise, false is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The some method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5558,7 +5586,7 @@ declare namespace collections { */ some(predicate: TypedArrayPredicateFn): boolean; /** - * Sorts an array. + * Sorts elements in this ArkTS Uint8Array and returns the sorted ArkTS Uint8Array. * * @param { TypedArrayCompareFn } [compareFn] - Function used to determine the order of the elements. * It is expected to return a negative value if first argument is less than second argument, @@ -5574,7 +5602,7 @@ declare namespace collections { * @since 12 */ /** - * Sorts an array. + * Sorts elements in this ArkTS Uint8Array and returns the sorted ArkTS Uint8Array. * * @param { TypedArrayCompareFn } [compareFn] - Function used to determine the order of the elements. * It is expected to return a negative value if first argument is less than second argument, @@ -5592,12 +5620,13 @@ declare namespace collections { */ sort(compareFn?: TypedArrayCompareFn): Uint8Array; /** - * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. + * Returns a new ArkTS Uint8Array based on the same ArkTS ArrayBuffer. * - * @param { number } [begin] - The index of the beginning of the array. - * @param { number } [end] - The index of the end of the array. - * @returns { Uint8Array } A new Uint8Array object. + * @param { number } [begin] - Start index of the range. If a negative number is passed in, + * it refers to the index of begin + Uint8Array.length. The default value is 0. + * @param { number } [end] - End index of the range (exclusive). If a negative number is passed in, + * it refers to the index of end + Uint8Array.length. The default value is the length of the ArkTS Uint8Array. + * @returns { Uint8Array } New ArkTS Uint8Array generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The subarray method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5606,12 +5635,13 @@ declare namespace collections { * @since 12 */ /** - * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. + * Returns a new ArkTS Uint8Array based on the same ArkTS ArrayBuffer. * - * @param { number } [begin] - The index of the beginning of the array. - * @param { number } [end] - The index of the end of the array. - * @returns { Uint8Array } A new Uint8Array object. + * @param { number } [begin] - Start index of the range. If a negative number is passed in, + * it refers to the index of begin + Uint8Array.length. The default value is 0. + * @param { number } [end] - End index of the range (exclusive). If a negative number is passed in, + * it refers to the index of end + Uint8Array.length. The default value is the length of the ArkTS Uint8Array. + * @returns { Uint8Array } New ArkTS Uint8Array generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The subarray method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5622,10 +5652,10 @@ declare namespace collections { */ subarray(begin?: number, end?: number): Uint8Array; /** - * Returns the item located at the specified index. + * Returns the element at the given index. If no element is found, undefined is returned. * - * @param { number } index - The zero-based index of the desired code unit.
- * A negative index will count back from the last item. + * @param { number } index - Index of the element. The index in an array always starts from 0 and is an integer. + * If a negative number is passed in, it refers to the index of index + Uint8Array.length. * @returns { number | undefined } The element in the array matching the given index.
* Always returns undefined if index < -array.length or * index >= array.length without attempting to access the corresponding property. @@ -5637,10 +5667,10 @@ declare namespace collections { * @since 12 */ /** - * Returns the item located at the specified index. + * Returns the element at the given index. If no element is found, undefined is returned. * - * @param { number } index - The zero-based index of the desired code unit.
- * A negative index will count back from the last item. + * @param { number } index - Index of the element. The index in an array always starts from 0 and is an integer. + * If a negative number is passed in, it refers to the index of index + Uint8Array.length. * @returns { number | undefined } The element in the array matching the given index.
* Always returns undefined if index < -array.length or * index >= array.length without attempting to access the corresponding property. @@ -5654,7 +5684,9 @@ declare namespace collections { */ at(index: number): number | undefined; /** - * Returns an iterator that iterates over numbers. + * Returns an iterator, each item of which is a JavaScript object. + * NOTE: + * This API cannot be used in .ets files. * * @returns { IterableIterator } Iterator object that yields numbers. * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. @@ -5663,7 +5695,9 @@ declare namespace collections { * @since 12 */ /** - * Returns an iterator that iterates over numbers. + * Returns an iterator, each item of which is a JavaScript object. + * NOTE: + * This API cannot be used in .ets files. * * @returns { IterableIterator } Iterator object that yields numbers. * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. @@ -5674,20 +5708,20 @@ declare namespace collections { */ [Symbol.iterator](): IterableIterator; /** - * Returns an iterable of key, value pairs for every entry in the array + * Returns an iterator object that contains the key-value pair of each element in this ArkTS Uint8Array. * * @returns { IterableIterator<[number, number]> } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The method cannot be bound. + * @throws { BusinessError } 10200011 - The entries method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Returns an iterable of key, value pairs for every entry in the array + * Returns an iterator object that contains the key-value pair of each element in this ArkTS Uint8Array. * * @returns { IterableIterator<[number, number]> } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The method cannot be bound. + * @throws { BusinessError } 10200011 - The entries method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -5696,20 +5730,20 @@ declare namespace collections { */ entries(): IterableIterator<[number, number]>; /** - * Returns an iterable of keys in the array + * Returns an iterator object that contains the key (index) of each element in this ArkTS Uint8Array. * * @returns { IterableIterator } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The method cannot be bound. + * @throws { BusinessError } 10200011 - The keys method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Returns an iterable of keys in the array + * Returns an iterator object that contains the key (index) of each element in this ArkTS Uint8Array. * * @returns { IterableIterator } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The method cannot be bound. + * @throws { BusinessError } 10200011 - The keys method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -5718,20 +5752,20 @@ declare namespace collections { */ keys(): IterableIterator; /** - * Returns an iterable of values in the array + * Returns an iterator object that contains the value of each element in this ArkTS Uint8Array. * * @returns { IterableIterator } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The method cannot be bound. + * @throws { BusinessError } 10200011 - The values method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Returns an iterable of values in the array + * Returns an iterator object that contains the value of each element in this ArkTS Uint8Array. * * @returns { IterableIterator } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The method cannot be bound. + * @throws { BusinessError } 10200011 - The values method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -5740,12 +5774,13 @@ declare namespace collections { */ values(): IterableIterator; /** - * Determines whether an array includes a certain element, returning true or false as appropriate. + * Checks whether elements are contained in this ArkTS Uint8Array. * - * @param { number } searchElement - The element to search for. - * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement. - * @returns { boolean } A boolean value which is true if the value searchElement is found
- * within the typed array (or the part of the typed array indicated by the index fromIndex, if specified). + * @param { number } searchElement - Element to search for. + * @param { number } [fromIndex] - Index from which the search starts. If a negative number is passed in, + * it refers to the index of fromIndex + Uint8Array.length. The default value is 0. + * @returns { boolean } Check result. The value true is returned if the element exists; + * otherwise, false is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The at method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5754,12 +5789,13 @@ declare namespace collections { * @since 12 */ /** - * Determines whether an array includes a certain element, returning true or false as appropriate. + * Checks whether elements are contained in this ArkTS Uint8Array. * - * @param { number } searchElement - The element to search for. - * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement. - * @returns { boolean } A boolean value which is true if the value searchElement is found
- * within the typed array (or the part of the typed array indicated by the index fromIndex, if specified). + * @param { number } searchElement - Element to search for. + * @param { number } [fromIndex] - Index from which the search starts. If a negative number is passed in, + * it refers to the index of fromIndex + Uint8Array.length. The default value is 0. + * @returns { boolean } Check result. The value true is returned if the element exists; + * otherwise, false is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The at method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -5770,14 +5806,14 @@ declare namespace collections { */ includes(searchElement: number, fromIndex?: number): boolean; /** - * Returns the item at that index. + * Returns the element at a given index in this Uint8Array. * * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Returns the item at that index. + * Returns the element at a given index in this Uint8Array. * * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -5786,11 +5822,12 @@ declare namespace collections { */ [index: number]: number; /** - * Find the last occurrence of a specified element in an Uint8Array. + * Obtains the index of the last occurrence of the specified value in this ArkTS Uint8Array. * * @param { number } searchElement - Element to search for in the Uint8Array.. - * @param { number } fromIndex - The index at which to start the search. If provided: - *
If this index is negative, it is treated as Uint8Array.length + fromIndex. + * @param { number } fromIndex - Index from which the search starts. The default value is 0. + * If the index is greater than or equal to the length of the ArkTS Uint8Array, -1 is returned. + * If a negative number is passed in, the search starts from the end of the ArkTS Uint8Array. * @returns { number } Returns the last index of the specified element if found; otherwise, returns -1. * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range. * @throws { BusinessError } 10200011 - The lastIndexOf method cannot be bound. @@ -5896,7 +5933,7 @@ declare namespace collections { @Sendable class Int16Array { /** - * The size in bytes of each element in the array. + * Number of bytes occupied by each element in the ArkTS array. * * @type { number } * @readonly @@ -5906,7 +5943,7 @@ declare namespace collections { * @since 12 */ /** - * The size in bytes of each element in the array. + * Number of bytes occupied by each element in the ArkTS array. * * @type { number } * @readonly @@ -5918,7 +5955,7 @@ declare namespace collections { */ static readonly BYTES_PER_ELEMENT: number; /** - * The ArrayBuffer instance referenced by the array. + * Bottom-layer buffer used by an ArkTS array. * * @type { ArrayBuffer } * @readonly @@ -5927,7 +5964,7 @@ declare namespace collections { * @since 12 */ /** - * The ArrayBuffer instance referenced by the array. + * Bottom-layer buffer used by an ArkTS array. * * @type { ArrayBuffer } * @readonly @@ -5938,7 +5975,7 @@ declare namespace collections { */ readonly buffer: ArrayBuffer; /** - * The length in bytes of the array. + * Number of bytes occupied by the ArkTS array. * * @type { number } * @readonly @@ -5947,7 +5984,7 @@ declare namespace collections { * @since 12 */ /** - * The length in bytes of the array. + * Number of bytes occupied by the ArkTS array. * * @type { number } * @readonly @@ -5958,7 +5995,7 @@ declare namespace collections { */ readonly byteLength: number; /** - * The offset in bytes of the array. + * Offset between the ArkTS array and the start position of the ArrayBuffer. * * @type { number } * @readonly @@ -5967,7 +6004,7 @@ declare namespace collections { * @since 12 */ /** - * The offset in bytes of the array. + * Offset between the ArkTS array and the start position of the ArrayBuffer. * * @type { number } * @readonly @@ -5978,7 +6015,7 @@ declare namespace collections { */ readonly byteOffset: number; /** - * The length of the array. + * Number of elements in the ArkTS array. * * @type { number } * @readonly @@ -5987,7 +6024,7 @@ declare namespace collections { * @since 12 */ /** - * The length of the array. + * Number of elements in the ArkTS array. * * @type { number } * @readonly @@ -5998,7 +6035,7 @@ declare namespace collections { */ readonly length: number; /** - * A constructor used to create an Int16Array. + * A constructor used to create an empty ArkTS Int16Array. * * @throws { BusinessError } 10200012 - The Int16Array's constructor cannot be directly invoked. * @syscap SystemCapability.Utils.Lang @@ -6006,7 +6043,7 @@ declare namespace collections { * @since 12 */ /** - * A constructor used to create an Int16Array. + * A constructor used to create an empty ArkTS Int16Array. * * @throws { BusinessError } 10200012 - The Int16Array's constructor cannot be directly invoked. * @syscap SystemCapability.Utils.Lang @@ -6016,9 +6053,9 @@ declare namespace collections { */ constructor(); /** - * A constructor used to create an Int16Array. + * A constructor used to create an ArkTS Int16Array of a given length. * - * @param { number } length - The length of the array + * @param { number } length - Length of the ArkTS Int16Array. * @throws { BusinessError } 10200012 - The Int16Array's constructor cannot be directly invoked. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Utils.Lang @@ -6026,9 +6063,9 @@ declare namespace collections { * @since 12 */ /** - * A constructor used to create an Int16Array. + * A constructor used to create an ArkTS Int16Array of a given length. * - * @param { number } length - The length of the array + * @param { number } length - Length of the ArkTS Int16Array. * @throws { BusinessError } 10200012 - The Int16Array's constructor cannot be directly invoked. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Utils.Lang @@ -6060,9 +6097,10 @@ declare namespace collections { */ constructor(elements: Iterable); /** - * A constructor used to create an Int16Array. + * A constructor that creates an ArkTS Int16Array from an array-like object or ArkTS ArrayBuffer. * - * @param { ArrayLike | ArrayBuffer } array - An array is initialized with the given elements + * @param { ArrayLike | ArrayBuffer } array - Object used to construct the ArkTS Int16Array. When the + * parameter type is ArrayBuffer, the number of bytes occupied by the buffer must be an integer multiple of 4. * @throws { BusinessError } 10200012 - The Int16Array's constructor cannot be directly invoked. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Utils.Lang @@ -6070,9 +6108,10 @@ declare namespace collections { * @since 12 */ /** - * A constructor used to create an Int16Array. + * A constructor that creates an ArkTS Int16Array from an array-like object or ArkTS ArrayBuffer. * - * @param { ArrayLike | ArrayBuffer } array - An array is initialized with the given elements + * @param { ArrayLike | ArrayBuffer } array - Object used to construct the ArkTS Int16Array. When the + * parameter type is ArrayBuffer, the number of bytes occupied by the buffer must be an integer multiple of 4. * @throws { BusinessError } 10200012 - The Int16Array's constructor cannot be directly invoked. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Utils.Lang @@ -6082,13 +6121,12 @@ declare namespace collections { */ constructor(array: ArrayLike | ArrayBuffer); /** - * A constructor used to create an Int16Array. + * A constructor that creates an ArkTS Int16Array from an ArrayBuffer. * - * @param { ArrayBuffer } buffer - An array is initialized with the given elements - * @param { number } [byteOffset] - The byteOffset (in bytes) parameter specifies the memory range - * that will be exposed by the typed array view. - * @param { number } [length] - The length parameter specifies the memory range - * that will be exposed by the typed array view. + * @param { ArrayBuffer } buffer - ArrayBuffer object used to construct the ArkTS Int16Array. + * The number of bytes occupied by the buffer must be an integer multiple of 4. + * @param { number } [byteOffset] - Byte offset of the buffer, beginning at 0. The default value is 0. + * @param { number } [length] - Length of the ArkTS Int16Array. The default value is 0. * @throws { BusinessError } 10200012 - The Int16Array's constructor cannot be directly invoked. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Utils.Lang @@ -6096,13 +6134,12 @@ declare namespace collections { * @since 12 */ /** - * A constructor used to create an Int16Array. + * A constructor that creates an ArkTS Int16Array from an ArrayBuffer. * - * @param { ArrayBuffer } buffer - An array is initialized with the given elements - * @param { number } [byteOffset] - The byteOffset (in bytes) parameter specifies the memory range - * that will be exposed by the typed array view. - * @param { number } [length] - The length parameter specifies the memory range - * that will be exposed by the typed array view. + * @param { ArrayBuffer } buffer - ArrayBuffer object used to construct the ArkTS Int16Array. + * The number of bytes occupied by the buffer must be an integer multiple of 4. + * @param { number } [byteOffset] - Byte offset of the buffer, beginning at 0. The default value is 0. + * @param { number } [length] - Length of the ArkTS Int16Array. The default value is 0. * @throws { BusinessError } 10200012 - The Int16Array's constructor cannot be directly invoked. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Utils.Lang @@ -6112,10 +6149,10 @@ declare namespace collections { */ constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number); /** - * Creates an Int16Array from an array-like object. + * Creates an ArkTS Int16Array from an array-like or iterator object. * - * @param { ArrayLike } arrayLike - An array-like object to convert to an Int16Array. - * @returns { Int16Array } A new Int16Array instance + * @param { ArrayLike } arrayLike - Array-like object used to construct the ArkTS Int16Array. + * @returns { Int16Array } New ArkTS Int16Array generated. * @throws { BusinessError } 401 - Parameter error. * @static * @syscap SystemCapability.Utils.Lang @@ -6123,10 +6160,10 @@ declare namespace collections { * @since 12 */ /** - * Creates an Int16Array from an array-like object. + * Creates an ArkTS Int16Array from an array-like or iterator object. * - * @param { ArrayLike } arrayLike - An array-like object to convert to an Int16Array. - * @returns { Int16Array } A new Int16Array instance + * @param { ArrayLike } arrayLike - Array-like object used to construct the ArkTS Int16Array. + * @returns { Int16Array } New ArkTS Int16Array generated. * @throws { BusinessError } 401 - Parameter error. * @static * @syscap SystemCapability.Utils.Lang @@ -6135,12 +6172,13 @@ declare namespace collections { * @since 18 */ static from(arrayLike: ArrayLike): Int16Array; + /** - * Creates an Int16Array from an array-like object. + * Creates an ArkTS Int16Array from an array-like object. * - * @param { ArrayLike } arrayLike - An array-like object to convert to an Int16Array. + * @param { ArrayLike } arrayLike - Array-like object used to construct the ArkTS Int16Array. * @param { TypedArrayFromMapFn } mapFn - A mapping function to call on every element of the array. - * @returns { Int16Array } A new Int16Array instance + * @returns { Int16Array } New ArkTS Int16Array generated. * @throws { BusinessError } 401 - Parameter error. * @static * @syscap SystemCapability.Utils.Lang @@ -6148,11 +6186,11 @@ declare namespace collections { * @since 12 */ /** - * Creates an Int16Array from an array-like object. + * Creates an ArkTS Int16Array from an array-like object. * - * @param { ArrayLike } arrayLike - An array-like object to convert to an Int16Array. + * @param { ArrayLike } arrayLike - Array-like object used to construct the ArkTS Int16Array. * @param { TypedArrayFromMapFn } mapFn - A mapping function to call on every element of the array. - * @returns { Int16Array } A new Int16Array instance + * @returns { Int16Array } New ArkTS Int16Array generated. * @throws { BusinessError } 401 - Parameter error. * @static * @syscap SystemCapability.Utils.Lang @@ -6162,11 +6200,11 @@ declare namespace collections { */ static from(arrayLike: ArrayLike, mapFn: TypedArrayFromMapFn): Int16Array; /** - * Creates an Int16Array from an iterable object. + * Creates an ArkTS Int16Array from an iterator object. * - * @param { Iterable } arrayLike - An iterable object to convert to an Int16Array. - * @param { TypedArrayFromMapFn } [mapFn] - A mapping function to - * call on every element of the array. + * @param { Iterable } arrayLike - Iterator object used to construct the ArkTS Int16Array. + * @param { TypedArrayFromMapFn } [mapFn] - Mapping function. If no value is passed in, + * no special processing is conducted on the elements. * @returns { Int16Array } A new Int16Array instance * @throws { BusinessError } 401 - Parameter error. * @static @@ -6175,11 +6213,11 @@ declare namespace collections { * @since 12 */ /** - * Creates an Int16Array from an iterable object. + * Creates an ArkTS Int16Array from an iterator object. * - * @param { Iterable } arrayLike - An iterable object to convert to an Int16Array. - * @param { TypedArrayFromMapFn } [mapFn] - A mapping function to - * call on every element of the array. + * @param { Iterable } arrayLike - Iterator object used to construct the ArkTS Int16Array. + * @param { TypedArrayFromMapFn } [mapFn] - Mapping function. If no value is passed in, + * no special processing is conducted on the elements. * @returns { Int16Array } A new Int16Array instance * @throws { BusinessError } 401 - Parameter error. * @static @@ -6190,15 +6228,16 @@ declare namespace collections { */ static from(arrayLike: Iterable, mapFn?: TypedArrayFromMapFn): Int16Array; /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target. + * Copies elements within a given range from this ArkTS Int16Array to another position in sequence. * * @param { number } target - If target is negative, it is treated as length+target where length is the * length of the array. - * @param { number } start - If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param { number } [end] - If not specified, length of the this object is used as its default value. - * @returns { Int16Array } The array itself. + * @param { number } start - Start index of the range. + * If a negative number is passed in, it refers to the index of start + Int16Array.length. + * @param { number } [end] - End index of the range. + * If a negative number is passed in, it refers to the index of end + Int16Array.length. + * The default value is the length of the ArkTS Int16Array. + * @returns { Int16Array } ArkTS Int16Array after being modified. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6207,15 +6246,16 @@ declare namespace collections { * @since 12 */ /** - * Returns the this object after copying a section of the array identified by start and end - * to the same array starting at position target. + * Copies elements within a given range from this ArkTS Int16Array to another position in sequence. * * @param { number } target - If target is negative, it is treated as length+target where length is the * length of the array. - * @param { number } start - If start is negative, it is treated as length+start. If end is negative, it - * is treated as length+end. - * @param { number } [end] - If not specified, length of the this object is used as its default value. - * @returns { Int16Array } The array itself. + * @param { number } start - Start index of the range. + * If a negative number is passed in, it refers to the index of start + Int16Array.length. + * @param { number } [end] - End index of the range. + * If a negative number is passed in, it refers to the index of end + Int16Array.length. + * The default value is the length of the ArkTS Int16Array. + * @returns { Int16Array } ArkTS Int16Array after being modified. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6226,13 +6266,13 @@ declare namespace collections { */ copyWithin(target: number, start: number, end?: number): Int16Array; /** - * Determines whether all the members of an array satisfy the specified test. + * Checks whether all elements in this ArkTS Int16Array meet a given condition. * * @param { TypedArrayPredicateFn } predicate - A function that accepts up to three arguments. * The every method calls the predicate function for each element in the array until * the predicate returns a value which is coercible to the Boolean value false, or until the end of the array. - * @returns { boolean } true unless predicate returns a false value for a typed array element, - * in which case false is immediately returned. + * @returns { boolean } Check result. The value true is returned if all elements meet the given condition; + * otherwise, false is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The every method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6241,13 +6281,13 @@ declare namespace collections { * @since 12 */ /** - * Determines whether all the members of an array satisfy the specified test. + * Checks whether all elements in this ArkTS Int16Array meet a given condition. * * @param { TypedArrayPredicateFn } predicate - A function that accepts up to three arguments. * The every method calls the predicate function for each element in the array until * the predicate returns a value which is coercible to the Boolean value false, or until the end of the array. - * @returns { boolean } true unless predicate returns a false value for a typed array element, - * in which case false is immediately returned. + * @returns { boolean } Check result. The value true is returned if all elements meet the given condition; + * otherwise, false is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The every method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6258,14 +6298,14 @@ declare namespace collections { */ every(predicate: TypedArrayPredicateFn): boolean; /** - * Returns the this object after filling the section identified by start and end with value. + * Fills all elements in a given range in this ArkTS Int16Array with a value. * - * @param { number } value - value to fill array section with. - * @param { number } [start] - index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param { number } [end] - index to stop filling the array at. If end is negative, it is treated as - * length+end. - * @returns { Int16Array } The array itself. + * @param { number } value - Value to fill in. + * @param { number } [start] - Start index of the range. If a negative number is passed in, + * it refers to the index of start + Int16Array.length. The default value is 0. + * @param { number } [end] - End index of the range (exclusive). If a negative number is passed in, + * it refers to the index of end + Int16Array.length. The default value is the length of the ArkTS Int16Array. + * @returns { Int16Array } Filled ArkTS Int16Array. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The fill method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6274,14 +6314,14 @@ declare namespace collections { * @since 12 */ /** - * Returns the this object after filling the section identified by start and end with value. + * Fills all elements in a given range in this ArkTS Int16Array with a value. * - * @param { number } value - value to fill array section with. - * @param { number } [start] - index to start filling the array at. If start is negative, it is treated as - * length+start where length is the length of the array. - * @param { number } [end] - index to stop filling the array at. If end is negative, it is treated as - * length+end. - * @returns { Int16Array } The array itself. + * @param { number } value - Value to fill in. + * @param { number } [start] - Start index of the range. If a negative number is passed in, + * it refers to the index of start + Int16Array.length. The default value is 0. + * @param { number } [end] - End index of the range (exclusive). If a negative number is passed in, + * it refers to the index of end + Int16Array.length. The default value is the length of the ArkTS Int16Array. + * @returns { Int16Array } Filled ArkTS Int16Array. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The fill method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6292,11 +6332,11 @@ declare namespace collections { */ fill(value: number, start?: number, end?: number): Int16Array; /** - * Returns the elements of an array that meet the condition specified in a callback function. + * Returns a new ArkTS Int16Array that contains all elements that meet the given condition. * * @param { TypedArrayPredicateFn } predicate - A function that accepts up to three arguments. * The filter method calls the predicate function one time for each element in the array. - * @returns { Int16Array } The array itself. + * @returns { Int16Array } Filtered ArkTS Int16Array. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The filter method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6305,11 +6345,11 @@ declare namespace collections { * @since 12 */ /** - * Returns the elements of an array that meet the condition specified in a callback function. + * Returns a new ArkTS Int16Array that contains all elements that meet the given condition. * * @param { TypedArrayPredicateFn } predicate - A function that accepts up to three arguments. * The filter method calls the predicate function one time for each element in the array. - * @returns { Int16Array } The array itself. + * @returns { Int16Array } Filtered ArkTS Int16Array. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The filter method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6320,14 +6360,14 @@ declare namespace collections { */ filter(predicate: TypedArrayPredicateFn): Int16Array; /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. + * Returns the value of the first element that passes a test provided by a callback function. + * If none of the elements pass the test, undefined is returned. * * @param { TypedArrayPredicateFn } predicate - find calls predicate once for each element of * the array, in ascending order, until it finds one where predicate returns true. * If such an element is found, find immediately returns that element value. Otherwise, find returns undefined. - * @returns { number | undefined } The first element in the typed array - * that satisfies the provided testing function. Otherwise, undefined is returned. + * @returns { number | undefined } Value of the first element that passes the test. + * If none of the elements pass the test, undefined is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The find method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6336,14 +6376,14 @@ declare namespace collections { * @since 12 */ /** - * Returns the value of the first element in the array where predicate is true, and undefined - * otherwise. + * Returns the value of the first element that passes a test provided by a callback function. + * If none of the elements pass the test, undefined is returned. * * @param { TypedArrayPredicateFn } predicate - find calls predicate once for each element of * the array, in ascending order, until it finds one where predicate returns true. * If such an element is found, find immediately returns that element value. Otherwise, find returns undefined. - * @returns { number | undefined } The first element in the typed array - * that satisfies the provided testing function. Otherwise, undefined is returned. + * @returns { number | undefined } Value of the first element that passes the test. + * If none of the elements pass the test, undefined is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The find method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6354,13 +6394,14 @@ declare namespace collections { */ find(predicate: TypedArrayPredicateFn): number | undefined; /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. + * Returns the index of the first element that passes a test provided by a callback function. + * If none of the elements pass the test, -1 is returned. * * @param { TypedArrayPredicateFn } predicate - find calls predicate once for each element of * the array, in ascending order, until it finds one where predicate returns true. If such an element is found, * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1. + * @returns { number } Index of the first element that passes the test. + * If none of the elements pass the test, -1 is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The findIndex method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6369,13 +6410,14 @@ declare namespace collections { * @since 12 */ /** - * Returns the index of the first element in the array where predicate is true, and -1 - * otherwise. + * Returns the index of the first element that passes a test provided by a callback function. + * If none of the elements pass the test, -1 is returned. * * @param { TypedArrayPredicateFn } predicate - find calls predicate once for each element of * the array, in ascending order, until it finds one where predicate returns true. If such an element is found, * findIndex immediately returns that element index. Otherwise, findIndex returns -1. - * @returns { number } The index of the first element in the typed array that passes the test. Otherwise, -1. + * @returns { number } Index of the first element that passes the test. + * If none of the elements pass the test, -1 is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The findIndex method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6386,7 +6428,7 @@ declare namespace collections { */ findIndex(predicate: TypedArrayPredicateFn): number; /** - * Performs the specified action for each element in an array. + * Calls a callback function for each element in this ArkTS Int16Array. * * @param { TypedArrayForEachCallback } callbackFn - A function that * accepts up to three arguments. @@ -6399,7 +6441,7 @@ declare namespace collections { * @since 12 */ /** - * Performs the specified action for each element in an array. + * Calls a callback function for each element in this ArkTS Int16Array. * * @param { TypedArrayForEachCallback } callbackFn - A function that * accepts up to three arguments. @@ -6414,12 +6456,14 @@ declare namespace collections { */ forEach(callbackFn: TypedArrayForEachCallback): void; /** - * Returns the index of the first occurrence of a value in an array. + * Returns the index of the first occurrence of a value in this ArkTS Int16Array. + * If the value is not found, -1 is returned. * - * @param { number } searchElement - The value to locate in the array. - * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - * @returns { number } The first index of searchElement in the typed array; -1 if not found. + * @param { number } searchElement - Value to search for. + * @param { number } [fromIndex] - Index from which the search starts. The default value is 0. + * If the index is greater than or equal to the length of the ArkTS Int16Array, -1 is returned. + * If a negative number is passed in, the search starts from the end of the ArkTS Int16Array. + * @returns { number } Index of the first occurrence of the value. If the value is not found, -1 is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The indexOf method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6428,12 +6472,14 @@ declare namespace collections { * @since 12 */ /** - * Returns the index of the first occurrence of a value in an array. + * Returns the index of the first occurrence of a value in this ArkTS Int16Array. + * If the value is not found, -1 is returned. * - * @param { number } searchElement - The value to locate in the array. - * @param { number } [fromIndex] - The array index at which to begin the search. If fromIndex is omitted, the - * search starts at index 0. - * @returns { number } The first index of searchElement in the typed array; -1 if not found. + * @param { number } searchElement - Value to search for. + * @param { number } [fromIndex] - Index from which the search starts. The default value is 0. + * If the index is greater than or equal to the length of the ArkTS Int16Array, -1 is returned. + * If a negative number is passed in, the search starts from the end of the ArkTS Int16Array. + * @returns { number } Index of the first occurrence of the value. If the value is not found, -1 is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The indexOf method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6444,11 +6490,10 @@ declare namespace collections { */ indexOf(searchElement: number, fromIndex?: number): number; /** - * Adds all the elements of an array separated by the specified separator string. - * @param { string } [separator] - A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - * @returns { string } A string with all typed array elements joined. - * If array.length is 0, the empty string is returned. + * Concatenates all elements in this ArkTS Int16Array into a string, with a given separator. + * @param { string } [separator] - Separator to be used. + * If no value is passed in, a comma (,) is used as the separator. + * @returns { string } String obtained. If the array is empty, an empty string is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The join method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6457,11 +6502,10 @@ declare namespace collections { * @since 12 */ /** - * Adds all the elements of an array separated by the specified separator string. - * @param { string } [separator] - A string used to separate one element of an array from the next in the - * resulting String. If omitted, the array elements are separated with a comma. - * @returns { string } A string with all typed array elements joined. - * If array.length is 0, the empty string is returned. + * Concatenates all elements in this ArkTS Int16Array into a string, with a given separator. + * @param { string } [separator] - Separator to be used. + * If no value is passed in, a comma (,) is used as the separator. + * @returns { string } String obtained. If the array is empty, an empty string is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The join method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6472,13 +6516,13 @@ declare namespace collections { */ join(separator?: string): string; /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. + * Applies a callback function to each element in this ArkTS Int16Array + * and uses the result to create an ArkTS Int16Array. * * @param { TypedArrayMapCallback } callbackFn - A function that * accepts up to three arguments. * The map method calls the callbackfn function one time for each element in the array. - * @returns { Int16Array } The array itself. + * @returns { Int16Array } New ArkTS Int16Array generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The map method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6487,13 +6531,13 @@ declare namespace collections { * @since 12 */ /** - * Calls a defined callback function on each element of an array, and returns an array that - * contains the results. + * Applies a callback function to each element in this ArkTS Int16Array + * and uses the result to create an ArkTS Int16Array. * * @param { TypedArrayMapCallback } callbackFn - A function that * accepts up to three arguments. * The map method calls the callbackfn function one time for each element in the array. - * @returns { Int16Array } The array itself. + * @returns { Int16Array } New ArkTS Int16Array generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The map method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6624,7 +6668,7 @@ declare namespace collections { */ reduce(callbackFn: TypedArrayReduceCallback, initialValue: U): U; /** - * Reverses the elements in an Array. + * Reverses this ArkTS Int16Array. * * @returns { Int16Array } The reference to the original typed array, now reversed. *
Note that the typed array is reversed in place, and no copy is made. @@ -6635,7 +6679,7 @@ declare namespace collections { * @since 12 */ /** - * Reverses the elements in an Array. + * Reverses this ArkTS Int16Array. * * @returns { Int16Array } The reference to the original typed array, now reversed. *
Note that the typed array is reversed in place, and no copy is made. @@ -6648,10 +6692,10 @@ declare namespace collections { */ reverse(): Int16Array; /** - * Sets a value or an array of values. + * Writes the elements in an array-like object to the given start position in sequence. * - * @param { ArrayLike } array - A typed or untyped array of values to set. - * @param { number } [offset] - The index in the current array at which the values are to be written. + * @param { ArrayLike } array - Array-like object whose elements will be written. + * @param { number } [offset] - Start position for writing data. The default value is 0. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The set method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6660,10 +6704,10 @@ declare namespace collections { * @since 12 */ /** - * Sets a value or an array of values. + * Writes the elements in an array-like object to the given start position in sequence. * - * @param { ArrayLike } array - A typed or untyped array of values to set. - * @param { number } [offset] - The index in the current array at which the values are to be written. + * @param { ArrayLike } array - Array-like object whose elements will be written. + * @param { number } [offset] - Start position for writing data. The default value is 0. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The set method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6674,12 +6718,13 @@ declare namespace collections { */ set(array: ArrayLike, offset?: number): void; /** - * Returns a section of an array. + * Selects a range of elements in this ArkTS Int16Array to create an ArkTS Int16Array. * - * @param { number } [start] - The beginning of the specified portion of the array. - * @param { number } [end] - The end of the specified portion of the array. - * This is exclusive of the element at the index 'end'. - * @returns { Int16Array } A new typed array containing the extracted elements. + * @param { number } [start] - Start index of the range. If a negative number is passed in, + * it refers to the index of start + Int16Array.length. The default value is 0. + * @param { number } [end] - End index of the range (exclusive). If a negative number is passed in, + * it refers to the index of end + Int16Array.length. The default value is the length of the ArkTS Int16Array. + * @returns { Int16Array } New ArkTS Int16Array generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The slice method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6688,12 +6733,13 @@ declare namespace collections { * @since 12 */ /** - * Returns a section of an array. + * Selects a range of elements in this ArkTS Int16Array to create an ArkTS Int16Array. * - * @param { number } [start] - The beginning of the specified portion of the array. - * @param { number } [end] - The end of the specified portion of the array. - * This is exclusive of the element at the index 'end'. - * @returns { Int16Array } A new typed array containing the extracted elements. + * @param { number } [start] - Start index of the range. If a negative number is passed in, + * it refers to the index of start + Int16Array.length. The default value is 0. + * @param { number } [end] - End index of the range (exclusive). If a negative number is passed in, + * it refers to the index of end + Int16Array.length. The default value is the length of the ArkTS Int16Array. + * @returns { Int16Array } New ArkTS Int16Array generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The slice method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6704,13 +6750,13 @@ declare namespace collections { */ slice(start?: number, end?: number): Int16Array; /** - * Determines whether the specified callback function returns true for any element of an array. + * Checks whether any element in this ArkTS Int16Array meets a given condition. * * @param { TypedArrayPredicateFn } predicate - A function that accepts up to three arguments. * The some method calls the predicate function for each element in the array until * the predicate returns a value which is coercible to the Boolean value true, or until the end of the array. - * @returns { boolean } false unless predicate returns a truthy value for a typed array element, - * in which case true is immediately returned. + * @returns { boolean } Check result. The value true is returned if an element meeting the given condition exists; + * otherwise, false is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The some method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6719,13 +6765,13 @@ declare namespace collections { * @since 12 */ /** - * Determines whether the specified callback function returns true for any element of an array. + * Checks whether any element in this ArkTS Int16Array meets a given condition. * * @param { TypedArrayPredicateFn } predicate - A function that accepts up to three arguments. * The some method calls the predicate function for each element in the array until * the predicate returns a value which is coercible to the Boolean value true, or until the end of the array. - * @returns { boolean } false unless predicate returns a truthy value for a typed array element, - * in which case true is immediately returned. + * @returns { boolean } Check result. The value true is returned if an element meeting the given condition exists; + * otherwise, false is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The some method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6736,7 +6782,7 @@ declare namespace collections { */ some(predicate: TypedArrayPredicateFn): boolean; /** - * Sorts an array. + * Sorts elements in this ArkTS Int16Array and returns the sorted ArkTS Int16Array. * * @param { TypedArrayCompareFn } [compareFn] - Function used to determine the order of the elements. * It is expected to return a negative value if first argument is less than second argument, @@ -6752,7 +6798,7 @@ declare namespace collections { * @since 12 */ /** - * Sorts an array. + * Sorts elements in this ArkTS Int16Array and returns the sorted ArkTS Int16Array. * * @param { TypedArrayCompareFn } [compareFn] - Function used to determine the order of the elements. * It is expected to return a negative value if first argument is less than second argument, @@ -6770,12 +6816,13 @@ declare namespace collections { */ sort(compareFn?: TypedArrayCompareFn): Int16Array; /** - * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. + * Returns a new ArkTS Int16Array based on the same ArkTS ArrayBuffer. * - * @param { number } [begin] - The index of the beginning of the array. - * @param { number } [end] - The index of the end of the array. - * @returns { Int16Array } A new Int16Array object. + * @param { number } [begin] - Start index of the range. If a negative number is passed in, + * it refers to the index of begin + Int16Array.length. The default value is 0. + * @param { number } [end] - End index of the range (exclusive). If a negative number is passed in, + * it refers to the index of end + Int16Array.length. The default value is the length of the ArkTS Int16Array. + * @returns { Int16Array } New ArkTS Int16Array generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The subarray method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6784,12 +6831,13 @@ declare namespace collections { * @since 12 */ /** - * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. + * Returns a new ArkTS Int16Array based on the same ArkTS ArrayBuffer. * - * @param { number } [begin] - The index of the beginning of the array. - * @param { number } [end] - The index of the end of the array. - * @returns { Int16Array } A new Int16Array object. + * @param { number } [begin] - Start index of the range. If a negative number is passed in, + * it refers to the index of begin + Int16Array.length. The default value is 0. + * @param { number } [end] - End index of the range (exclusive). If a negative number is passed in, + * it refers to the index of end + Int16Array.length. The default value is the length of the ArkTS Int16Array. + * @returns { Int16Array } New ArkTS Int16Array generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The subarray method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6800,10 +6848,10 @@ declare namespace collections { */ subarray(begin?: number, end?: number): Int16Array; /** - * Returns the item located at the specified index. + * Returns the element at the given index. If no element is found, undefined is returned. * - * @param { number } index - The zero-based index of the desired code unit.
- * A negative index will count back from the last item. + * @param { number } index - Index of the element. The index in an array always starts from 0 and is an integer. + * If a negative number is passed in, it refers to the index of index + Int16Array.length. * @returns { number | undefined } The element in the array matching the given index.
* Always returns undefined if index < -array.length or * index >= array.length without attempting to access the corresponding property. @@ -6815,10 +6863,10 @@ declare namespace collections { * @since 12 */ /** - * Returns the item located at the specified index. + * Returns the element at the given index. If no element is found, undefined is returned. * - * @param { number } index - The zero-based index of the desired code unit.
- * A negative index will count back from the last item. + * @param { number } index - Index of the element. The index in an array always starts from 0 and is an integer. + * If a negative number is passed in, it refers to the index of index + Int16Array.length. * @returns { number | undefined } The element in the array matching the given index.
* Always returns undefined if index < -array.length or * index >= array.length without attempting to access the corresponding property. @@ -6832,7 +6880,9 @@ declare namespace collections { */ at(index: number): number | undefined; /** - * Returns an iterator that iterates over numbers. + * Returns an iterator, each item of which is a JavaScript object. + * NOTE: + * This API cannot be used in .ets files. * * @returns { IterableIterator } Iterator object that yields numbers. * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. @@ -6841,7 +6891,9 @@ declare namespace collections { * @since 12 */ /** - * Returns an iterator that iterates over numbers. + * Returns an iterator, each item of which is a JavaScript object. + * NOTE: + * This API cannot be used in .ets files. * * @returns { IterableIterator } Iterator object that yields numbers. * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. @@ -6852,20 +6904,20 @@ declare namespace collections { */ [Symbol.iterator](): IterableIterator; /** - * Returns an iterable of key, value pairs for every entry in the array + * Returns an iterator object that contains the key-value pair of each element in this ArkTS Int16Array. * * @returns { IterableIterator<[number, number]> } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The method cannot be bound. + * @throws { BusinessError } 10200011 - The entries method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Returns an iterable of key, value pairs for every entry in the array + * Returns an iterator object that contains the key-value pair of each element in this ArkTS Int16Array. * * @returns { IterableIterator<[number, number]> } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The method cannot be bound. + * @throws { BusinessError } 10200011 - The entries method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -6874,20 +6926,20 @@ declare namespace collections { */ entries(): IterableIterator<[number, number]>; /** - * Returns an iterable of keys in the array + * Returns an iterator object that contains the key (index) of each element in this ArkTS Int16Array. * * @returns { IterableIterator } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The method cannot be bound. + * @throws { BusinessError } 10200011 - The keys method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Returns an iterable of keys in the array + * Returns an iterator object that contains the key (index) of each element in this ArkTS Int16Array. * * @returns { IterableIterator } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The method cannot be bound. + * @throws { BusinessError } 10200011 - The keys method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -6896,20 +6948,20 @@ declare namespace collections { */ keys(): IterableIterator; /** - * Returns an iterable of values in the array + * Returns an iterator object that contains the value of each element in this ArkTS Int16Array. * * @returns { IterableIterator } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The method cannot be bound. + * @throws { BusinessError } 10200011 - The values method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Returns an iterable of values in the array + * Returns an iterator object that contains the value of each element in this ArkTS Int16Array. * * @returns { IterableIterator } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The method cannot be bound. + * @throws { BusinessError } 10200011 - The values method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -6918,12 +6970,13 @@ declare namespace collections { */ values(): IterableIterator; /** - * Determines whether an array includes a certain element, returning true or false as appropriate. + * Checks whether elements are contained in this ArkTS Int16Array. * - * @param { number } searchElement - The element to search for. - * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement. - * @returns { boolean } A boolean value which is true if the value searchElement is found
- * within the typed array (or the part of the typed array indicated by the index fromIndex, if specified). + * @param { number } searchElement - Element to search for. + * @param { number } [fromIndex] - Index from which the search starts. If a negative number is passed in, + * it refers to the index of fromIndex + Int16Array.length. The default value is 0. + * @returns { boolean } Check result. The value true is returned if the element exists; + * otherwise, false is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The at method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6932,12 +6985,13 @@ declare namespace collections { * @since 12 */ /** - * Determines whether an array includes a certain element, returning true or false as appropriate. + * Checks whether elements are contained in this ArkTS Int16Array. * - * @param { number } searchElement - The element to search for. - * @param { number } [fromIndex] - The position in this array at which to begin searching for searchElement. - * @returns { boolean } A boolean value which is true if the value searchElement is found
- * within the typed array (or the part of the typed array indicated by the index fromIndex, if specified). + * @param { number } searchElement - Element to search for. + * @param { number } [fromIndex] - Index from which the search starts. If a negative number is passed in, + * it refers to the index of fromIndex + Int16Array.length. The default value is 0. + * @returns { boolean } Check result. The value true is returned if the element exists; + * otherwise, false is returned. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The at method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -6948,14 +7002,14 @@ declare namespace collections { */ includes(searchElement: number, fromIndex?: number): boolean; /** - * Returns the item at that index. + * Returns the element at a given index in this Int16Array. * * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Returns the item at that index. + * Returns the element at a given index in this Int16Array. * * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -6964,11 +7018,12 @@ declare namespace collections { */ [index: number]: number; /** - * Find the last occurrence of a specified element in an Int16Array. + * Obtains the index of the last occurrence of the specified value in this ArkTS Int16Array. * * @param { number } searchElement - Element to search for in the Int16Array.. - * @param { number } fromIndex - The index at which to start the search. If provided: - *
If this index is negative, it is treated as Int16Array.length + fromIndex. + * @param { number } fromIndex - Index from which the search starts. The default value is 0. + * If the index is greater than or equal to the length of the ArkTS Int16Array, -1 is returned. + * If a negative number is passed in, the search starts from the end of the ArkTS Int16Array. * @returns { number } Returns the last index of the specified element if found; otherwise, returns -1. * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range. * @throws { BusinessError } 10200011 - The lastIndexOf method cannot be bound. @@ -7015,8 +7070,7 @@ declare namespace collections { /** * Convert an Int16Array to a string. * - * @returns { string } Returns a string representing the specified Int16Array and its elements, - * separated by commas. + * @returns { string } Returns a string representing the specified Int16Array and its elements, separated by commas. * @throws { BusinessError } 10200011 - The toString method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang