From be312340e017bcf536dc16c9bf16f6aa1402b8f6 Mon Sep 17 00:00:00 2001 From: caolili123 Date: Thu, 24 Jul 2025 14:01:08 +0800 Subject: [PATCH] =?UTF-8?q?Issue:[=E6=96=B0=E9=9C=80=E6=B1=82]:=20=20?= =?UTF-8?q?=E6=A0=B9=E6=8D=AEAPI=E6=96=87=E6=A1=A3=E4=BF=AE=E6=94=B9sdk?= =?UTF-8?q?=E4=B8=AD=E7=9A=84Description=20https://gitee.com/openharmony/i?= =?UTF-8?q?nterface=5Fsdk-js/issues/ICOG5J?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: caolili123 --- arkts/@arkts.collections.d.ets | 672 +++++++++++++++++---------------- 1 file changed, 351 insertions(+), 321 deletions(-) diff --git a/arkts/@arkts.collections.d.ets b/arkts/@arkts.collections.d.ets index 49ccadf010..254068fc63 100644 --- a/arkts/@arkts.collections.d.ets +++ b/arkts/@arkts.collections.d.ets @@ -1606,7 +1606,7 @@ declare namespace collections { @Sendable class Map { /** - * Returns the number of elements in the Map. + * Number of elements in a map. * * @type { number } * @readonly @@ -1615,7 +1615,7 @@ declare namespace collections { * @since 12 */ /** - * Returns the number of elements in the Map. + * Number of elements in a map. * * @type { number } * @readonly @@ -1626,23 +1626,23 @@ declare namespace collections { */ readonly size: number; /** - * A constructor used to create a Map. + * A constructor used to create an ArkTS map. * - * @param { readonly (readonly [K, V])[] | null } [entries] - An Array or other iterable object - * whose elements are key-value pairs. + * @param { readonly (readonly [K, V])[] | null } [entries] - Array containing key-value pairs, or iterator object. + * The default value is null, indicating that an empty map is created. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200012 - The Map's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The ArkTS Map's constructor cannot be directly invoked. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * A constructor used to create a Map. + * A constructor used to create an ArkTS map. * - * @param { readonly (readonly [K, V])[] | null } [entries] - An Array or other iterable object - * whose elements are key-value pairs. + * @param { readonly (readonly [K, V])[] | null } [entries] - Array containing key-value pairs, or iterator object. + * The default value is null, indicating that an empty map is created. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200012 - The Map's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The ArkTS Map's constructor cannot be directly invoked. * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice @@ -1650,23 +1650,23 @@ declare namespace collections { */ constructor(entries?: readonly (readonly [K, V])[] | null) /** - * A constructor used to create a Map. + * A constructor used to create an ArkTS map. * * @param { Iterable} [iterable] - An iterable object to convert to an ArkTS Map. * whose elements are key-value pairs. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200012 - The Map's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The ArkTS Map's constructor cannot be directly invoked. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * A constructor used to create a Map. + * A constructor used to create an ArkTS map. * * @param { Iterable} [iterable] - An iterable object to convert to an ArkTS Map. * whose elements are key-value pairs. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200012 - The Map's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The ArkTS Map's constructor cannot be directly invoked. * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice @@ -1674,7 +1674,9 @@ declare namespace collections { */ constructor(iterable: Iterable); /** - * Returns an iterator that iterates over key-value pairs. + * Returns an iterator, each item of which is a JavaScript object. + * NOTE: + * This API cannot be used in .ets files. * * @returns { IterableIterator<[K, V]> } Iterator object that yields key-value pairs. * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. @@ -1683,7 +1685,9 @@ declare namespace collections { * @since 12 */ /** - * Returns an iterator that iterates over key-value pairs. + * Returns an iterator, each item of which is a JavaScript object. + * NOTE: + * This API cannot be used in .ets files. * * @returns { IterableIterator<[K, V]> } Iterator object that yields key-value pairs. * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. @@ -1694,20 +1698,20 @@ declare namespace collections { */ [Symbol.iterator](): IterableIterator<[K, V]> /** - * Returns an iterable of key, value pairs for every entry in the map. + * Returns a map iterator object that contains the key-value pair of each element in this ArkTS map. * - * @returns { IterableIterator<[K, V]> } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The entries method cannot be bound. + * @returns { IterableIterator<[K, V]> } Map iterator object. + * @throws { BusinessError } 10200011 - The entries method cannot be bound with non-sendable. * @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 map. + * Returns a map iterator object that contains the key-value pair of each element in this ArkTS map. * - * @returns { IterableIterator<[K, V]> } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The entries method cannot be bound. + * @returns { IterableIterator<[K, V]> } Map iterator object. + * @throws { BusinessError } 10200011 - The entries method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -1716,20 +1720,20 @@ declare namespace collections { */ entries(): IterableIterator<[K, V]>; /** - * Returns an iterable of keys in the map. + * Returns a map iterator object that contains the key of each element in this ArkTS map. * - * @returns { IterableIterator } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The keys method cannot be bound. + * @returns { IterableIterator } Map iterator object. + * @throws { BusinessError } 10200011 - The keys method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Returns an iterable of keys in the map. + * Returns a map iterator object that contains the key of each element in this ArkTS map. * - * @returns { IterableIterator } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The keys method cannot be bound. + * @returns { IterableIterator } Map iterator object. + * @throws { BusinessError } 10200011 - The keys method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -1738,20 +1742,20 @@ declare namespace collections { */ keys(): IterableIterator; /** - * Returns an iterable of values in the map. + * Returns a map iterator object that contains the value of each element in this ArkTS map. * - * @returns { IterableIterator } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The values method cannot be bound. + * @returns { IterableIterator } Map iterator object. + * @throws { BusinessError } 10200011 - The values method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Returns an iterable of values in the map. + * Returns a map iterator object that contains the value of each element in this ArkTS map. * - * @returns { IterableIterator } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The values method cannot be bound. + * @returns { IterableIterator } Map iterator object. + * @throws { BusinessError } 10200011 - The values method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -1760,18 +1764,18 @@ declare namespace collections { */ values(): IterableIterator; /** - * Clears the map. + * Removes all elements from this ArkTS map. * - * @throws { BusinessError } 10200011 - The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Clears the map. + * Removes all elements from this ArkTS map. * - * @throws { BusinessError } 10200011 - The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -1780,26 +1784,26 @@ declare namespace collections { */ clear(): void; /** - * Returns true if an element in the Map existed and has been removed, or false if the element does not exist. + * Deletes a specified key from this ArkTS map. * - * @param { K } key - The key of the element to remove from the Map object. - * @returns { boolean } True if an element in the Map Object existed and has been removed, - * or false if the element does not exist. + * @param { K } key - Key to delete. + * @returns { boolean } Operation result. The value true is returned if the key exists and has been deleted; + * otherwise, false is returned. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200011 - The delete method cannot be bound. + * @throws { BusinessError } 10200011 - The delete method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Returns true if an element in the Map existed and has been removed, or false if the element does not exist. + * Deletes a specified key from this ArkTS map. * - * @param { K } key - The key of the element to remove from the Map object. - * @returns { boolean } True if an element in the Map Object existed and has been removed, - * or false if the element does not exist. + * @param { K } key - Key to delete. + * @returns { boolean } Operation result. The value true is returned if the key exists and has been deleted; + * otherwise, false is returned. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200011 - The delete method cannot be bound. + * @throws { BusinessError } 10200011 - The delete method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -1808,24 +1812,24 @@ declare namespace collections { */ delete(key: K): boolean; /** - * Executes the provided callback once for each key of the map which actually exist. + * Calls a callback function for each key-value pair in this ArkTS map. * * @param { function } callbackFn - A function that accepts up to three arguments. * The function to be called for each element. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 10200011 - The forEach method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Executes the provided callback once for each key of the map which actually exist. + * Calls a callback function for each key-value pair in this ArkTS map. * * @param { function } callbackFn - A function that accepts up to three arguments. * The function to be called for each element. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 10200011 - The forEach method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -1843,7 +1847,7 @@ declare namespace collections { * @returns { V | undefined } The element associated with the specified key, * or undefined if the key can''t be found in the Map object. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200011 - The get method cannot be bound. + * @throws { BusinessError } 10200011 - The get method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice @@ -1859,7 +1863,7 @@ declare namespace collections { * @returns { V | undefined } The element associated with the specified key, * or undefined if the key can''t be found in the Map object. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200011 - The get method cannot be bound. + * @throws { BusinessError } 10200011 - The get method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -1873,7 +1877,7 @@ declare namespace collections { * @param { K } key - The key of the element to test for presence in the Map object. * @returns { boolean } true if an element with the specified key exists in the Map Object; otherwise false. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200011 - The has method cannot be bound. + * @throws { BusinessError } 10200011 - The has method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice @@ -1885,7 +1889,7 @@ declare namespace collections { * @param { K } key - The key of the element to test for presence in the Map object. * @returns { boolean } true if an element with the specified key exists in the Map Object; otherwise false. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200011 - The has method cannot be bound. + * @throws { BusinessError } 10200011 - The has method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -1901,7 +1905,7 @@ declare namespace collections { * @param { V } value - The value of the element to add to the object. * @returns { Map } The Object. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200011 - The set method cannot be bound. + * @throws { BusinessError } 10200011 - The set method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice @@ -1915,7 +1919,7 @@ declare namespace collections { * @param { V } value - The value of the element to add to the object. * @returns { Map } The Object. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200011 - The set method cannot be bound. + * @throws { BusinessError } 10200011 - The set method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -1949,7 +1953,7 @@ declare namespace collections { @Sendable class Set { /** - * Returns the number of elements in the Set. + * Number of elements in a set. * * @type { number } * @readonly @@ -1958,7 +1962,7 @@ declare namespace collections { * @since 12 */ /** - * Returns the number of elements in the Set. + * Number of elements in a set. * * @type { number } * @readonly @@ -1969,25 +1973,25 @@ declare namespace collections { */ readonly size: number; /** - * A constructor used to create a Set. + * A constructor used to create an ArkTS set. * * @param { readonly T[] | null } [values] - If an iterable object is passed, * all of its elements will be added to the new Set. * If you don't specify this parameter, or its value is null, the new Set is empty. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200012 - The Set's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The ArkTS Set's constructor cannot be directly invoked. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * A constructor used to create a Set. + * A constructor used to create an ArkTS set. * * @param { readonly T[] | null } [values] - If an iterable object is passed, * all of its elements will be added to the new Set. * If you don't specify this parameter, or its value is null, the new Set is empty. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200012 - The Set's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The ArkTS Set's constructor cannot be directly invoked. * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice @@ -1995,25 +1999,25 @@ declare namespace collections { */ constructor(values?: readonly T[] | null); /** - * A constructor used to create a Set. + * A constructor used to create an ArkTS set. * * @param { Iterable} [iterable] - If an iterable object is passed, * all of its elements will be added to the new Set. * If you don't specify this parameter, or its value is null, the new Set is empty. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200012 - The Set's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The ArkTS Set's constructor cannot be directly invoked. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * A constructor used to create a Set. + * A constructor used to create an ArkTS set. * * @param { Iterable} [iterable] - If an iterable object is passed, * all of its elements will be added to the new Set. * If you don't specify this parameter, or its value is null, the new Set is empty. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200012 - The Set's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The ArkTS Set's constructor cannot be directly invoked. * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice @@ -2021,7 +2025,9 @@ declare namespace collections { */ constructor(iterable: Iterable); /** - * Returns an iterator that can be used to iterate over elements of type T. + * Returns an iterator, each item of which is a JavaScript object. + * NOTE: + * This API cannot be used in .ets files. * * @returns { IterableIterator } Iterator object. * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. @@ -2030,7 +2036,9 @@ declare namespace collections { * @since 12 */ /** - * Returns an iterator that can be used to iterate over elements of type T. + * Returns an iterator, each item of which is a JavaScript object. + * NOTE: + * This API cannot be used in .ets files. * * @returns { IterableIterator } Iterator object. * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. @@ -2041,20 +2049,20 @@ declare namespace collections { */ [Symbol.iterator](): IterableIterator; /** - * Returns an iterable of [value, value] pairs for each element in this set. + * Returns a set iterator object that contains the key-value pair of each element in this ArkTS set. * - * @returns { IterableIterator<[T, T]> } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The entries method cannot be bound. + * @returns { IterableIterator<[T, T]> } Set iterator object. + * @throws { BusinessError } 10200011 - The entries method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Returns an iterable of [value, value] pairs for each element in this set. + * Returns a set iterator object that contains the key-value pair of each element in this ArkTS set. * - * @returns { IterableIterator<[T, T]> } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The entries method cannot be bound. + * @returns { IterableIterator<[T, T]> } Set iterator object. + * @throws { BusinessError } 10200011 - The entries method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -2063,20 +2071,20 @@ declare namespace collections { */ entries(): IterableIterator<[T, T]>; /** - * Returns an iterable of the values in the set. + * Returns a set iterator object that contains the key of each element in this ArkTS set. * - * @returns { IterableIterator } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The keys method cannot be bound. + * @returns { IterableIterator } Set iterator object. + * @throws { BusinessError } 10200011 - The keys method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Returns an iterable of the values in the set. + * Returns a set iterator object that contains the key of each element in this ArkTS set. * - * @returns { IterableIterator } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The keys method cannot be bound. + * @returns { IterableIterator } Set iterator object. + * @throws { BusinessError } 10200011 - The keys method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -2085,20 +2093,20 @@ declare namespace collections { */ keys(): IterableIterator; /** - * Returns an iterable of values in the set. + * Returns a set iterator object that contains the value of each element in this ArkTS set. * - * @returns { IterableIterator } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The values method cannot be bound. + * @returns { IterableIterator } Set iterator object. + * @throws { BusinessError } 10200011 - The values method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Returns an iterable of values in the set. + * Returns a set iterator object that contains the value of each element in this ArkTS set. * - * @returns { IterableIterator } A new iterable iterator object. - * @throws { BusinessError } 10200011 - The values method cannot be bound. + * @returns { IterableIterator } Set iterator object. + * @throws { BusinessError } 10200011 - The values method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -2107,22 +2115,22 @@ declare namespace collections { */ values(): IterableIterator; /** - * Appends a new element with a specified value to the end of the Set. + * Checks whether a value exists in this ArkTS set, and if not, adds the value to the set. * * @param { T } value - The value of the element to add to the Set object. * @returns { Set } The Set object with added value. - * @throws { BusinessError } 10200011 - The add method cannot be bound. + * @throws { BusinessError } 10200011 - The add method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Appends a new element with a specified value to the end of the Set. + * Checks whether a value exists in this ArkTS set, and if not, adds the value to the set. * * @param { T } value - The value of the element to add to the Set object. * @returns { Set } The Set object with added value. - * @throws { BusinessError } 10200011 - The add method cannot be bound. + * @throws { BusinessError } 10200011 - The add method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -2131,18 +2139,18 @@ declare namespace collections { */ add(value: T): Set; /** - * Clears the Set. + * Removes all elements from this ArkTS set. * - * @throws { BusinessError } 10200011 - The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Clears the Set. + * Removes all elements from this ArkTS set. * - * @throws { BusinessError } 10200011 - The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -2155,7 +2163,7 @@ declare namespace collections { * * @param { T } value - The value to remove from Set. * @returns { boolean } Returns true if value was already in Set; otherwise false. - * @throws { BusinessError } 10200011 - The delete method cannot be bound. + * @throws { BusinessError } 10200011 - The delete method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice @@ -2166,7 +2174,7 @@ declare namespace collections { * * @param { T } value - The value to remove from Set. * @returns { boolean } Returns true if value was already in Set; otherwise false. - * @throws { BusinessError } 10200011 - The delete method cannot be bound. + * @throws { BusinessError } 10200011 - The delete method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -2175,24 +2183,24 @@ declare namespace collections { */ delete(value: T): boolean; /** - * Executes a provided function once per each value in the Set object, in insertion order. + * Calls a callback function for each key-value pair in this ArkTS set. * * @param { function } callbackFn - A function that accepts up to three arguments. * The function to be called for each element. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 10200011 - The forEach method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Executes a provided function once per each value in the Set object, in insertion order. + * Calls a callback function for each key-value pair in this ArkTS set. * * @param { function } callbackFn - A function that accepts up to three arguments. * The function to be called for each element. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 10200011 - The forEach method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -2201,26 +2209,26 @@ declare namespace collections { */ forEach(callbackFn: (value: T, value2: T, set: Set) => void): void; /** - * A boolean indicating whether an element with the specified value exists in the Set or not. + * Checks whether a value exists in this ArkTS set. * * @param { T } value - The value to test for presence in the Object. * @returns { boolean } Returns true if an element with the specified value exists in the Set object; * otherwise false. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200011 - The has method cannot be bound. + * @throws { BusinessError } 10200011 - The has method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * A boolean indicating whether an element with the specified value exists in the Set or not. + * Checks whether a value exists in this ArkTS set. * * @param { T } value - The value to test for presence in the Object. * @returns { boolean } Returns true if an element with the specified value exists in the Set object; * otherwise false. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 10200011 - The has method cannot be bound. + * @throws { BusinessError } 10200011 - The has method cannot be bound with non-sendable. * @throws { BusinessError } 10200201 - Concurrent modification error. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -2259,7 +2267,7 @@ declare namespace collections { @Sendable class ArrayBuffer { /** - * Read-only. The length of the ArrayBuffer (in bytes). + * Read-only. Number of bytes occupied by the buffer. * * @type { number } * @readonly @@ -2268,7 +2276,7 @@ declare namespace collections { * @since 12 */ /** - * Read-only. The length of the ArrayBuffer (in bytes). + * Read-only. Number of bytes occupied by the buffer. * * @type { number } * @readonly @@ -2279,9 +2287,9 @@ declare namespace collections { */ readonly byteLength: number; /** - * A constructor used to create a ArrayBuffer. + * A constructor used to create an ArkTS ArrayBuffer of a given length. * - * @param { number } byteLength - The length of the ArkTS array buffer + * @param { number } byteLength - Number of bytes occupied by the buffer. * @throws { BusinessError } 10200012 - The ArrayBuffer's constructor cannot be directly invoked. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Utils.Lang @@ -2289,9 +2297,9 @@ declare namespace collections { * @since 12 */ /** - * A constructor used to create a ArrayBuffer. + * A constructor used to create an ArkTS ArrayBuffer of a given length. * - * @param { number } byteLength - The length of the ArkTS array buffer + * @param { number } byteLength - Number of bytes occupied by the buffer. * @throws { BusinessError } 10200012 - The ArrayBuffer's constructor cannot be directly invoked. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Utils.Lang @@ -2301,11 +2309,13 @@ declare namespace collections { */ constructor(byteLength: number); /** - * Returns a section of an ArrayBuffer. + * Selects a range of elements in this ArkTS ArrayBuffer to create an ArkTS ArrayBuffer. * - * @param { number } begin - Zero-based index at which to start extraction, converted to an integer. - * @param { number } [end] - Zero-based index at which to end extraction, converted to an integer. - * Default is buffer.length + * @param { number } begin - Start index of the range. + * If a negative number is passed in, it refers to the index of begin + arraybuffer.byteLength. + * @param { number } [end] - End index of the range. + * If a negative number is passed in, it refers to the index of end + arraybuffer.byteLength. + * The default value is the length of the original ArkTS ArrayBuffer. Default is buffer.length * @returns { ArrayBuffer } A new ArrayBuffer containing the extracted elements. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The slice method cannot be bound. @@ -2315,11 +2325,13 @@ declare namespace collections { * @since 12 */ /** - * Returns a section of an ArrayBuffer. + * Selects a range of elements in this ArkTS ArrayBuffer to create an ArkTS ArrayBuffer. * - * @param { number } begin - Zero-based index at which to start extraction, converted to an integer. - * @param { number } [end] - Zero-based index at which to end extraction, converted to an integer. - * Default is buffer.length + * @param { number } begin - Start index of the range. + * If a negative number is passed in, it refers to the index of begin + arraybuffer.byteLength. + * @param { number } [end] - End index of the range. + * If a negative number is passed in, it refers to the index of end + arraybuffer.byteLength. + * The default value is the length of the original ArkTS ArrayBuffer. Default is buffer.length * @returns { ArrayBuffer } A new ArrayBuffer containing the extracted elements. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The slice method cannot be bound. @@ -2356,7 +2368,7 @@ declare namespace collections { @Sendable class Int8Array { /** - * The size in bytes of each element in the array. + * Number of bytes occupied by each element in the ArkTS array. * * @type { number } * @readonly @@ -2366,7 +2378,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 @@ -2378,7 +2390,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 @@ -2387,7 +2399,7 @@ declare namespace collections { * @since 12 */ /** - * The ArrayBuffer instance referenced by the array. + * Bottom-layer buffer used by an ArkTS array. * * @type { ArrayBuffer } * @readonly @@ -2398,7 +2410,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 @@ -2407,7 +2419,7 @@ declare namespace collections { * @since 12 */ /** - * The length in bytes of the array. + * Number of bytes occupied by the ArkTS array. * * @type { number } * @readonly @@ -2418,7 +2430,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 @@ -2427,7 +2439,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 @@ -2438,7 +2450,7 @@ declare namespace collections { */ readonly byteOffset: number; /** - * The length of the array. + * Number of elements in the ArkTS array. * * @type { number } * @readonly @@ -2447,7 +2459,7 @@ declare namespace collections { * @since 12 */ /** - * The length of the array. + * Number of elements in the ArkTS array. * * @type { number } * @readonly @@ -2458,7 +2470,7 @@ declare namespace collections { */ readonly length: number; /** - * A constructor used to create an Int8Array. + * A constructor used to create an empty ArkTS Int8Array. * * @throws { BusinessError } 10200012 - The Int8Array's constructor cannot be directly invoked. * @syscap SystemCapability.Utils.Lang @@ -2466,7 +2478,7 @@ declare namespace collections { * @since 12 */ /** - * A constructor used to create an Int8Array. + * A constructor used to create an empty ArkTS Int8Array. * * @throws { BusinessError } 10200012 - The Int8Array's constructor cannot be directly invoked. * @syscap SystemCapability.Utils.Lang @@ -2476,9 +2488,9 @@ declare namespace collections { */ constructor(); /** - * A constructor used to create an Int8Array. + * A constructor used to create an ArkTS Int8Array of a given length. * - * @param { number } length - The length of the array + * @param { number } length - Length of the ArkTS Int8Array. * @throws { BusinessError } 10200012 - The Int8Array's constructor cannot be directly invoked. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Utils.Lang @@ -2486,9 +2498,9 @@ declare namespace collections { * @since 12 */ /** - * A constructor used to create an Int8Array. + * A constructor used to create an ArkTS Int8Array of a given length. * - * @param { number } length - The length of the array + * @param { number } length - Length of the ArkTS Int8Array. * @throws { BusinessError } 10200012 - The Int8Array's constructor cannot be directly invoked. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Utils.Lang @@ -2520,9 +2532,10 @@ declare namespace collections { */ constructor(elements: Iterable); /** - * A constructor used to create an Int8Array. + * A constructor that creates an ArkTS Int8Array 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 TypedArray. 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 Int8Array's constructor cannot be directly invoked. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Utils.Lang @@ -2530,9 +2543,10 @@ declare namespace collections { * @since 12 */ /** - * A constructor used to create an Int8Array. + * A constructor that creates an ArkTS Int8Array 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 TypedArray. 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 Int8Array's constructor cannot be directly invoked. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Utils.Lang @@ -2542,13 +2556,12 @@ declare namespace collections { */ constructor(array: ArrayLike | ArrayBuffer); /** - * A constructor used to create an Int8Array. + * A constructor that creates an ArkTS Int8Array 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 Int8Array. + * 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 TypedArray. The default value is 0. * @throws { BusinessError } 10200012 - The Int8Array's constructor cannot be directly invoked. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Utils.Lang @@ -2556,13 +2569,12 @@ declare namespace collections { * @since 12 */ /** - * A constructor used to create an Int8Array. + * A constructor that creates an ArkTS Int8Array 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 Int8Array. + * 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 TypedArray. The default value is 0. * @throws { BusinessError } 10200012 - The Int8Array's constructor cannot be directly invoked. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Utils.Lang @@ -2572,10 +2584,10 @@ declare namespace collections { */ constructor(buffer: ArrayBuffer, byteOffset?: number, length?: number); /** - * Creates an Int8Array from an array-like object. + * Creates an ArkTS Int8Array from an array-like or iterator object. * - * @param { ArrayLike } arrayLike - An array-like object to convert to an Int8Array. - * @returns { Int8Array } A new Int8Array instance + * @param { ArrayLike } arrayLike - Array-like object used to construct the ArkTS Int8Array. + * @returns { Int8Array } New ArkTS Int8Array generated. * @throws { BusinessError } 401 - Parameter error. * @static * @syscap SystemCapability.Utils.Lang @@ -2583,10 +2595,10 @@ declare namespace collections { * @since 12 */ /** - * Creates an Int8Array from an array-like object. + * Creates an ArkTS Int8Array from an array-like or iterator object. * - * @param { ArrayLike } arrayLike - An array-like object to convert to an Int8Array. - * @returns { Int8Array } A new Int8Array instance + * @param { ArrayLike } arrayLike - Array-like object used to construct the ArkTS Int8Array. + * @returns { Int8Array } New ArkTS Int8Array generated. * @throws { BusinessError } 401 - Parameter error. * @static * @syscap SystemCapability.Utils.Lang @@ -2597,11 +2609,11 @@ declare namespace collections { static from(arrayLike: ArrayLike): Int8Array; /** - * Creates an Int8Array from an array-like object. + * Creates an ArkTS Int8Array from an array-like object. * - * @param { ArrayLike } arrayLike - An array-like object to convert to an Int8Array. + * @param { ArrayLike } arrayLike - Array-like object used to construct the ArkTS Int8Array. * @param { TypedArrayFromMapFn } mapFn - A mapping function to call on every element of the array. - * @returns { Int8Array } A new Int8Array instance + * @returns { Int8Array } New ArkTS Int8Array generated. * @throws { BusinessError } 401 - Parameter error. * @static * @syscap SystemCapability.Utils.Lang @@ -2609,11 +2621,11 @@ declare namespace collections { * @since 12 */ /** - * Creates an Int8Array from an array-like object. + * Creates an ArkTS Int8Array from an array-like object. * - * @param { ArrayLike } arrayLike - An array-like object to convert to an Int8Array. + * @param { ArrayLike } arrayLike - Array-like object used to construct the ArkTS Int8Array. * @param { TypedArrayFromMapFn } mapFn - A mapping function to call on every element of the array. - * @returns { Int8Array } A new Int8Array instance + * @returns { Int8Array } New ArkTS Int8Array generated. * @throws { BusinessError } 401 - Parameter error. * @static * @syscap SystemCapability.Utils.Lang @@ -2623,11 +2635,11 @@ declare namespace collections { */ static from(arrayLike: ArrayLike, mapFn: TypedArrayFromMapFn): Int8Array; /** - * Creates an Int8Array from an iterable object. + * Creates an ArkTS Int8Array from an iterator object. * - * @param { Iterable } arrayLike - An iterable object to convert to an Int8Array. - * @param { TypedArrayFromMapFn } [mapFn] - A mapping function to - * call on every element of the array. + * @param { Iterable } arrayLike - Iterator object used to construct the ArkTS Int8Array. + * @param { TypedArrayFromMapFn } [mapFn] - Mapping function. If no value is passed in, + * no special processing is conducted on the elements. * @returns { Int8Array } A new Int8Array instance * @throws { BusinessError } 401 - Parameter error. * @static @@ -2636,11 +2648,11 @@ declare namespace collections { * @since 12 */ /** - * Creates an Int8Array from an iterable object. + * Creates an ArkTS Int8Array from an iterator object. * - * @param { Iterable } arrayLike - An iterable object to convert to an Int8Array. - * @param { TypedArrayFromMapFn } [mapFn] - A mapping function to - * call on every element of the array. + * @param { Iterable } arrayLike - Iterator object used to construct the ArkTS Int8Array. + * @param { TypedArrayFromMapFn } [mapFn] - Mapping function. If no value is passed in, + * no special processing is conducted on the elements. * @returns { Int8Array } A new Int8Array instance * @throws { BusinessError } 401 - Parameter error. * @static @@ -2651,15 +2663,16 @@ declare namespace collections { */ static from(arrayLike: Iterable, mapFn?: TypedArrayFromMapFn): Int8Array; /** - * 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 Int8Array 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 { Int8Array } 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 + Int8Array.length. + * @param { number } [end] - End index of the range. + * If a negative number is passed in, it refers to the index of end + Int8Array.length. + * The default value is the length of the ArkTS Int8Array. + * @returns { Int8Array } ArkTS Int8Array after being modified. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -2668,15 +2681,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 Int8Array 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 { Int8Array } 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 + Int8Array.length. + * @param { number } [end] - End index of the range. + * If a negative number is passed in, it refers to the index of end + Int8Array.length. + * The default value is the length of the ArkTS Int8Array. + * @returns { Int8Array } ArkTS Int8Array after being modified. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The copyWithin method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -2687,13 +2701,13 @@ declare namespace collections { */ copyWithin(target: number, start: number, end?: number): Int8Array; /** - * Determines whether all the members of an array satisfy the specified test. + * Checks whether all elements in this ArkTS Int8Array 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. @@ -2702,13 +2716,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 Int8Array 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. @@ -2719,14 +2733,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 Int8Array 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 { Int8Array } 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 + typedarray.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 + typedarray.length. The default value is the length of the ArkTS Int8Array. + * @returns { Int8Array } Filled ArkTS Int8Array. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The fill method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -2735,14 +2749,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 Int8Array 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 { Int8Array } 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 + typedarray.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 + typedarray.length. The default value is the length of the ArkTS Int8Array. + * @returns { Int8Array } Filled ArkTS Int8Array. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The fill method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -2753,11 +2767,11 @@ declare namespace collections { */ fill(value: number, start?: number, end?: number): Int8Array; /** - * Returns the elements of an array that meet the condition specified in a callback function. + * Returns a new ArkTS Int8Array 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 { Int8Array } The array itself. + * @returns { Int8Array } Filtered ArkTS Int8Array. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The filter method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -2766,11 +2780,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 Int8Array 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 { Int8Array } The array itself. + * @returns { Int8Array } Filtered ArkTS Int8Array. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The filter method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -2781,14 +2795,14 @@ declare namespace collections { */ filter(predicate: TypedArrayPredicateFn): Int8Array; /** - * 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. @@ -2797,14 +2811,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. @@ -2815,13 +2829,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. @@ -2830,13 +2845,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. @@ -2847,7 +2863,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 Int8Array. * * @param { TypedArrayForEachCallback } callbackFn - A function that * accepts up to three arguments. @@ -2860,7 +2876,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 Int8Array. * * @param { TypedArrayForEachCallback } callbackFn - A function that * accepts up to three arguments. @@ -2875,12 +2891,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 Int8Array. + * 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 Int8Array, -1 is returned. + * If a negative number is passed in, the search starts from the end of the ArkTS Int8Array. + * @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. @@ -2889,12 +2907,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 Int8Array. + * 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 Int8Array, -1 is returned. + * If a negative number is passed in, the search starts from the end of the ArkTS Int8Array. + * @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. @@ -2905,11 +2925,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 Int8Array 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. @@ -2918,11 +2937,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 Int8Array 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. @@ -2933,13 +2951,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 Int8Array + * and uses the result to create an ArkTS Int8Array. * * @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 { Int8Array } The array itself. + * @returns { Int8Array } New ArkTS Int8Array generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The map method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -2948,13 +2966,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 Int8Array + * and uses the result to create an ArkTS Int8Array. * * @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 { Int8Array } The array itself. + * @returns { Int8Array } New ArkTS Int8Array generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The map method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -3085,7 +3103,7 @@ declare namespace collections { */ reduce(callbackFn: TypedArrayReduceCallback, initialValue: U): U; /** - * Reverses the elements in an Array. + * Reverses this ArkTS Int8Array. * * @returns { Int8Array } The reference to the original typed array, now reversed. *
Note that the typed array is reversed in place, and no copy is made. @@ -3096,7 +3114,7 @@ declare namespace collections { * @since 12 */ /** - * Reverses the elements in an Array. + * Reverses this ArkTS Int8Array. * * @returns { Int8Array } The reference to the original typed array, now reversed. *
Note that the typed array is reversed in place, and no copy is made. @@ -3109,10 +3127,10 @@ declare namespace collections { */ reverse(): Int8Array; /** - * 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. @@ -3121,10 +3139,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. @@ -3135,12 +3153,13 @@ declare namespace collections { */ set(array: ArrayLike, offset?: number): void; /** - * Returns a section of an array. + * Selects a range of elements in this ArkTS Int8Array to create an ArkTS Int8Array. * - * @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 { Int8Array } 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 + Int8Array.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 + Int8Array.length. The default value is the length of the ArkTS Int8Array. + * @returns { Int8Array } New ArkTS Int8Array generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The slice method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -3149,12 +3168,13 @@ declare namespace collections { * @since 12 */ /** - * Returns a section of an array. + * Selects a range of elements in this ArkTS Int8Array to create an ArkTS Int8Array. * - * @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 { Int8Array } 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 + Int8Array.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 + Int8Array.length. The default value is the length of the ArkTS Int8Array. + * @returns { Int8Array } New ArkTS Int8Array generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The slice method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -3165,13 +3185,13 @@ declare namespace collections { */ slice(start?: number, end?: number): Int8Array; /** - * Determines whether the specified callback function returns true for any element of an array. + * Checks whether any element in this ArkTS Int8Array 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. @@ -3180,13 +3200,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 Int8Array 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. @@ -3197,7 +3217,7 @@ declare namespace collections { */ some(predicate: TypedArrayPredicateFn): boolean; /** - * Sorts an array. + * Sorts elements in this ArkTS Int8Array and returns the sorted ArkTS Int8Array. * * @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, @@ -3213,7 +3233,7 @@ declare namespace collections { * @since 12 */ /** - * Sorts an array. + * Sorts elements in this ArkTS Int8Array and returns the sorted ArkTS Int8Array. * * @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, @@ -3231,12 +3251,13 @@ declare namespace collections { */ sort(compareFn?: TypedArrayCompareFn): Int8Array; /** - * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. + * Returns a new ArkTS Int8Array 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 { Int8Array } A new Int8Array object. + * @param { number } [begin] - Start index of the range. If a negative number is passed in, + * it refers to the index of begin + Int8Array.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 + Int8Array.length. The default value is the length of the ArkTS Int8Array. + * @returns { Int8Array } New ArkTS Int8Array generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The subarray method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -3245,12 +3266,13 @@ declare namespace collections { * @since 12 */ /** - * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements - * at begin, inclusive, up to end, exclusive. + * Returns a new ArkTS Int8Array 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 { Int8Array } A new Int8Array object. + * @param { number } [begin] - Start index of the range. If a negative number is passed in, + * it refers to the index of begin + Int8Array.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 + Int8Array.length. The default value is the length of the ArkTS Int8Array. + * @returns { Int8Array } New ArkTS Int8Array generated. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200011 - The subarray method cannot be bound. * @throws { BusinessError } 10200201 - Concurrent modification error. @@ -3261,10 +3283,10 @@ declare namespace collections { */ subarray(begin?: number, end?: number): Int8Array; /** - * 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 + Int8Array.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. @@ -3276,10 +3298,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 + Int8Array.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. @@ -3293,7 +3315,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. @@ -3302,7 +3326,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. @@ -3313,20 +3339,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 Int8Array. * * @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 Int8Array. * * @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 @@ -3335,20 +3361,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 Int8Array. * * @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 Int8Array. * * @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 @@ -3357,20 +3383,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 Int8Array. * * @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 Int8Array. * * @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 @@ -3379,12 +3405,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 Int8Array. * - * @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 + Int8Array.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. @@ -3393,12 +3420,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 Int8Array. * - * @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 + Int8Array.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. @@ -3409,14 +3437,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 Int8Array. * * @syscap SystemCapability.Utils.Lang * @atomicservice * @since 12 */ /** - * Returns the item at that index. + * Returns the element at a given index in this Int8Array. * * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -3425,11 +3453,12 @@ declare namespace collections { */ [index: number]: number; /** - * Find the last occurrence of a specified element in an Int8Array. + * Obtains the index of the last occurrence of the specified value in this ArkTS Int8Array. * * @param { number } searchElement - Element to search for in the Int8Array.. - * @param { number } fromIndex - The index at which to start the search. If provided: - *
If this index is negative, it is treated as Int8Array.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 Int8Array, -1 is returned. + * If a negative number is passed in, the search starts from the end of the ArkTS Int8Array. * @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. @@ -12202,3 +12231,4 @@ declare namespace collections { } export default collections; + -- Gitee