From dc611132520e70f37b5dac287c575d4495388bc9 Mon Sep 17 00:00:00 2001 From: linhaoran Date: Tue, 6 Sep 2022 17:54:01 +0800 Subject: [PATCH 1/7] Add interface exception information. Signed-off-by: linhaoran --- api/@ohos.util.ArrayList.d.ts | 44 ++++++++++++++++++++++----- api/@ohos.util.Deque.d.ts | 17 ++++++++--- api/@ohos.util.HashMap.d.ts | 21 ++++++++++++- api/@ohos.util.HashSet.d.ts | 19 ++++++++++-- api/@ohos.util.LightWeightMap.d.ts | 37 ++++++++++++++++++++++- api/@ohos.util.LightWeightSet.d.ts | 28 ++++++++++++++++- api/@ohos.util.LinkedList.d.ts | 41 +++++++++++++++++++++---- api/@ohos.util.List.d.ts | 41 +++++++++++++++++++++---- api/@ohos.util.PlainArray.d.ts | 48 +++++++++++++++++++++++++----- api/@ohos.util.Queue.d.ts | 12 ++++++-- api/@ohos.util.Stack.d.ts | 12 +++++++- api/@ohos.util.TreeMap.d.ts | 27 ++++++++++++++++- api/@ohos.util.TreeSet.d.ts | 24 ++++++++++++++- api/@ohos.util.Vector.d.ts | 3 +- 14 files changed, 332 insertions(+), 42 deletions(-) diff --git a/api/@ohos.util.ArrayList.d.ts b/api/@ohos.util.ArrayList.d.ts index ac7174e497..c97b879b7f 100644 --- a/api/@ohos.util.ArrayList.d.ts +++ b/api/@ohos.util.ArrayList.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,9 +12,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + declare class ArrayList { /** * A constructor used to create a ArrayList object. + * @throws {NewTargetIsNullError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -29,6 +31,7 @@ declare class ArrayList { * Appends the specified element to the end of this arraylist. * @param element to be appended to this arraylist * @returns the boolean type, returns true if the addition is successful, and returns false if it fails. + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -39,7 +42,9 @@ declare class ArrayList { * any subsequent elements to the right (adds one to their index). * @param index index at which the specified element is to be inserted * @param element element to be inserted - * @throws If index is greater than or equal to length, or less than 0, an exception is thrown and cannot be inserted + * @throws {ContainerBindError} Method not support bind. + * @throws {RangeError} Index out of range. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -48,6 +53,7 @@ declare class ArrayList { * Check if arraylist contains the specified element * @param element element to be contained * @return the boolean type,if arraylist contains the specified element,return true,else return false + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -57,6 +63,7 @@ declare class ArrayList { * in this arraylist, or -1 if this arraylist does not contain the element. * @param element element to be contained * @return the number type ,returns the lowest index such that or -1 if there is no such index. + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -66,7 +73,9 @@ declare class ArrayList { * delete the element, and move the index of all elements to the right of the element forward by one. * @param index the index in the arraylist * @return the T type ,returns undefined if arraylist is empty,If the index is - * out of bounds (greater than or equal to length or less than 0), throw an exception + * @throws {ContainerBindError} Method not support bind. + * @throws {RangeError} Index out of range. + * @throws {TypeError} Parameter check failed. * * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -77,6 +86,7 @@ declare class ArrayList { * unchanged. More formally, removes the element with the lowest index * @param element element to remove * @return the boolean type ,If there is no such element, return false + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -86,6 +96,7 @@ declare class ArrayList { * or -1 if the arraylist does not contain the element. * @param element element to find * @return the number type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -94,8 +105,9 @@ declare class ArrayList { * Removes from this arraylist all of the elements whose index is between fromIndex,inclusive,and toIndex ,exclusive. * @param fromIndex The starting position of the index, containing the value at that index position * @param toIndex the end of the index, excluding the value at that index - * @throws If the fromIndex is out of range (greater than or equal to length or less than 0), - * or if toIndex is less than fromIndex, an IndexOutOfBoundException is thrown + * @throws {ContainerBindError} Method not support bind. + * @throws {RangeError} Index out of range. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -109,11 +121,13 @@ declare class ArrayList { * @param arrlist (Optional) The arraylist object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ replaceAllElements(callbackfn: (value: T, index?: number, arrlist?: ArrayList) => T, - thisArg?: Object): void; + thisArg?: Object): void; /** * Executes a provided function once for each value in the arraylist object. * @param callbackfn (required) A function that accepts up to four arguments.The function to @@ -123,6 +137,8 @@ declare class ArrayList { * @param arrlist (Optional) The arraylist object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -137,6 +153,8 @@ declare class ArrayList { * @param firstValue (Optional) previous element * @param secondValue (Optional) next elements * If this parameter is empty, it will default to ASCII sorting + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -145,8 +163,9 @@ declare class ArrayList { * Returns a view of the portion of this arraylist between the specified fromIndex,inclusize,and toIndex,exclusive * @param fromIndex The starting position of the index, containing the value at that index position * @param toIndex the end of the index, excluding the value at that index - * @throws If the fromIndex or toIndex index is out of range (greater than or equal to length or less than 0), - * or if toIndex is less than fromIndex, an IndexOutOfBoundException is thrown + * @throws {ContainerBindError} Method not support bind. + * @throws {RangeError} Index out of range. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -154,6 +173,7 @@ declare class ArrayList { /** * Removes all of the elements from this arraylist.The arraylist will * be empty after this call returns.length becomes 0 + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -161,6 +181,7 @@ declare class ArrayList { /** * Returns a shallow copy of this instance. (The elements themselves are not copied.) * @return this arraylist instance + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -168,6 +189,7 @@ declare class ArrayList { /** * returns the capacity of this arraylist * @return the number type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -175,6 +197,7 @@ declare class ArrayList { /** * convert arraylist to array * @return the Array type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -182,6 +205,7 @@ declare class ArrayList { /** * Determine whether arraylist is empty and whether there is an element * @return the boolean type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -189,18 +213,22 @@ declare class ArrayList { /** * If the newCapacity provided by the user is greater than or equal to length, * change the capacity of the arraylist to newCapacity, otherwise the capacity will not be changed + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ increaseCapacityTo(newCapacity: number): void; /** * Limit the capacity to the current length + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ trimToCurrentLength(): void; /** * returns an iterator.Each item of the iterator is a Javascript Object + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.Deque.d.ts b/api/@ohos.util.Deque.d.ts index b8b284b44a..04d1212372 100644 --- a/api/@ohos.util.Deque.d.ts +++ b/api/@ohos.util.Deque.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,9 +12,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + declare class Deque { /** * A constructor used to create a Deque object. + * @throws {NewTargetIsNullError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -28,6 +30,7 @@ declare class Deque { /** * Inserts an element into the deque header. * @param element to be appended to this deque + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -35,6 +38,7 @@ declare class Deque { /** * Inserting an element at the end of a deque * @param element to be appended to this deque + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -43,6 +47,7 @@ declare class Deque { * Check if deque contains the specified element * @param element element to be contained * @return the boolean type,if deque contains the specified element,return true,else return false + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -50,6 +55,7 @@ declare class Deque { /** * Obtains the header element of a deque. * @return the T type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -57,7 +63,7 @@ declare class Deque { /** * Obtains the end element of a deque. * @return the T type - * @throws an exception if the queue is empty + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -65,7 +71,7 @@ declare class Deque { /** * Obtains the header element of a deque and delete the element. * @return the T type - * @throws an exception if the deque is empty + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -73,7 +79,7 @@ declare class Deque { /** * Obtains the end element of a deque and delete the element. * @return the T type - * @throws an exception if the deque is empty + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -86,6 +92,8 @@ declare class Deque { * @param deque (Optional) The deque object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value + * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -93,6 +101,7 @@ declare class Deque { thisArg?: Object): void; /** * returns an iterator.Each item of the iterator is a Javascript Object + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.HashMap.d.ts b/api/@ohos.util.HashMap.d.ts index db6a86247b..b2f1bb1807 100644 --- a/api/@ohos.util.HashMap.d.ts +++ b/api/@ohos.util.HashMap.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,9 +12,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + declare class HashMap { /** * A constructor used to create a HashMap object. + * @throws {NewTargetIsNullError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -28,6 +30,7 @@ declare class HashMap { /** * Returns whether the Map object contains elements * @return the boolean type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -36,6 +39,7 @@ declare class HashMap { * Returns whether a key is contained in this map * @param key need to determine whether to include the key * @return the boolean type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -44,6 +48,7 @@ declare class HashMap { * Returns whether a value is contained in this map * @param value need to determine whether to include the value * @return the boolean type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -52,6 +57,7 @@ declare class HashMap { * Returns a specified element in a Map object, or null if there is no corresponding element * @param key the index in HashMap * @return value or null + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -59,6 +65,8 @@ declare class HashMap { /** * Adds all element groups in one map to another map * @param map the Map object to add members + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -68,6 +76,8 @@ declare class HashMap { * @param key Added or updated targets * @param value Added or updated value * @returns the map object after set + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -76,24 +86,28 @@ declare class HashMap { * Remove a specified element from a Map object * @param key Target to be deleted * @return Target mapped value + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ remove(key: K): V; /** * Clear all element groups in the map + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ clear(): void; /** * Returns a new Iterator object that contains the keys contained in this map + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ keys(): IterableIterator; /** * Returns a new Iterator object that contains the values contained in this map + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -103,6 +117,7 @@ declare class HashMap { * @param key Updated targets * @param newValue Updated the target mapped value * @returns the boolean type(Is there a target pointed to by the key) + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -110,6 +125,8 @@ declare class HashMap { /** * Executes the given callback function once for each real key in the map. * It does not perform functions on deleted keys + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -117,12 +134,14 @@ declare class HashMap { thisArg?: Object): void; /** * Returns a new Iterator object that contains the [key, value] pairs for each element in the Map object in insertion order + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ entries(): IterableIterator<[K, V]>; /** * returns an iterator.Each item of the iterator is a Javascript Object + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.HashSet.d.ts b/api/@ohos.util.HashSet.d.ts index 88c292927a..b368347aea 100644 --- a/api/@ohos.util.HashSet.d.ts +++ b/api/@ohos.util.HashSet.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,9 +12,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + declare class HashSet { /** * A constructor used to create a HashSet object. + * @throws {NewTargetIsNullError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -28,6 +30,7 @@ declare class HashSet { /** * Returns whether the Set object contains elements * @return the boolean type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -36,6 +39,8 @@ declare class HashSet { * Returns whether the Set object contain s the elements * @param value need to determine whether to include the element * @return the boolean type + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -44,6 +49,8 @@ declare class HashSet { * If the set does not contain the element, the specified element is added * @param value Added element * @returns the boolean type(Is there contain this element) + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -52,18 +59,23 @@ declare class HashSet { * Remove a specified element from a Set object * @param value Target to be deleted * @return the boolean type(Is there contain this element) + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed * @since 8 * @syscap SystemCapability.Utils.Lang */ - remove(value: T): boolean; + remove(value: T): boolean; /** * Clears all element groups in a set + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ clear(): void; /** * Executes a provided function once for each value in the Set object. + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -71,18 +83,21 @@ declare class HashSet { thisArg?: Object): void; /** * Returns a new Iterator object that contains the values contained in this set + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ values(): IterableIterator; /** * Returns a new Iterator object that contains the [key, value] pairs for each element in the Set object in insertion order + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ entries(): IterableIterator<[T, T]>; /** * returns an iterator.Each item of the iterator is a Javascript Object + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.LightWeightMap.d.ts b/api/@ohos.util.LightWeightMap.d.ts index cc34b5dfbf..d10712ebd6 100644 --- a/api/@ohos.util.LightWeightMap.d.ts +++ b/api/@ohos.util.LightWeightMap.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,9 +12,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + declare class LightWeightMap { /** * A constructor used to create a LightWeightMap object. + * @throws {NewTargetIsNullError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -29,6 +31,8 @@ declare class LightWeightMap { * Returns whether this map has all the object in a specified map * @param map the Map object to compare * @return the boolean type + * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -37,6 +41,7 @@ declare class LightWeightMap { * Returns whether a key is contained in this map * @param key need to determine whether to include the key * @return the boolean type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -45,6 +50,7 @@ declare class LightWeightMap { * Returns whether a value is contained in this map * @param value need to determine whether to include the value * @return the boolean type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -53,12 +59,15 @@ declare class LightWeightMap { * Ensures that the capacity of an LightWeightMap container is greater than or equal to a apecified value, * and that the container has all the original objects after capacity expansion * @param minimumCapacity Minimum capacity to be reserved + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ increaseCapacityTo(minimumCapacity: number): void; /** * Returns a new Iterator object that contains the [key, value] pairs for each element in the Map object in insertion order + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -67,6 +76,7 @@ declare class LightWeightMap { * Returns the value to which the specified key is mapped, or undefined if this map contains no mapping for the key * @param key the index in LightWeightMap * @return value or undefined + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -75,6 +85,7 @@ declare class LightWeightMap { * Obtains the index of the key equal to a specified key in an LightWeightMap container * @param key Looking for goals * @return Subscript corresponding to target + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -83,6 +94,7 @@ declare class LightWeightMap { * Obtains the index of the value equal to a specified value in an LightWeightMap container * @param value Looking for goals * @return Subscript corresponding to target + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -90,6 +102,7 @@ declare class LightWeightMap { /** * Returns whether the Map object contains elements * @return the boolean type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -98,12 +111,16 @@ declare class LightWeightMap { * Obtains the key at the loaction identified by index in an LightWeightMap container * @param index Target subscript for search * @return the key of key-value pairs + * @throws {ContainerBindError} Method not support bind. + * @throws {RangeError} Index out of range. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ getKeyAt(index: number): K; /** * Obtains a ES6 iterator that contains all the keys of an LightWeightMap container + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -111,6 +128,8 @@ declare class LightWeightMap { /** * Adds all element groups in one map to another map * @param map the Map object to add members + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -120,6 +139,7 @@ declare class LightWeightMap { * @param key Added or updated targets * @param value Added or updated value * @returns the map object after set + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -128,6 +148,7 @@ declare class LightWeightMap { * Remove the mapping for this key from this map if present * @param key Target to be deleted * @return Target mapped value + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -136,6 +157,8 @@ declare class LightWeightMap { * Deletes a key-value pair at the loaction identified by index from an LightWeightMap container * @param index Target subscript for search * @return the boolean type(Is there a delete value) + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -143,6 +166,7 @@ declare class LightWeightMap { /** * Removes all of the mapping from this map * The map will be empty after this call returns + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -152,6 +176,9 @@ declare class LightWeightMap { * @param index Target subscript for search * @param value Updated the target mapped value * @return the boolean type(Is there a value corresponding to the subscript) + * @throws {ContainerBindError} Method not support bind. + * @throws {RangeError} Index out of range. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -159,6 +186,8 @@ declare class LightWeightMap { /** * Executes the given callback function once for each real key in the map. * It does not perform functions on deleted keys + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -166,12 +195,14 @@ declare class LightWeightMap { thisArg?: Object): void; /** * returns an ES6 iterator.Each item of the iterator is a Javascript Object + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ [Symbol.iterator](): IterableIterator<[K, V]>; /** * Obtains a string that contains all the keys and values in an LightWeightMap container + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -180,12 +211,16 @@ declare class LightWeightMap { * Obtains the value identified by index in an LightWeightMap container * @param index Target subscript for search * @return the value of key-value pairs + * @throws {ContainerBindError} Method not support bind. + * @throws {RangeError} Index out of range. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ getValueAt(index: number): V; /** * Returns an iterator of the values contained in this map + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.LightWeightSet.d.ts b/api/@ohos.util.LightWeightSet.d.ts index e882104ee8..fe554a86fe 100644 --- a/api/@ohos.util.LightWeightSet.d.ts +++ b/api/@ohos.util.LightWeightSet.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,9 +12,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + declare class LightWeightSet { /** * A constructor used to create a LightWeightSet object. + * @throws {NewTargetIsNullError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -29,6 +31,7 @@ declare class LightWeightSet { * If the set does not contain the element, the specified element is added * @param value Added element * @returns the boolean type(Is there contain this element) + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -37,6 +40,8 @@ declare class LightWeightSet { * Adds all the objects in a specified LightWeightSet container to the current LightWeightSet container * @param set the Set object to provide the added element * @returns the boolean type(Is there any new data added successfully) + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -45,6 +50,8 @@ declare class LightWeightSet { * Returns whether this set has all the object in a specified set * @param set the Set object to compare * @return the boolean type + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -53,6 +60,7 @@ declare class LightWeightSet { * Checks whether an LightWeightSet container has a specified key * @param key need to determine whether to include the key * @return the boolean type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -61,6 +69,7 @@ declare class LightWeightSet { * Checks whether an the objects of an LightWeighSet containeer are of the same type as a specified Object LightWeightSet * @param obj need to determine whether to include the obj * @return the boolean type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -69,6 +78,9 @@ declare class LightWeightSet { * Ensures that the capacity of an LightWeightSet container is greater than or equal to a apecified value, * and that the container has all the original objects after capacity expansion * @param minimumCapacity Minimum capacity to be reserved + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. + * @throws {RangeError} Index out of range. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -77,6 +89,7 @@ declare class LightWeightSet { * Obtains the index of s key of a specified Object type in an LightWeightSet container * @param key Looking for goals * @return Subscript corresponding to target + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -85,6 +98,7 @@ declare class LightWeightSet { * Deletes an object of a specified Object type from an LightWeightSet container * @param key Target to be deleted * @return Target element + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -93,6 +107,8 @@ declare class LightWeightSet { * Deletes an object at the loaction identified by index from an LightWeightSet container * @param index Target subscript for search * @return the boolean type(Is there a delete value) + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -100,6 +116,7 @@ declare class LightWeightSet { /** * Removes all of the mapping from this map * The map will be empty after this call returns + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -107,6 +124,8 @@ declare class LightWeightSet { /** * Executes the given callback function once for each real key in the map. * It does not perform functions on deleted keys + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -114,6 +133,7 @@ declare class LightWeightSet { thisArg?: Object): void; /** * returns an ES6 iterator.Each item of the iterator is a Javascript Object + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -126,6 +146,7 @@ declare class LightWeightSet { toString(): String; /** * Obtains an Array that contains all the objects of an LightWeightSet container. + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -134,24 +155,29 @@ declare class LightWeightSet { * Obtains the object at the location identified by index in an LightWeightSet container * @param index Target subscript for search * @return the value of key-value pairs + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ getValueAt(index: number): T; /** * Returns a ES6 iterator of the values contained in this Set + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ values(): IterableIterator; /** * Returns a Iterator object that contains the [key, value] pairs for each element in the Set object in insertion order + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ entries(): IterableIterator<[T, T]>; /** * Returns whether the set object contains elements + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.LinkedList.d.ts b/api/@ohos.util.LinkedList.d.ts index e81ef5c4d2..3a31b2ecfc 100644 --- a/api/@ohos.util.LinkedList.d.ts +++ b/api/@ohos.util.LinkedList.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,9 +12,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + declare class LinkedList { /** * A constructor used to create a LinkedList object. + * @throws {NewTargetIsNullError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -29,6 +31,7 @@ declare class LinkedList { * Appends the specified element to the end of this linkedlist. * @param element to be appended to this linkedlist * @returns the boolean type, returns true if the addition is successful, and returns false if it fails. + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -37,7 +40,9 @@ declare class LinkedList { * Inserts the specified element at the specified position in this linkedlist. * @param index index at which the specified element is to be inserted * @param element element to be inserted - * @throws If index is greater than or equal to length, or less than 0, an exception is thrown and cannot be inserted + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. + * @throws {RangeError} Index out of range. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -47,6 +52,8 @@ declare class LinkedList { * or returns undefined if this linkedlist is empty * @param index specified position * @return the T type + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -54,6 +61,7 @@ declare class LinkedList { /** * Inserts the specified element at the beginning of this LinkedList. * @param element the element to add + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -61,7 +69,8 @@ declare class LinkedList { /** * Retrieves and removes the head (first element) of this linkedlist. * @return the head of this list - * @throws NoSuchElementException if this linkedlist is empty + * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerIsEmptyError} Container is Empty. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -69,16 +78,17 @@ declare class LinkedList { /** * Removes and returns the last element from this linkedlist. * @return the head of this list - * @throws NoSuchElementException if this linkedlist is empty + * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerIsEmptyError} Container is Empty. * @since 8 * @syscap SystemCapability.Utils.Lang - * */ removeLast(): T; /** * Check if linkedlist contains the specified element * @param element element to be contained * @return the boolean type,if linkedList contains the specified element,return true,else return false + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -88,6 +98,7 @@ declare class LinkedList { * in this linkedlist, or -1 if this linkedlist does not contain the element. * @param element element to be contained * @return the number type ,returns the lowest index such that or -1 if there is no such index. + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -97,6 +108,9 @@ declare class LinkedList { * @param index the index in the linkedlist * @return the T type ,returns undefined if linkedlist is empty,If the index is * out of bounds (greater than or equal to length or less than 0), throw an exception + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. + * @throws {RangeError} Index out of range. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -107,6 +121,7 @@ declare class LinkedList { * unchanged. More formally, removes the element with the lowest index * @param element element to remove * @return the boolean type ,If there is no such element, return false + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -117,6 +132,8 @@ declare class LinkedList { * unchanged. More formally, removes the element with the lowest index * @param element element to remove * @return the boolean type ,If there is no such element, return false + * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerIsEmptyError} Container is Empty. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -127,6 +144,8 @@ declare class LinkedList { * unchanged. More formally, removes the element with the lowest index * @param element element to remove * @return the boolean type ,If there is no such element, return false + * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerIsEmptyError} Container is Empty. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -136,6 +155,7 @@ declare class LinkedList { * or -1 if the linkedlist does not contain the element. * @param element element to find * @return the number type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -144,6 +164,7 @@ declare class LinkedList { * Returns the first element (the item at index 0) of this linkedlist. * or returns undefined if linkedlist is empty * @return the T type ,returns undefined if linkedList is empty + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -152,6 +173,7 @@ declare class LinkedList { * Returns the Last element (the item at index length-1) of this linkedlist. * or returns undefined if linkedlist is empty * @return the T type ,returns undefined if linkedList is empty + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -161,6 +183,9 @@ declare class LinkedList { * @param element replaced element * @param index index to find * @return the T type ,returns undefined if linkedList is empty + * @throws {ContainerBindError} Method not support bind. + * @throws {RangeError} Index out of range. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -174,6 +199,8 @@ declare class LinkedList { * @param LinkedList (Optional) The linkedlist object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -182,6 +209,7 @@ declare class LinkedList { /** * Removes all of the elements from this linkedlist.The linkedlist will * be empty after this call returns.length becomes 0 + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -189,6 +217,7 @@ declare class LinkedList { /** * Returns a shallow copy of this instance. (The elements themselves are not copied.) * @return this linkedlist instance + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -196,12 +225,14 @@ declare class LinkedList { /** * convert linkedlist to array * @return the Array type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ convertToArray(): Array; /** * returns an iterator.Each item of the iterator is a Javascript Object + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.List.d.ts b/api/@ohos.util.List.d.ts index fa79586eca..55a57208b3 100644 --- a/api/@ohos.util.List.d.ts +++ b/api/@ohos.util.List.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,9 +12,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + declare class List { /** * A constructor used to create a List object. + * @throws {NewTargetIsNullError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -29,6 +31,7 @@ declare class List { * Appends the specified element to the end of this list. * @param element to be appended to this list * @returns the boolean type, returns true if the addition is successful, and returns false if it fails. + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -37,7 +40,9 @@ declare class List { * Inserts the specified element at the specified position in this list. * @param index index at which the specified element is to be inserted * @param element element to be inserted - * @throws If index is greater than or equal to length, or less than 0, an exception is thrown and cannot be inserted + * @throws {ContainerBindError} Method not support bind. + * @throws {RangeError} Index out of range. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -47,6 +52,8 @@ declare class List { * or returns undefined if this list is empty * @param index specified position * @return the T type + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -55,6 +62,7 @@ declare class List { * Check if list contains the specified element * @param element element to be contained * @return the boolean type,if list contains the specified element,return true,else return false + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -64,6 +72,7 @@ declare class List { * in this list, or -1 if this list does not contain the element. * @param element element to be contained * @return the number type ,returns the lowest index such that or -1 if there is no such index. + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -73,6 +82,9 @@ declare class List { * @param index the index in the list * @return the T type ,returns undefined if list is empty,If the index is * out of bounds (greater than or equal to length or less than 0), throw an exception + * @throws {ContainerBindError} Method not support bind. + * @throws {RangeError} Index out of range. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -83,6 +95,7 @@ declare class List { * unchanged. More formally, removes the element with the lowest index * @param element element to remove * @return the boolean type ,If there is no such element, return false + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -92,6 +105,7 @@ declare class List { * or -1 if the list does not contain the element. * @param element element to find * @return the number type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -100,6 +114,7 @@ declare class List { * Returns the first element (the item at index 0) of this list. * or returns undefined if list is empty * @return the T type ,returns undefined if list is empty + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -108,6 +123,7 @@ declare class List { * Returns the Last element (the item at index length-1) of this list. * or returns undefined if list is empty * @return the T type ,returns undefined if list is empty + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -117,6 +133,9 @@ declare class List { * @param element replaced element * @param index index to find * @return the T type + * @throws {ContainerBindError} Method not support bind. + * @throws {RangeError} Index out of range. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -126,6 +145,7 @@ declare class List { * return true, otherwise return false. * @param obj Compare objects * @return the boolean type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -139,6 +159,8 @@ declare class List { * @param List (Optional) The list object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -152,6 +174,8 @@ declare class List { * minus firstValue, it returns an list sorted in descending order; * @param firstValue (Optional) previous element * @param secondValue (Optional) next elements + * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -159,6 +183,7 @@ declare class List { /** * Removes all of the elements from this list.The list will * be empty after this call returns.length becomes 0 + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -167,8 +192,9 @@ declare class List { * Returns a view of the portion of this list between the specified fromIndex,inclusize,and toIndex,exclusive * @param fromIndex The starting position of the index, containing the value at that index position * @param toIndex the end of the index, excluding the value at that index - * @throws If the fromIndex or toIndex index is out of range (greater than or equal to length or less than 0), - * or if toIndex is less than fromIndex, an IndexOutOfBoundException is thrown + * @throws {ContainerBindError} Method not support bind. + * @throws {RangeError} Index out of range. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -182,14 +208,17 @@ declare class List { * @param list (Optional) The list object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ replaceAllElements(callbackfn: (value: T, index?: number, list?: List) => T, - thisArg?: Object): void; + thisArg?: Object): void; /** * convert list to array * @return the Array type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -197,12 +226,14 @@ declare class List { /** * Determine whether list is empty and whether there is an element * @return the boolean type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ isEmpty(): boolean; /** * returns an iterator.Each item of the iterator is a Javascript Object + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.PlainArray.d.ts b/api/@ohos.util.PlainArray.d.ts index 37012f6ad2..e4a356f24e 100644 --- a/api/@ohos.util.PlainArray.d.ts +++ b/api/@ohos.util.PlainArray.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,9 +12,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + declare class PlainArray { /** * A constructor used to create a PlainArray object. + * @throws {NewTargetIsNullError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -29,19 +31,22 @@ declare class PlainArray { * Appends a key-value pair to PlainArray * @param key Added the key of key-value * @param value Added the value of key-value - * @throws Throws this exception if input is invaild + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ add(key: number, value: T): void; /** * Clears the current PlainArray object + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ clear(): void; /** * Obtains a clone of the current PlainArray object + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -50,6 +55,8 @@ declare class PlainArray { * Checks whether the current PlainArray object contains the specified key * @param key need to determine whether to include the key * @return the boolean type + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -58,6 +65,8 @@ declare class PlainArray { * Queries the value associated with the specified key * @param key Looking for goals * @return the value of key-value pairs + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -66,21 +75,25 @@ declare class PlainArray { * Queries the index for a specified key * @param key Looking for goals * @return Subscript corresponding to target + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ getIndexOfKey(key: number): number; /** - * Queries the index for a specified value - * @param value Looking for goals - * @return Subscript corresponding to target - * @since 8 - * @syscap SystemCapability.Utils.Lang - */ + * Queries the index for a specified value + * @param value Looking for goals + * @return Subscript corresponding to target + * @throws {ContainerBindError} Method not support bind. + * @since 8 + * @syscap SystemCapability.Utils.Lang + */ getIndexOfValue(value: T): number; /** * Checks whether the current PlainArray object is empty * @return the boolean type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -89,6 +102,8 @@ declare class PlainArray { * Queries the key at a specified index * @param index Target subscript for search * @return the key of key-value pairs + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -97,6 +112,8 @@ declare class PlainArray { * Remove the key-value pair based on a specified key if it exists and return the value * @param key Target to be deleted * @return Target mapped value + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -105,6 +122,8 @@ declare class PlainArray { * Remove the key-value pair at a specified index if it exists and return the value * @param index Target subscript for search * @return the T type + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -114,6 +133,9 @@ declare class PlainArray { * @param index remove start index * @param size Expected deletion quantity * @return Actual deleted quantity + * @throws {ContainerBindError} Method not support bind. + * @throws {RangeError} Index out of range. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -122,12 +144,16 @@ declare class PlainArray { * Update value on specified index * @param index Target subscript for search * @param value Updated the target mapped value + * @throws {ContainerBindError} Method not support bind. + * @throws {RangeError} Index out of range. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ setValueAt(index: number, value: T): void; /** * Obtains the string representation of the PlainArray object + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -136,12 +162,17 @@ declare class PlainArray { * Queries the value at a specified index * @param index Target subscript for search * @return the value of key-value pairs + * @throws {ContainerBindError} Method not support bind. + * @throws {RangeError} Index out of range. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ getValueAt(index: number): T; /** * Executes a provided function once for each value in the PlainArray object. + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -149,6 +180,7 @@ declare class PlainArray { thisArg?: Object): void; /** * returns an iterator.Each item of the iterator is a Javascript Object + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.Queue.d.ts b/api/@ohos.util.Queue.d.ts index 69c2762bd4..f7587f051e 100644 --- a/api/@ohos.util.Queue.d.ts +++ b/api/@ohos.util.Queue.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,9 +12,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + declare class Queue { /** * A constructor used to create a Queue object. + * @throws {NewTargetIsNullError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -30,6 +32,7 @@ declare class Queue { * so immediately without violating capacity restrictions. * @param element to be appended to this queue * @return the boolean type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -37,7 +40,7 @@ declare class Queue { /** * Obtains the header element of a queue. * @return the T type - * @throws an exception if the queue is empty + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -45,7 +48,7 @@ declare class Queue { /** * Retrieves and removes the head of this queue * @return the T type - * @throws an exception if the queue is empty + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -59,6 +62,8 @@ declare class Queue { * @param Queue (Optional) The queue object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -66,6 +71,7 @@ declare class Queue { thisArg?: Object): void; /** * returns an iterator.Each item of the iterator is a Javascript Object + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.Stack.d.ts b/api/@ohos.util.Stack.d.ts index 59ef60e5d4..79a1413841 100644 --- a/api/@ohos.util.Stack.d.ts +++ b/api/@ohos.util.Stack.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,9 +12,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + declare class Stack { /** * A constructor used to create a Stack object. + * @throws {NewTargetIsNullError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -28,6 +30,7 @@ declare class Stack { /** * Tests if this stack is empty * @return the boolean type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -36,6 +39,7 @@ declare class Stack { * Looks at the object at the top of this stack without removing it from the stack * Return undfined if this stack is empty * @return the top value or undefined + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -44,6 +48,7 @@ declare class Stack { * Removes the object at the top of this stack and returns that object as the value of this function * an exception if the stack is empty * @returns Stack top value or undefined + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -52,6 +57,7 @@ declare class Stack { * Pushes an item onto the top of this stack * @param item to be appended to this Stack * @returns the T type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -60,6 +66,7 @@ declare class Stack { * Returns the 1-based position where an object is on this stack * @param element Target to be deleted * @returns the T type,If there is no such element, return -1 + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -73,6 +80,8 @@ declare class Stack { * @param stack (Optional) The Stack object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -80,6 +89,7 @@ declare class Stack { thisArg?: Object): void; /** * returns an ES6 iterator.Each item of the iterator is a Javascript Object + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.TreeMap.d.ts b/api/@ohos.util.TreeMap.d.ts index 2b4647f18f..69ebaed707 100644 --- a/api/@ohos.util.TreeMap.d.ts +++ b/api/@ohos.util.TreeMap.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,12 +12,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + declare class TreeMap { + /** * A constructor used to create a TreeMap object. * @param comparator (Optional) User-defined comparison functions * @param firstValue (Optional) previous element * @param secondValue (Optional) next element + * @throws {NewTargetIsNullError} Parameter check failed. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -31,6 +35,7 @@ declare class TreeMap { /** * Returns whether the Map object contains elements * @return the boolean type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -39,6 +44,7 @@ declare class TreeMap { * Returns whether a key is contained in this map * @param key need to determine whether to include the key * @return the boolean type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -47,6 +53,7 @@ declare class TreeMap { * Returns whether a value is contained in this map * @param value need to determine whether to include the value * @return the boolean type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -55,6 +62,7 @@ declare class TreeMap { * Returns a specified element in a Map object, or null if there is no corresponding element * @param key the index in TreeMap * @return value or null + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -63,6 +71,7 @@ declare class TreeMap { * Obtains the first sorted key in the treemap. * Or returns undefined if tree map is empty * @return value or undefined + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -71,6 +80,7 @@ declare class TreeMap { * Obtains the last sorted key in the treemap. * Or returns undefined if tree map is empty * @return value or undefined + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -78,6 +88,8 @@ declare class TreeMap { /** * Adds all element groups in one map to another map * @param map the Map object to add members + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -87,6 +99,8 @@ declare class TreeMap { * @param key Added or updated targets * @param value Added or updated value * @returns the map object after set + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -94,6 +108,7 @@ declare class TreeMap { /** * Remove a specified element from a Map object * @param key Target to be deleted + * @throws {ContainerBindError} Method not support bind. * @return Target mapped value * @since 8 * @syscap SystemCapability.Utils.Lang @@ -101,6 +116,7 @@ declare class TreeMap { remove(key: K): V; /** * Clear all element groups in the map + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -109,6 +125,7 @@ declare class TreeMap { * Returns the greatest element smaller than or equal to the specified key * if the key does not exist, undefied is returned * @param key Objective of comparison + * @throws {ContainerBindError} Method not support bind. * @return key or undefined * @since 8 * @syscap SystemCapability.Utils.Lang @@ -119,18 +136,21 @@ declare class TreeMap { * if the key does not exist, undefied is returned * @param key Objective of comparison * @return key or undefined + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ getHigherKey(key: K): K; /** * Returns a new Iterator object that contains the keys contained in this map + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ keys(): IterableIterator; /** * Returns a new Iterator object that contains the values contained in this map + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -140,6 +160,7 @@ declare class TreeMap { * @param key Updated targets * @param value Updated the target mapped value * @returns the boolean type(Is there a target pointed to by the key) + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -147,6 +168,8 @@ declare class TreeMap { /** * Executes the given callback function once for each real key in the map. * It does not perform functions on deleted keys + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -154,12 +177,14 @@ declare class TreeMap { thisArg?: Object): void; /** * Returns a new Iterator object that contains the [key, value] pairs for each element in the Map object in insertion order + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ entries(): IterableIterator<[K, V]>; /** * returns an ES6 iterator.Each item of the iterator is a Javascript Object + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.TreeSet.d.ts b/api/@ohos.util.TreeSet.d.ts index a71ef36bf0..f83f36ae14 100644 --- a/api/@ohos.util.TreeSet.d.ts +++ b/api/@ohos.util.TreeSet.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,12 +12,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + declare class TreeSet { /** * A constructor used to create a TreeSet object. * @param comparator (Optional) User-defined comparison functions * @param firstValue (Optional) previous element * @param secondValue (Optional) next element + * @throws {NewTargetIsNullError} Parameter check failed. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -31,6 +34,7 @@ declare class TreeSet { /** * Returns whether the Set object contains elements * @return the boolean type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -39,6 +43,7 @@ declare class TreeSet { * Returns whether the Set object contain s the elements * @param value need to determine whether to include the element * @return the boolean type + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -47,6 +52,8 @@ declare class TreeSet { * If the set does not contain the element, the specified element is added * @param value Added element * @returns the boolean type(Is there contain this element) + * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -55,12 +62,14 @@ declare class TreeSet { * Remove a specified element from a Set object * @param value Target to be deleted * @return the boolean type(Is there contain this element) + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ remove(value: T): boolean; /** * Clears all element groups in a set + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -68,6 +77,7 @@ declare class TreeSet { /** * Gets the first elements in a set * @return value or undefined + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -75,6 +85,7 @@ declare class TreeSet { /** * Gets the last elements in a set * @return value or undefined + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -84,6 +95,8 @@ declare class TreeSet { * if the key does not exist, undefied is returned * @param key Objective of comparison * @return key or undefined + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -93,6 +106,8 @@ declare class TreeSet { * if the key does not exist, undefied is returned * @param key Objective of comparison * @return key or undefined + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -100,6 +115,7 @@ declare class TreeSet { /** * Return and delete the first element, returns undefined if tree set is empty * @return first value or undefined + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -107,12 +123,15 @@ declare class TreeSet { /** * Return and delete the last element, returns undefined if tree set is empty * @return last value or undefined + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ popLast(): T; /** * Executes a provided function once for each value in the Set object. + * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError} Parameter check failed. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -120,18 +139,21 @@ declare class TreeSet { thisArg?: Object): void; /** * Returns a new Iterator object that contains the values contained in this set + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ values(): IterableIterator; /** * Returns a new Iterator object that contains the [key, value] pairs for each element in the Set object in insertion order + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ entries(): IterableIterator<[T, T]>; /** * returns an ES6 iterator.Each item of the iterator is a Javascript Object + * @throws {ContainerBindError} Method not support bind. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.Vector.d.ts b/api/@ohos.util.Vector.d.ts index 67d310c7b5..b170704ac7 100644 --- a/api/@ohos.util.Vector.d.ts +++ b/api/@ohos.util.Vector.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +// @deprecated since 9 declare class Vector { /** * A constructor used to create a Vector object. -- Gitee From 48e67bd8e8884b4f8bca7cd5dbbfeddce0d527ae Mon Sep 17 00:00:00 2001 From: lengchangjing Date: Mon, 26 Sep 2022 21:45:59 +0800 Subject: [PATCH 2/7] modify interface exception information Signed-off-by: lengchangjing --- api/@ohos.util.ArrayList.d.ts | 70 ++++++++++++++++-------------- api/@ohos.util.Deque.d.ts | 22 +++++----- api/@ohos.util.HashMap.d.ts | 36 +++++++-------- api/@ohos.util.HashSet.d.ts | 28 ++++++------ api/@ohos.util.LightWeightMap.d.ts | 68 ++++++++++++++--------------- api/@ohos.util.LightWeightSet.d.ts | 50 ++++++++++----------- api/@ohos.util.LinkedList.d.ts | 60 ++++++++++++------------- api/@ohos.util.List.d.ts | 68 +++++++++++++++-------------- api/@ohos.util.PlainArray.d.ts | 64 +++++++++++++-------------- api/@ohos.util.Queue.d.ts | 14 +++--- api/@ohos.util.Stack.d.ts | 18 ++++---- api/@ohos.util.TreeMap.d.ts | 46 ++++++++++---------- api/@ohos.util.TreeSet.d.ts | 42 +++++++++--------- 13 files changed, 296 insertions(+), 290 deletions(-) diff --git a/api/@ohos.util.ArrayList.d.ts b/api/@ohos.util.ArrayList.d.ts index c97b879b7f..3aca051352 100644 --- a/api/@ohos.util.ArrayList.d.ts +++ b/api/@ohos.util.ArrayList.d.ts @@ -16,7 +16,7 @@ declare class ArrayList { /** * A constructor used to create a ArrayList object. - * @throws {NewTargetIsNullError} Parameter check failed. + * @throws {NewTargetIsNullError}: The ArrayList's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -31,7 +31,7 @@ declare class ArrayList { * Appends the specified element to the end of this arraylist. * @param element to be appended to this arraylist * @returns the boolean type, returns true if the addition is successful, and returns false if it fails. - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The add method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -42,9 +42,9 @@ declare class ArrayList { * any subsequent elements to the right (adds one to their index). * @param index index at which the specified element is to be inserted * @param element element to be inserted - * @throws {ContainerBindError} Method not support bind. - * @throws {RangeError} Index out of range. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The insert method cannot be bound. + * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length]. Received value is: [index] + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -53,7 +53,7 @@ declare class ArrayList { * Check if arraylist contains the specified element * @param element element to be contained * @return the boolean type,if arraylist contains the specified element,return true,else return false - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The has method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -63,7 +63,7 @@ declare class ArrayList { * in this arraylist, or -1 if this arraylist does not contain the element. * @param element element to be contained * @return the number type ,returns the lowest index such that or -1 if there is no such index. - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -73,9 +73,9 @@ declare class ArrayList { * delete the element, and move the index of all elements to the right of the element forward by one. * @param index the index in the arraylist * @return the T type ,returns undefined if arraylist is empty,If the index is - * @throws {ContainerBindError} Method not support bind. - * @throws {RangeError} Index out of range. - * @throws {TypeError} Parameter check failed. * + * @throws {ContainerBindError}: The removeByIndex method cannot be bound. + * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -86,7 +86,7 @@ declare class ArrayList { * unchanged. More formally, removes the element with the lowest index * @param element element to remove * @return the boolean type ,If there is no such element, return false - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -96,7 +96,7 @@ declare class ArrayList { * or -1 if the arraylist does not contain the element. * @param element element to find * @return the number type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getLastIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -105,9 +105,11 @@ declare class ArrayList { * Removes from this arraylist all of the elements whose index is between fromIndex,inclusive,and toIndex ,exclusive. * @param fromIndex The starting position of the index, containing the value at that index position * @param toIndex the end of the index, excluding the value at that index - * @throws {ContainerBindError} Method not support bind. - * @throws {RangeError} Index out of range. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The removeByRange method cannot be bound. + * @throws {RangeError}: The value of "fromIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [fromIndex] + * @throws {RangeError}: The value of "toIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [toIndex] + * @throws {TypeError}: The type of "fromIndex" must be number. Received value is: [fromIndex] + * @throws {TypeError}: The type of "toIndex" must be number. Received value is: [toIndex] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -121,8 +123,8 @@ declare class ArrayList { * @param arrlist (Optional) The arraylist object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The replaceAllElements method cannot be bound. + * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -137,8 +139,8 @@ declare class ArrayList { * @param arrlist (Optional) The arraylist object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The forEach method cannot be bound. + * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -153,8 +155,8 @@ declare class ArrayList { * @param firstValue (Optional) previous element * @param secondValue (Optional) next elements * If this parameter is empty, it will default to ASCII sorting - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The sort method cannot be bound. + * @throws {TypeError}: The type of "comparator" must be callable. Received value is: [comparator] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -163,9 +165,11 @@ declare class ArrayList { * Returns a view of the portion of this arraylist between the specified fromIndex,inclusize,and toIndex,exclusive * @param fromIndex The starting position of the index, containing the value at that index position * @param toIndex the end of the index, excluding the value at that index - * @throws {ContainerBindError} Method not support bind. - * @throws {RangeError} Index out of range. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The subArrayList method cannot be bound. + * @throws {RangeError}: The value of "fromIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [fromIndex] + * @throws {RangeError}: The value of "toIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [toIndex] + * @throws {TypeError}: The type of "fromIndex" must be number. Received value is: [fromIndex] + * @throws {TypeError}: The type of "toIndex" must be number. Received value is: [toIndex] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -173,7 +177,7 @@ declare class ArrayList { /** * Removes all of the elements from this arraylist.The arraylist will * be empty after this call returns.length becomes 0 - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -181,7 +185,7 @@ declare class ArrayList { /** * Returns a shallow copy of this instance. (The elements themselves are not copied.) * @return this arraylist instance - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The clone method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -189,7 +193,7 @@ declare class ArrayList { /** * returns the capacity of this arraylist * @return the number type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getCapacity method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -197,7 +201,7 @@ declare class ArrayList { /** * convert arraylist to array * @return the Array type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The convertToArray method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -205,7 +209,7 @@ declare class ArrayList { /** * Determine whether arraylist is empty and whether there is an element * @return the boolean type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -213,22 +217,22 @@ declare class ArrayList { /** * If the newCapacity provided by the user is greater than or equal to length, * change the capacity of the arraylist to newCapacity, otherwise the capacity will not be changed - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The increaseCapacityTo method cannot be bound. + * @throws {TypeError}: The type of "newCapacity" must be number. Received value is: [newCapacity] * @since 8 * @syscap SystemCapability.Utils.Lang */ increaseCapacityTo(newCapacity: number): void; /** * Limit the capacity to the current length - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The trimToCurrentLength method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ trimToCurrentLength(): void; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.Deque.d.ts b/api/@ohos.util.Deque.d.ts index 04d1212372..11a71336ac 100644 --- a/api/@ohos.util.Deque.d.ts +++ b/api/@ohos.util.Deque.d.ts @@ -16,7 +16,7 @@ declare class Deque { /** * A constructor used to create a Deque object. - * @throws {NewTargetIsNullError} Parameter check failed. + * @throws {NewTargetIsNullError}: The Deque's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -30,7 +30,7 @@ declare class Deque { /** * Inserts an element into the deque header. * @param element to be appended to this deque - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The insertFront method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -38,7 +38,7 @@ declare class Deque { /** * Inserting an element at the end of a deque * @param element to be appended to this deque - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The insertEnd method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -47,7 +47,7 @@ declare class Deque { * Check if deque contains the specified element * @param element element to be contained * @return the boolean type,if deque contains the specified element,return true,else return false - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The has method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -55,7 +55,7 @@ declare class Deque { /** * Obtains the header element of a deque. * @return the T type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -63,7 +63,7 @@ declare class Deque { /** * Obtains the end element of a deque. * @return the T type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getLast method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -71,7 +71,7 @@ declare class Deque { /** * Obtains the header element of a deque and delete the element. * @return the T type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The popFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -79,7 +79,7 @@ declare class Deque { /** * Obtains the end element of a deque and delete the element. * @return the T type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The popLast method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -92,8 +92,8 @@ declare class Deque { * @param deque (Optional) The deque object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {TypeError} Parameter check failed. - * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws {ContainerBindError}: The forEach method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -101,7 +101,7 @@ declare class Deque { thisArg?: Object): void; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.HashMap.d.ts b/api/@ohos.util.HashMap.d.ts index b2f1bb1807..e90c74aba7 100644 --- a/api/@ohos.util.HashMap.d.ts +++ b/api/@ohos.util.HashMap.d.ts @@ -16,7 +16,7 @@ declare class HashMap { /** * A constructor used to create a HashMap object. - * @throws {NewTargetIsNullError} Parameter check failed. + * @throws {NewTargetIsNullError}: The HashMap's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -30,7 +30,7 @@ declare class HashMap { /** * Returns whether the Map object contains elements * @return the boolean type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -39,7 +39,7 @@ declare class HashMap { * Returns whether a key is contained in this map * @param key need to determine whether to include the key * @return the boolean type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The hasKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -48,7 +48,7 @@ declare class HashMap { * Returns whether a value is contained in this map * @param value need to determine whether to include the value * @return the boolean type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The hasValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -57,7 +57,7 @@ declare class HashMap { * Returns a specified element in a Map object, or null if there is no corresponding element * @param key the index in HashMap * @return value or null - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The get method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -65,8 +65,8 @@ declare class HashMap { /** * Adds all element groups in one map to another map * @param map the Map object to add members - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The setAll method cannot be bound. + * @throws {TypeError}: The type of "map" must be HashMap. Received value is: [map] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -76,8 +76,8 @@ declare class HashMap { * @param key Added or updated targets * @param value Added or updated value * @returns the map object after set - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The set method cannot be bound. + * @throws {TypeError}: The type of "key" must be not null. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -86,28 +86,28 @@ declare class HashMap { * Remove a specified element from a Map object * @param key Target to be deleted * @return Target mapped value - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ remove(key: K): V; /** * Clear all element groups in the map - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ clear(): void; /** * Returns a new Iterator object that contains the keys contained in this map - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The keys method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ keys(): IterableIterator; /** * Returns a new Iterator object that contains the values contained in this map - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The values method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -117,7 +117,7 @@ declare class HashMap { * @param key Updated targets * @param newValue Updated the target mapped value * @returns the boolean type(Is there a target pointed to by the key) - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The replace method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -125,8 +125,8 @@ declare class HashMap { /** * Executes the given callback function once for each real key in the map. * It does not perform functions on deleted keys - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The forEach method cannot be bound. + * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -134,14 +134,14 @@ declare class HashMap { thisArg?: Object): void; /** * Returns a new Iterator object that contains the [key, value] pairs for each element in the Map object in insertion order - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The entries method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ entries(): IterableIterator<[K, V]>; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.HashSet.d.ts b/api/@ohos.util.HashSet.d.ts index b368347aea..478bb206b5 100644 --- a/api/@ohos.util.HashSet.d.ts +++ b/api/@ohos.util.HashSet.d.ts @@ -16,7 +16,7 @@ declare class HashSet { /** * A constructor used to create a HashSet object. - * @throws {NewTargetIsNullError} Parameter check failed. + * @throws {NewTargetIsNullError}: The HashSet's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -30,7 +30,7 @@ declare class HashSet { /** * Returns whether the Set object contains elements * @return the boolean type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -39,8 +39,8 @@ declare class HashSet { * Returns whether the Set object contain s the elements * @param value need to determine whether to include the element * @return the boolean type - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed + * @throws {ContainerBindError}: The has method cannot be bound. + * @throws {TypeError}: The type of "value" must be not null. Received value is: [value] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -49,8 +49,8 @@ declare class HashSet { * If the set does not contain the element, the specified element is added * @param value Added element * @returns the boolean type(Is there contain this element) - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed + * @throws {ContainerBindError}: The add method cannot be bound. + * @throws {TypeError}: The type of "value" must be not null. Received value is: [value] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -59,23 +59,23 @@ declare class HashSet { * Remove a specified element from a Set object * @param value Target to be deleted * @return the boolean type(Is there contain this element) - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed + * @throws {ContainerBindError}: The remove method cannot be bound. + * @throws {TypeError}: The type of "value" must be not null. Received value is: [value] * @since 8 * @syscap SystemCapability.Utils.Lang */ remove(value: T): boolean; /** * Clears all element groups in a set - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ clear(): void; /** * Executes a provided function once for each value in the Set object. - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The forEach method cannot be bound. + * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -83,21 +83,21 @@ declare class HashSet { thisArg?: Object): void; /** * Returns a new Iterator object that contains the values contained in this set - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The values method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ values(): IterableIterator; /** * Returns a new Iterator object that contains the [key, value] pairs for each element in the Set object in insertion order - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The entries method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ entries(): IterableIterator<[T, T]>; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.LightWeightMap.d.ts b/api/@ohos.util.LightWeightMap.d.ts index d10712ebd6..b542d80b50 100644 --- a/api/@ohos.util.LightWeightMap.d.ts +++ b/api/@ohos.util.LightWeightMap.d.ts @@ -16,7 +16,7 @@ declare class LightWeightMap { /** * A constructor used to create a LightWeightMap object. - * @throws {NewTargetIsNullError} Parameter check failed. + * @throws {NewTargetIsNullError}: The LightWeightMap's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -31,8 +31,8 @@ declare class LightWeightMap { * Returns whether this map has all the object in a specified map * @param map the Map object to compare * @return the boolean type - * @throws {TypeError} Parameter check failed. - * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError}: The type of "map" must be LightWeightMap. Received value is: [map] + * @throws {ContainerBindError}: The hasAll method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -41,7 +41,7 @@ declare class LightWeightMap { * Returns whether a key is contained in this map * @param key need to determine whether to include the key * @return the boolean type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The hasKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -50,7 +50,7 @@ declare class LightWeightMap { * Returns whether a value is contained in this map * @param value need to determine whether to include the value * @return the boolean type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The hasValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -59,15 +59,15 @@ declare class LightWeightMap { * Ensures that the capacity of an LightWeightMap container is greater than or equal to a apecified value, * and that the container has all the original objects after capacity expansion * @param minimumCapacity Minimum capacity to be reserved - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The increaseCapacityTo method cannot be bound. + * @throws {TypeError}: The type of "minimumCapacity" must be number. Received value is: [minimumCapacity] * @since 8 * @syscap SystemCapability.Utils.Lang */ increaseCapacityTo(minimumCapacity: number): void; /** * Returns a new Iterator object that contains the [key, value] pairs for each element in the Map object in insertion order - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The entries method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -76,7 +76,7 @@ declare class LightWeightMap { * Returns the value to which the specified key is mapped, or undefined if this map contains no mapping for the key * @param key the index in LightWeightMap * @return value or undefined - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The get method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -85,7 +85,7 @@ declare class LightWeightMap { * Obtains the index of the key equal to a specified key in an LightWeightMap container * @param key Looking for goals * @return Subscript corresponding to target - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getIndexOfKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -94,7 +94,7 @@ declare class LightWeightMap { * Obtains the index of the value equal to a specified value in an LightWeightMap container * @param value Looking for goals * @return Subscript corresponding to target - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getIndexOfValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -102,7 +102,7 @@ declare class LightWeightMap { /** * Returns whether the Map object contains elements * @return the boolean type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -111,16 +111,16 @@ declare class LightWeightMap { * Obtains the key at the loaction identified by index in an LightWeightMap container * @param index Target subscript for search * @return the key of key-value pairs - * @throws {ContainerBindError} Method not support bind. - * @throws {RangeError} Index out of range. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The getKeyAt method cannot be bound. + * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ getKeyAt(index: number): K; /** * Obtains a ES6 iterator that contains all the keys of an LightWeightMap container - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The keys method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -128,8 +128,8 @@ declare class LightWeightMap { /** * Adds all element groups in one map to another map * @param map the Map object to add members - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The setAll method cannot be bound. + * @throws {TypeError}: The type of "map" must be LightWeightMap. Received value is: [map] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -139,7 +139,7 @@ declare class LightWeightMap { * @param key Added or updated targets * @param value Added or updated value * @returns the map object after set - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The set method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -148,7 +148,7 @@ declare class LightWeightMap { * Remove the mapping for this key from this map if present * @param key Target to be deleted * @return Target mapped value - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -157,8 +157,8 @@ declare class LightWeightMap { * Deletes a key-value pair at the loaction identified by index from an LightWeightMap container * @param index Target subscript for search * @return the boolean type(Is there a delete value) - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The removeAt method cannot be bound. + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -166,7 +166,7 @@ declare class LightWeightMap { /** * Removes all of the mapping from this map * The map will be empty after this call returns - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -176,9 +176,9 @@ declare class LightWeightMap { * @param index Target subscript for search * @param value Updated the target mapped value * @return the boolean type(Is there a value corresponding to the subscript) - * @throws {ContainerBindError} Method not support bind. - * @throws {RangeError} Index out of range. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The setValueAt method cannot be bound. + * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -186,8 +186,8 @@ declare class LightWeightMap { /** * Executes the given callback function once for each real key in the map. * It does not perform functions on deleted keys - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The forEach method cannot be bound. + * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -195,14 +195,14 @@ declare class LightWeightMap { thisArg?: Object): void; /** * returns an ES6 iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ [Symbol.iterator](): IterableIterator<[K, V]>; /** * Obtains a string that contains all the keys and values in an LightWeightMap container - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The toString method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -211,16 +211,16 @@ declare class LightWeightMap { * Obtains the value identified by index in an LightWeightMap container * @param index Target subscript for search * @return the value of key-value pairs - * @throws {ContainerBindError} Method not support bind. - * @throws {RangeError} Index out of range. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The getValueAt method cannot be bound. + * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ getValueAt(index: number): V; /** * Returns an iterator of the values contained in this map - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The values method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.LightWeightSet.d.ts b/api/@ohos.util.LightWeightSet.d.ts index fe554a86fe..7c8dc838b0 100644 --- a/api/@ohos.util.LightWeightSet.d.ts +++ b/api/@ohos.util.LightWeightSet.d.ts @@ -16,7 +16,7 @@ declare class LightWeightSet { /** * A constructor used to create a LightWeightSet object. - * @throws {NewTargetIsNullError} Parameter check failed. + * @throws {NewTargetIsNullError}: The LightWeightSet's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -31,7 +31,7 @@ declare class LightWeightSet { * If the set does not contain the element, the specified element is added * @param value Added element * @returns the boolean type(Is there contain this element) - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The add method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -40,8 +40,8 @@ declare class LightWeightSet { * Adds all the objects in a specified LightWeightSet container to the current LightWeightSet container * @param set the Set object to provide the added element * @returns the boolean type(Is there any new data added successfully) - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The addAll method cannot be bound. + * @throws {TypeError}: The type of "set" must be LightWeightSet. Received value is: [set] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -50,8 +50,8 @@ declare class LightWeightSet { * Returns whether this set has all the object in a specified set * @param set the Set object to compare * @return the boolean type - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The hasAll method cannot be bound. + * @throws {TypeError}: The type of "set" must be LightWeightSet. Received value is: [set] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -60,7 +60,7 @@ declare class LightWeightSet { * Checks whether an LightWeightSet container has a specified key * @param key need to determine whether to include the key * @return the boolean type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The has method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -69,7 +69,7 @@ declare class LightWeightSet { * Checks whether an the objects of an LightWeighSet containeer are of the same type as a specified Object LightWeightSet * @param obj need to determine whether to include the obj * @return the boolean type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The equal method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -78,9 +78,9 @@ declare class LightWeightSet { * Ensures that the capacity of an LightWeightSet container is greater than or equal to a apecified value, * and that the container has all the original objects after capacity expansion * @param minimumCapacity Minimum capacity to be reserved - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. - * @throws {RangeError} Index out of range. + * @throws {ContainerBindError}: The increaseCapacityTo method cannot be bound. + * @throws {TypeError}: The type of "minimumCapacity" must be number. Received value is: [minimumCapacity] + * @throws {RangeError}: The value of "minimumCapacity" is out of range. It must be > [currentCapacity]. Received value is: [minimumCapacity] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -89,7 +89,7 @@ declare class LightWeightSet { * Obtains the index of s key of a specified Object type in an LightWeightSet container * @param key Looking for goals * @return Subscript corresponding to target - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -98,7 +98,7 @@ declare class LightWeightSet { * Deletes an object of a specified Object type from an LightWeightSet container * @param key Target to be deleted * @return Target element - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -107,8 +107,8 @@ declare class LightWeightSet { * Deletes an object at the loaction identified by index from an LightWeightSet container * @param index Target subscript for search * @return the boolean type(Is there a delete value) - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The removeAt method cannot be bound. + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -116,7 +116,7 @@ declare class LightWeightSet { /** * Removes all of the mapping from this map * The map will be empty after this call returns - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -124,8 +124,8 @@ declare class LightWeightSet { /** * Executes the given callback function once for each real key in the map. * It does not perform functions on deleted keys - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The forEach method cannot be bound. + * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -133,7 +133,7 @@ declare class LightWeightSet { thisArg?: Object): void; /** * returns an ES6 iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -146,7 +146,7 @@ declare class LightWeightSet { toString(): String; /** * Obtains an Array that contains all the objects of an LightWeightSet container. - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The toArray method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -155,29 +155,29 @@ declare class LightWeightSet { * Obtains the object at the location identified by index in an LightWeightSet container * @param index Target subscript for search * @return the value of key-value pairs - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The getValueAt method cannot be bound. + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ getValueAt(index: number): T; /** * Returns a ES6 iterator of the values contained in this Set - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The values method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ values(): IterableIterator; /** * Returns a Iterator object that contains the [key, value] pairs for each element in the Set object in insertion order - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The entries method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ entries(): IterableIterator<[T, T]>; /** * Returns whether the set object contains elements - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.LinkedList.d.ts b/api/@ohos.util.LinkedList.d.ts index 3a31b2ecfc..e6166e5a26 100644 --- a/api/@ohos.util.LinkedList.d.ts +++ b/api/@ohos.util.LinkedList.d.ts @@ -16,7 +16,7 @@ declare class LinkedList { /** * A constructor used to create a LinkedList object. - * @throws {NewTargetIsNullError} Parameter check failed. + * @throws {NewTargetIsNullError}: The LinkedList's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -31,7 +31,7 @@ declare class LinkedList { * Appends the specified element to the end of this linkedlist. * @param element to be appended to this linkedlist * @returns the boolean type, returns true if the addition is successful, and returns false if it fails. - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The add method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -40,9 +40,9 @@ declare class LinkedList { * Inserts the specified element at the specified position in this linkedlist. * @param index index at which the specified element is to be inserted * @param element element to be inserted - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. - * @throws {RangeError} Index out of range. + * @throws {ContainerBindError}: The insert method cannot be bound. + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length]. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -52,8 +52,8 @@ declare class LinkedList { * or returns undefined if this linkedlist is empty * @param index specified position * @return the T type - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The get method cannot be bound. + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -61,7 +61,7 @@ declare class LinkedList { /** * Inserts the specified element at the beginning of this LinkedList. * @param element the element to add - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The addFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -69,7 +69,7 @@ declare class LinkedList { /** * Retrieves and removes the head (first element) of this linkedlist. * @return the head of this list - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The removeFirst method cannot be bound. * @throws {ContainerIsEmptyError} Container is Empty. * @since 8 * @syscap SystemCapability.Utils.Lang @@ -78,7 +78,7 @@ declare class LinkedList { /** * Removes and returns the last element from this linkedlist. * @return the head of this list - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The removeLast method cannot be bound. * @throws {ContainerIsEmptyError} Container is Empty. * @since 8 * @syscap SystemCapability.Utils.Lang @@ -88,7 +88,7 @@ declare class LinkedList { * Check if linkedlist contains the specified element * @param element element to be contained * @return the boolean type,if linkedList contains the specified element,return true,else return false - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The has method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -98,7 +98,7 @@ declare class LinkedList { * in this linkedlist, or -1 if this linkedlist does not contain the element. * @param element element to be contained * @return the number type ,returns the lowest index such that or -1 if there is no such index. - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -108,9 +108,9 @@ declare class LinkedList { * @param index the index in the linkedlist * @return the T type ,returns undefined if linkedlist is empty,If the index is * out of bounds (greater than or equal to length or less than 0), throw an exception - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. - * @throws {RangeError} Index out of range. + * @throws {ContainerBindError}: The removeByIndex method cannot be bound. + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -121,7 +121,7 @@ declare class LinkedList { * unchanged. More formally, removes the element with the lowest index * @param element element to remove * @return the boolean type ,If there is no such element, return false - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -132,7 +132,7 @@ declare class LinkedList { * unchanged. More formally, removes the element with the lowest index * @param element element to remove * @return the boolean type ,If there is no such element, return false - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The removeFirstFound method cannot be bound. * @throws {ContainerIsEmptyError} Container is Empty. * @since 8 * @syscap SystemCapability.Utils.Lang @@ -144,7 +144,7 @@ declare class LinkedList { * unchanged. More formally, removes the element with the lowest index * @param element element to remove * @return the boolean type ,If there is no such element, return false - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The removeLastFound method cannot be bound. * @throws {ContainerIsEmptyError} Container is Empty. * @since 8 * @syscap SystemCapability.Utils.Lang @@ -155,7 +155,7 @@ declare class LinkedList { * or -1 if the linkedlist does not contain the element. * @param element element to find * @return the number type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getLastIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -164,7 +164,7 @@ declare class LinkedList { * Returns the first element (the item at index 0) of this linkedlist. * or returns undefined if linkedlist is empty * @return the T type ,returns undefined if linkedList is empty - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -173,7 +173,7 @@ declare class LinkedList { * Returns the Last element (the item at index length-1) of this linkedlist. * or returns undefined if linkedlist is empty * @return the T type ,returns undefined if linkedList is empty - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getLast method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -183,9 +183,9 @@ declare class LinkedList { * @param element replaced element * @param index index to find * @return the T type ,returns undefined if linkedList is empty - * @throws {ContainerBindError} Method not support bind. - * @throws {RangeError} Index out of range. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The set method cannot be bound. + * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -199,8 +199,8 @@ declare class LinkedList { * @param LinkedList (Optional) The linkedlist object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The forEach method cannot be bound. + * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -209,7 +209,7 @@ declare class LinkedList { /** * Removes all of the elements from this linkedlist.The linkedlist will * be empty after this call returns.length becomes 0 - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -217,7 +217,7 @@ declare class LinkedList { /** * Returns a shallow copy of this instance. (The elements themselves are not copied.) * @return this linkedlist instance - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The clone method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -225,14 +225,14 @@ declare class LinkedList { /** * convert linkedlist to array * @return the Array type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The convertToArray method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ convertToArray(): Array; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.List.d.ts b/api/@ohos.util.List.d.ts index 55a57208b3..24822675c3 100644 --- a/api/@ohos.util.List.d.ts +++ b/api/@ohos.util.List.d.ts @@ -16,7 +16,7 @@ declare class List { /** * A constructor used to create a List object. - * @throws {NewTargetIsNullError} Parameter check failed. + * @throws {NewTargetIsNullError}: The List's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -31,7 +31,7 @@ declare class List { * Appends the specified element to the end of this list. * @param element to be appended to this list * @returns the boolean type, returns true if the addition is successful, and returns false if it fails. - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The add method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -40,9 +40,9 @@ declare class List { * Inserts the specified element at the specified position in this list. * @param index index at which the specified element is to be inserted * @param element element to be inserted - * @throws {ContainerBindError} Method not support bind. - * @throws {RangeError} Index out of range. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The insert method cannot be bound. + * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length]. Received value is: [index] + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -52,8 +52,8 @@ declare class List { * or returns undefined if this list is empty * @param index specified position * @return the T type - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed + * @throws {ContainerBindError}: The get method cannot be bound. + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -62,7 +62,7 @@ declare class List { * Check if list contains the specified element * @param element element to be contained * @return the boolean type,if list contains the specified element,return true,else return false - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The has method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -72,7 +72,7 @@ declare class List { * in this list, or -1 if this list does not contain the element. * @param element element to be contained * @return the number type ,returns the lowest index such that or -1 if there is no such index. - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -82,9 +82,9 @@ declare class List { * @param index the index in the list * @return the T type ,returns undefined if list is empty,If the index is * out of bounds (greater than or equal to length or less than 0), throw an exception - * @throws {ContainerBindError} Method not support bind. - * @throws {RangeError} Index out of range. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The removeByIndex method cannot be bound. + * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -95,7 +95,7 @@ declare class List { * unchanged. More formally, removes the element with the lowest index * @param element element to remove * @return the boolean type ,If there is no such element, return false - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -105,7 +105,7 @@ declare class List { * or -1 if the list does not contain the element. * @param element element to find * @return the number type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getLastIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -114,7 +114,7 @@ declare class List { * Returns the first element (the item at index 0) of this list. * or returns undefined if list is empty * @return the T type ,returns undefined if list is empty - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -123,7 +123,7 @@ declare class List { * Returns the Last element (the item at index length-1) of this list. * or returns undefined if list is empty * @return the T type ,returns undefined if list is empty - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getLast method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -133,9 +133,9 @@ declare class List { * @param element replaced element * @param index index to find * @return the T type - * @throws {ContainerBindError} Method not support bind. - * @throws {RangeError} Index out of range. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The set method cannot be bound. + * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -145,7 +145,7 @@ declare class List { * return true, otherwise return false. * @param obj Compare objects * @return the boolean type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The equal method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -159,8 +159,8 @@ declare class List { * @param List (Optional) The list object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The forEach method cannot be bound. + * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -174,8 +174,8 @@ declare class List { * minus firstValue, it returns an list sorted in descending order; * @param firstValue (Optional) previous element * @param secondValue (Optional) next elements - * @throws {TypeError} Parameter check failed. - * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError}: The type of "comparator" must be callable. Received value is: [comparator] + * @throws {ContainerBindError}: The sort method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -183,7 +183,7 @@ declare class List { /** * Removes all of the elements from this list.The list will * be empty after this call returns.length becomes 0 - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -192,9 +192,11 @@ declare class List { * Returns a view of the portion of this list between the specified fromIndex,inclusize,and toIndex,exclusive * @param fromIndex The starting position of the index, containing the value at that index position * @param toIndex the end of the index, excluding the value at that index - * @throws {ContainerBindError} Method not support bind. - * @throws {RangeError} Index out of range. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The getSubList method cannot be bound. + * @throws {RangeError}: The value of "fromIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [fromIndex] + * @throws {RangeError}: The value of "toIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [toIndex] + * @throws {TypeError}: The type of "fromIndex" must be number. Received value is: [fromIndex] + * @throws {TypeError}: The type of "toIndex" must be number. Received value is: [toIndex] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -208,8 +210,8 @@ declare class List { * @param list (Optional) The list object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The replaceAllElements method cannot be bound. + * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -218,7 +220,7 @@ declare class List { /** * convert list to array * @return the Array type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The convertToArray method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -226,14 +228,14 @@ declare class List { /** * Determine whether list is empty and whether there is an element * @return the boolean type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ isEmpty(): boolean; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.PlainArray.d.ts b/api/@ohos.util.PlainArray.d.ts index e4a356f24e..cc9e9622a4 100644 --- a/api/@ohos.util.PlainArray.d.ts +++ b/api/@ohos.util.PlainArray.d.ts @@ -16,7 +16,7 @@ declare class PlainArray { /** * A constructor used to create a PlainArray object. - * @throws {NewTargetIsNullError} Parameter check failed. + * @throws {NewTargetIsNullError}: The PlainArray's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -31,22 +31,22 @@ declare class PlainArray { * Appends a key-value pair to PlainArray * @param key Added the key of key-value * @param value Added the value of key-value - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The add method cannot be bound. + * @throws {TypeError}: The type of "key" must be number. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ add(key: number, value: T): void; /** * Clears the current PlainArray object - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ clear(): void; /** * Obtains a clone of the current PlainArray object - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The clone method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -55,8 +55,8 @@ declare class PlainArray { * Checks whether the current PlainArray object contains the specified key * @param key need to determine whether to include the key * @return the boolean type - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The has method cannot be bound. + * @throws {TypeError}: The type of "key" must be number. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -65,8 +65,8 @@ declare class PlainArray { * Queries the value associated with the specified key * @param key Looking for goals * @return the value of key-value pairs - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The get method cannot be bound. + * @throws {TypeError}: The type of "key" must be number. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -75,8 +75,8 @@ declare class PlainArray { * Queries the index for a specified key * @param key Looking for goals * @return Subscript corresponding to target - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The getIndexOfKey method cannot be bound. + * @throws {TypeError}: The type of "key" must be number. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -85,7 +85,7 @@ declare class PlainArray { * Queries the index for a specified value * @param value Looking for goals * @return Subscript corresponding to target - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getIndexOfValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -93,7 +93,7 @@ declare class PlainArray { /** * Checks whether the current PlainArray object is empty * @return the boolean type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -102,8 +102,8 @@ declare class PlainArray { * Queries the key at a specified index * @param index Target subscript for search * @return the key of key-value pairs - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The getKeyAt method cannot be bound. + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -112,8 +112,8 @@ declare class PlainArray { * Remove the key-value pair based on a specified key if it exists and return the value * @param key Target to be deleted * @return Target mapped value - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed + * @throws {ContainerBindError}: The remove method cannot be bound. + * @throws {TypeError}: The type of "key" must be number. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -122,8 +122,8 @@ declare class PlainArray { * Remove the key-value pair at a specified index if it exists and return the value * @param index Target subscript for search * @return the T type - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed + * @throws {ContainerBindError}: The removeAt method cannot be bound. + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -133,9 +133,9 @@ declare class PlainArray { * @param index remove start index * @param size Expected deletion quantity * @return Actual deleted quantity - * @throws {ContainerBindError} Method not support bind. - * @throws {RangeError} Index out of range. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The removeRangeFrom method cannot be bound. + * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -144,16 +144,16 @@ declare class PlainArray { * Update value on specified index * @param index Target subscript for search * @param value Updated the target mapped value - * @throws {ContainerBindError} Method not support bind. - * @throws {RangeError} Index out of range. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The setValueAt method cannot be bound. + * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ setValueAt(index: number, value: T): void; /** * Obtains the string representation of the PlainArray object - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The toString method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -162,17 +162,17 @@ declare class PlainArray { * Queries the value at a specified index * @param index Target subscript for search * @return the value of key-value pairs - * @throws {ContainerBindError} Method not support bind. - * @throws {RangeError} Index out of range. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The getValueAt method cannot be bound. + * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws {TypeError}: The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ getValueAt(index: number): T; /** * Executes a provided function once for each value in the PlainArray object. - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The forEach method cannot be bound. + * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -180,7 +180,7 @@ declare class PlainArray { thisArg?: Object): void; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.Queue.d.ts b/api/@ohos.util.Queue.d.ts index f7587f051e..4711a01724 100644 --- a/api/@ohos.util.Queue.d.ts +++ b/api/@ohos.util.Queue.d.ts @@ -16,7 +16,7 @@ declare class Queue { /** * A constructor used to create a Queue object. - * @throws {NewTargetIsNullError} Parameter check failed. + * @throws {NewTargetIsNullError}: The Queue's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -32,7 +32,7 @@ declare class Queue { * so immediately without violating capacity restrictions. * @param element to be appended to this queue * @return the boolean type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The add method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -40,7 +40,7 @@ declare class Queue { /** * Obtains the header element of a queue. * @return the T type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -48,7 +48,7 @@ declare class Queue { /** * Retrieves and removes the head of this queue * @return the T type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The pop method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -62,8 +62,8 @@ declare class Queue { * @param Queue (Optional) The queue object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The forEach method cannot be bound. + * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -71,7 +71,7 @@ declare class Queue { thisArg?: Object): void; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.Stack.d.ts b/api/@ohos.util.Stack.d.ts index 79a1413841..3539b676be 100644 --- a/api/@ohos.util.Stack.d.ts +++ b/api/@ohos.util.Stack.d.ts @@ -16,7 +16,7 @@ declare class Stack { /** * A constructor used to create a Stack object. - * @throws {NewTargetIsNullError} Parameter check failed. + * @throws {NewTargetIsNullError}: The Stack's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -30,7 +30,7 @@ declare class Stack { /** * Tests if this stack is empty * @return the boolean type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -39,7 +39,7 @@ declare class Stack { * Looks at the object at the top of this stack without removing it from the stack * Return undfined if this stack is empty * @return the top value or undefined - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The peek method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -48,7 +48,7 @@ declare class Stack { * Removes the object at the top of this stack and returns that object as the value of this function * an exception if the stack is empty * @returns Stack top value or undefined - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The pop method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -57,7 +57,7 @@ declare class Stack { * Pushes an item onto the top of this stack * @param item to be appended to this Stack * @returns the T type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The push method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -66,7 +66,7 @@ declare class Stack { * Returns the 1-based position where an object is on this stack * @param element Target to be deleted * @returns the T type,If there is no such element, return -1 - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The locate method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -80,8 +80,8 @@ declare class Stack { * @param stack (Optional) The Stack object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The forEach method cannot be bound. + * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -89,7 +89,7 @@ declare class Stack { thisArg?: Object): void; /** * returns an ES6 iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.TreeMap.d.ts b/api/@ohos.util.TreeMap.d.ts index 69ebaed707..9bbc58ca6f 100644 --- a/api/@ohos.util.TreeMap.d.ts +++ b/api/@ohos.util.TreeMap.d.ts @@ -20,8 +20,8 @@ declare class TreeMap { * @param comparator (Optional) User-defined comparison functions * @param firstValue (Optional) previous element * @param secondValue (Optional) next element - * @throws {NewTargetIsNullError} Parameter check failed. - * @throws {TypeError} Parameter check failed. + * @throws {NewTargetIsNullError}: The TreeMap's constructor cannot be directly invoked. + * @throws {TypeError}: The type of "comparator" must be callable. Received value is: [comparator] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -35,7 +35,7 @@ declare class TreeMap { /** * Returns whether the Map object contains elements * @return the boolean type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -44,7 +44,7 @@ declare class TreeMap { * Returns whether a key is contained in this map * @param key need to determine whether to include the key * @return the boolean type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The hasKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -53,7 +53,7 @@ declare class TreeMap { * Returns whether a value is contained in this map * @param value need to determine whether to include the value * @return the boolean type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The hasValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -62,7 +62,7 @@ declare class TreeMap { * Returns a specified element in a Map object, or null if there is no corresponding element * @param key the index in TreeMap * @return value or null - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The get method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -71,7 +71,7 @@ declare class TreeMap { * Obtains the first sorted key in the treemap. * Or returns undefined if tree map is empty * @return value or undefined - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getFirstKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -80,7 +80,7 @@ declare class TreeMap { * Obtains the last sorted key in the treemap. * Or returns undefined if tree map is empty * @return value or undefined - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getLastKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -88,8 +88,8 @@ declare class TreeMap { /** * Adds all element groups in one map to another map * @param map the Map object to add members - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The setAll method cannot be bound. + * @throws {TypeError}: The type of "map" must be TreeMap. Received value is: [map] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -99,8 +99,8 @@ declare class TreeMap { * @param key Added or updated targets * @param value Added or updated value * @returns the map object after set - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The set method cannot be bound. + * @throws {TypeError}: The type of "key" must be not null. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -108,7 +108,7 @@ declare class TreeMap { /** * Remove a specified element from a Map object * @param key Target to be deleted - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The remove method cannot be bound. * @return Target mapped value * @since 8 * @syscap SystemCapability.Utils.Lang @@ -116,7 +116,7 @@ declare class TreeMap { remove(key: K): V; /** * Clear all element groups in the map - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -125,7 +125,7 @@ declare class TreeMap { * Returns the greatest element smaller than or equal to the specified key * if the key does not exist, undefied is returned * @param key Objective of comparison - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getLowerKey method cannot be bound. * @return key or undefined * @since 8 * @syscap SystemCapability.Utils.Lang @@ -136,21 +136,21 @@ declare class TreeMap { * if the key does not exist, undefied is returned * @param key Objective of comparison * @return key or undefined - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getHigherKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ getHigherKey(key: K): K; /** * Returns a new Iterator object that contains the keys contained in this map - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The keys method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ keys(): IterableIterator; /** * Returns a new Iterator object that contains the values contained in this map - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The values method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -160,7 +160,7 @@ declare class TreeMap { * @param key Updated targets * @param value Updated the target mapped value * @returns the boolean type(Is there a target pointed to by the key) - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The replace method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -168,8 +168,8 @@ declare class TreeMap { /** * Executes the given callback function once for each real key in the map. * It does not perform functions on deleted keys - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The forEach method cannot be bound. + * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -177,14 +177,14 @@ declare class TreeMap { thisArg?: Object): void; /** * Returns a new Iterator object that contains the [key, value] pairs for each element in the Map object in insertion order - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The entries method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ entries(): IterableIterator<[K, V]>; /** * returns an ES6 iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.TreeSet.d.ts b/api/@ohos.util.TreeSet.d.ts index f83f36ae14..eabec4bb9a 100644 --- a/api/@ohos.util.TreeSet.d.ts +++ b/api/@ohos.util.TreeSet.d.ts @@ -19,8 +19,8 @@ declare class TreeSet { * @param comparator (Optional) User-defined comparison functions * @param firstValue (Optional) previous element * @param secondValue (Optional) next element - * @throws {NewTargetIsNullError} Parameter check failed. - * @throws {TypeError} Parameter check failed. + * @throws {NewTargetIsNullError}: The TreeSet's constructor cannot be directly invoked. + * @throws {TypeError}: The type of "comparator" must be callable. Received value is: [comparator] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -34,7 +34,7 @@ declare class TreeSet { /** * Returns whether the Set object contains elements * @return the boolean type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -43,7 +43,7 @@ declare class TreeSet { * Returns whether the Set object contain s the elements * @param value need to determine whether to include the element * @return the boolean type - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The has method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -52,8 +52,8 @@ declare class TreeSet { * If the set does not contain the element, the specified element is added * @param value Added element * @returns the boolean type(Is there contain this element) - * @throws {TypeError} Parameter check failed. - * @throws {ContainerBindError} Method not support bind. + * @throws {TypeError}: The type of "value" must be not null. Received value is: [value] + * @throws {ContainerBindError}: The add method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -62,14 +62,14 @@ declare class TreeSet { * Remove a specified element from a Set object * @param value Target to be deleted * @return the boolean type(Is there contain this element) - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ remove(value: T): boolean; /** * Clears all element groups in a set - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -77,7 +77,7 @@ declare class TreeSet { /** * Gets the first elements in a set * @return value or undefined - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getFirstValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -85,7 +85,7 @@ declare class TreeSet { /** * Gets the last elements in a set * @return value or undefined - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The getLastValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -95,8 +95,8 @@ declare class TreeSet { * if the key does not exist, undefied is returned * @param key Objective of comparison * @return key or undefined - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The getLowerValue method cannot be bound. + * @throws {TypeError}: The type of "key" must be not null. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -106,8 +106,8 @@ declare class TreeSet { * if the key does not exist, undefied is returned * @param key Objective of comparison * @return key or undefined - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The getHigherValue method cannot be bound. + * @throws {TypeError}: The type of "key" must be not null. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -115,7 +115,7 @@ declare class TreeSet { /** * Return and delete the first element, returns undefined if tree set is empty * @return first value or undefined - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The popFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -123,15 +123,15 @@ declare class TreeSet { /** * Return and delete the last element, returns undefined if tree set is empty * @return last value or undefined - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The popLast method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ popLast(): T; /** * Executes a provided function once for each value in the Set object. - * @throws {ContainerBindError} Method not support bind. - * @throws {TypeError} Parameter check failed. + * @throws {ContainerBindError}: The forEach method cannot be bound. + * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -139,21 +139,21 @@ declare class TreeSet { thisArg?: Object): void; /** * Returns a new Iterator object that contains the values contained in this set - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The values method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ values(): IterableIterator; /** * Returns a new Iterator object that contains the [key, value] pairs for each element in the Set object in insertion order - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The entries method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ entries(): IterableIterator<[T, T]>; /** * returns an ES6 iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError} Method not support bind. + * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ -- Gitee From d5a798266f88b05967132d6b204f83e2cb42f157 Mon Sep 17 00:00:00 2001 From: liu-ganlin Date: Sun, 9 Oct 2022 10:37:59 +0800 Subject: [PATCH 3/7] update container exception information Signed-off-by: liu-ganlin --- api/@ohos.util.ArrayList.d.ts | 74 +++++++++++++++--------------- api/@ohos.util.Deque.d.ts | 22 ++++----- api/@ohos.util.HashMap.d.ts | 36 +++++++-------- api/@ohos.util.HashSet.d.ts | 28 +++++------ api/@ohos.util.LightWeightMap.d.ts | 68 +++++++++++++-------------- api/@ohos.util.LightWeightSet.d.ts | 50 ++++++++++---------- api/@ohos.util.LinkedList.d.ts | 68 +++++++++++++-------------- api/@ohos.util.List.d.ts | 70 ++++++++++++++-------------- api/@ohos.util.PlainArray.d.ts | 64 +++++++++++++------------- api/@ohos.util.Queue.d.ts | 14 +++--- api/@ohos.util.Stack.d.ts | 18 ++++---- api/@ohos.util.TreeMap.d.ts | 46 +++++++++---------- api/@ohos.util.TreeSet.d.ts | 42 ++++++++--------- 13 files changed, 300 insertions(+), 300 deletions(-) diff --git a/api/@ohos.util.ArrayList.d.ts b/api/@ohos.util.ArrayList.d.ts index 3aca051352..547343ffbb 100644 --- a/api/@ohos.util.ArrayList.d.ts +++ b/api/@ohos.util.ArrayList.d.ts @@ -16,7 +16,7 @@ declare class ArrayList { /** * A constructor used to create a ArrayList object. - * @throws {NewTargetIsNullError}: The ArrayList's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The ArrayList's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -31,7 +31,7 @@ declare class ArrayList { * Appends the specified element to the end of this arraylist. * @param element to be appended to this arraylist * @returns the boolean type, returns true if the addition is successful, and returns false if it fails. - * @throws {ContainerBindError}: The add method cannot be bound. + * @throws { BusinessError } 10200011 - The add method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -42,9 +42,9 @@ declare class ArrayList { * any subsequent elements to the right (adds one to their index). * @param index index at which the specified element is to be inserted * @param element element to be inserted - * @throws {ContainerBindError}: The insert method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The insert method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -53,7 +53,7 @@ declare class ArrayList { * Check if arraylist contains the specified element * @param element element to be contained * @return the boolean type,if arraylist contains the specified element,return true,else return false - * @throws {ContainerBindError}: The has method cannot be bound. + * @throws { BusinessError } 10200011 - The has method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -63,7 +63,7 @@ declare class ArrayList { * in this arraylist, or -1 if this arraylist does not contain the element. * @param element element to be contained * @return the number type ,returns the lowest index such that or -1 if there is no such index. - * @throws {ContainerBindError}: The getIndexOf method cannot be bound. + * @throws { BusinessError } 10200011 - The getIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -73,9 +73,9 @@ declare class ArrayList { * delete the element, and move the index of all elements to the right of the element forward by one. * @param index the index in the arraylist * @return the T type ,returns undefined if arraylist is empty,If the index is - * @throws {ContainerBindError}: The removeByIndex method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The removeByIndex method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -86,7 +86,7 @@ declare class ArrayList { * unchanged. More formally, removes the element with the lowest index * @param element element to remove * @return the boolean type ,If there is no such element, return false - * @throws {ContainerBindError}: The remove method cannot be bound. + * @throws { BusinessError } 10200011 - The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -96,7 +96,7 @@ declare class ArrayList { * or -1 if the arraylist does not contain the element. * @param element element to find * @return the number type - * @throws {ContainerBindError}: The getLastIndexOf method cannot be bound. + * @throws { BusinessError } 10200011 - The getLastIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -105,11 +105,11 @@ declare class ArrayList { * Removes from this arraylist all of the elements whose index is between fromIndex,inclusive,and toIndex ,exclusive. * @param fromIndex The starting position of the index, containing the value at that index position * @param toIndex the end of the index, excluding the value at that index - * @throws {ContainerBindError}: The removeByRange method cannot be bound. - * @throws {RangeError}: The value of "fromIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [fromIndex] - * @throws {RangeError}: The value of "toIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [toIndex] - * @throws {TypeError}: The type of "fromIndex" must be number. Received value is: [fromIndex] - * @throws {TypeError}: The type of "toIndex" must be number. Received value is: [toIndex] + * @throws { BusinessError } 10200011 - The removeByRange method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "fromIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [fromIndex] + * @throws { BusinessError } 10200001 - The value of "toIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [toIndex] + * @throws { BusinessError } 401 - The type of "fromIndex" must be number. Received value is: [fromIndex] + * @throws { BusinessError } 401 - The type of "toIndex" must be number. Received value is: [toIndex] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -123,8 +123,8 @@ declare class ArrayList { * @param arrlist (Optional) The arraylist object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError}: The replaceAllElements method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The replaceAllElements method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -139,8 +139,8 @@ declare class ArrayList { * @param arrlist (Optional) The arraylist object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -155,8 +155,8 @@ declare class ArrayList { * @param firstValue (Optional) previous element * @param secondValue (Optional) next elements * If this parameter is empty, it will default to ASCII sorting - * @throws {ContainerBindError}: The sort method cannot be bound. - * @throws {TypeError}: The type of "comparator" must be callable. Received value is: [comparator] + * @throws { BusinessError } 10200011 - The sort method cannot be bound. + * @throws { BusinessError } 401 - The type of "comparator" must be callable. Received value is: [comparator] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -165,11 +165,11 @@ declare class ArrayList { * Returns a view of the portion of this arraylist between the specified fromIndex,inclusize,and toIndex,exclusive * @param fromIndex The starting position of the index, containing the value at that index position * @param toIndex the end of the index, excluding the value at that index - * @throws {ContainerBindError}: The subArrayList method cannot be bound. - * @throws {RangeError}: The value of "fromIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [fromIndex] - * @throws {RangeError}: The value of "toIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [toIndex] - * @throws {TypeError}: The type of "fromIndex" must be number. Received value is: [fromIndex] - * @throws {TypeError}: The type of "toIndex" must be number. Received value is: [toIndex] + * @throws { BusinessError } 10200011 - The subArrayList method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "fromIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [fromIndex] + * @throws { BusinessError } 10200001 - The value of "toIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [toIndex] + * @throws { BusinessError } 401 - The type of "fromIndex" must be number. Received value is: [fromIndex] + * @throws { BusinessError } 401 - The type of "toIndex" must be number. Received value is: [toIndex] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -177,7 +177,7 @@ declare class ArrayList { /** * Removes all of the elements from this arraylist.The arraylist will * be empty after this call returns.length becomes 0 - * @throws {ContainerBindError}: The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -185,7 +185,7 @@ declare class ArrayList { /** * Returns a shallow copy of this instance. (The elements themselves are not copied.) * @return this arraylist instance - * @throws {ContainerBindError}: The clone method cannot be bound. + * @throws { BusinessError } 10200011 - The clone method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -193,7 +193,7 @@ declare class ArrayList { /** * returns the capacity of this arraylist * @return the number type - * @throws {ContainerBindError}: The getCapacity method cannot be bound. + * @throws { BusinessError } 10200011 - The getCapacity method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -201,7 +201,7 @@ declare class ArrayList { /** * convert arraylist to array * @return the Array type - * @throws {ContainerBindError}: The convertToArray method cannot be bound. + * @throws { BusinessError } 10200011 - The convertToArray method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -209,7 +209,7 @@ declare class ArrayList { /** * Determine whether arraylist is empty and whether there is an element * @return the boolean type - * @throws {ContainerBindError}: The isEmpty method cannot be bound. + * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -217,22 +217,22 @@ declare class ArrayList { /** * If the newCapacity provided by the user is greater than or equal to length, * change the capacity of the arraylist to newCapacity, otherwise the capacity will not be changed - * @throws {ContainerBindError}: The increaseCapacityTo method cannot be bound. - * @throws {TypeError}: The type of "newCapacity" must be number. Received value is: [newCapacity] + * @throws { BusinessError } 10200011 - The increaseCapacityTo method cannot be bound. + * @throws { BusinessError } 401 - The type of "newCapacity" must be number. Received value is: [newCapacity] * @since 8 * @syscap SystemCapability.Utils.Lang */ increaseCapacityTo(newCapacity: number): void; /** * Limit the capacity to the current length - * @throws {ContainerBindError}: The trimToCurrentLength method cannot be bound. + * @throws { BusinessError } 10200011 - The trimToCurrentLength method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ trimToCurrentLength(): void; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.Deque.d.ts b/api/@ohos.util.Deque.d.ts index 11a71336ac..3b5e4f2fe0 100644 --- a/api/@ohos.util.Deque.d.ts +++ b/api/@ohos.util.Deque.d.ts @@ -16,7 +16,7 @@ declare class Deque { /** * A constructor used to create a Deque object. - * @throws {NewTargetIsNullError}: The Deque's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The Deque's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -30,7 +30,7 @@ declare class Deque { /** * Inserts an element into the deque header. * @param element to be appended to this deque - * @throws {ContainerBindError}: The insertFront method cannot be bound. + * @throws { BusinessError } 10200011 - The insertFront method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -38,7 +38,7 @@ declare class Deque { /** * Inserting an element at the end of a deque * @param element to be appended to this deque - * @throws {ContainerBindError}: The insertEnd method cannot be bound. + * @throws { BusinessError } 10200011 - The insertEnd method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -47,7 +47,7 @@ declare class Deque { * Check if deque contains the specified element * @param element element to be contained * @return the boolean type,if deque contains the specified element,return true,else return false - * @throws {ContainerBindError}: The has method cannot be bound. + * @throws { BusinessError } 10200011 - The has method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -55,7 +55,7 @@ declare class Deque { /** * Obtains the header element of a deque. * @return the T type - * @throws {ContainerBindError}: The getFirst method cannot be bound. + * @throws { BusinessError } 10200011 - The getFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -63,7 +63,7 @@ declare class Deque { /** * Obtains the end element of a deque. * @return the T type - * @throws {ContainerBindError}: The getLast method cannot be bound. + * @throws { BusinessError } 10200011 - The getLast method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -71,7 +71,7 @@ declare class Deque { /** * Obtains the header element of a deque and delete the element. * @return the T type - * @throws {ContainerBindError}: The popFirst method cannot be bound. + * @throws { BusinessError } 10200011 - The popFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -79,7 +79,7 @@ declare class Deque { /** * Obtains the end element of a deque and delete the element. * @return the T type - * @throws {ContainerBindError}: The popLast method cannot be bound. + * @throws { BusinessError } 10200011 - The popLast method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -92,8 +92,8 @@ declare class Deque { * @param deque (Optional) The deque object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] - * @throws {ContainerBindError}: The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -101,7 +101,7 @@ declare class Deque { thisArg?: Object): void; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.HashMap.d.ts b/api/@ohos.util.HashMap.d.ts index e90c74aba7..d89d330946 100644 --- a/api/@ohos.util.HashMap.d.ts +++ b/api/@ohos.util.HashMap.d.ts @@ -16,7 +16,7 @@ declare class HashMap { /** * A constructor used to create a HashMap object. - * @throws {NewTargetIsNullError}: The HashMap's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The HashMap's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -30,7 +30,7 @@ declare class HashMap { /** * Returns whether the Map object contains elements * @return the boolean type - * @throws {ContainerBindError}: The isEmpty method cannot be bound. + * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -39,7 +39,7 @@ declare class HashMap { * Returns whether a key is contained in this map * @param key need to determine whether to include the key * @return the boolean type - * @throws {ContainerBindError}: The hasKey method cannot be bound. + * @throws { BusinessError } 10200011 - The hasKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -48,7 +48,7 @@ declare class HashMap { * Returns whether a value is contained in this map * @param value need to determine whether to include the value * @return the boolean type - * @throws {ContainerBindError}: The hasValue method cannot be bound. + * @throws { BusinessError } 10200011 - The hasValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -57,7 +57,7 @@ declare class HashMap { * Returns a specified element in a Map object, or null if there is no corresponding element * @param key the index in HashMap * @return value or null - * @throws {ContainerBindError}: The get method cannot be bound. + * @throws { BusinessError } 10200011 - The get method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -65,8 +65,8 @@ declare class HashMap { /** * Adds all element groups in one map to another map * @param map the Map object to add members - * @throws {ContainerBindError}: The setAll method cannot be bound. - * @throws {TypeError}: The type of "map" must be HashMap. Received value is: [map] + * @throws { BusinessError } 10200011 - The setAll method cannot be bound. + * @throws { BusinessError } 401 - The type of "map" must be HashMap. Received value is: [map] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -76,8 +76,8 @@ declare class HashMap { * @param key Added or updated targets * @param value Added or updated value * @returns the map object after set - * @throws {ContainerBindError}: The set method cannot be bound. - * @throws {TypeError}: The type of "key" must be not null. Received value is: [key] + * @throws { BusinessError } 10200011 - The set method cannot be bound. + * @throws { BusinessError } 401 - The type of "key" must be not null. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -86,28 +86,28 @@ declare class HashMap { * Remove a specified element from a Map object * @param key Target to be deleted * @return Target mapped value - * @throws {ContainerBindError}: The remove method cannot be bound. + * @throws { BusinessError } 10200011 - The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ remove(key: K): V; /** * Clear all element groups in the map - * @throws {ContainerBindError}: The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ clear(): void; /** * Returns a new Iterator object that contains the keys contained in this map - * @throws {ContainerBindError}: The keys method cannot be bound. + * @throws { BusinessError } 10200011 - The keys method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ keys(): IterableIterator; /** * Returns a new Iterator object that contains the values contained in this map - * @throws {ContainerBindError}: The values method cannot be bound. + * @throws { BusinessError } 10200011 - The values method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -117,7 +117,7 @@ declare class HashMap { * @param key Updated targets * @param newValue Updated the target mapped value * @returns the boolean type(Is there a target pointed to by the key) - * @throws {ContainerBindError}: The replace method cannot be bound. + * @throws { BusinessError } 10200011 - The replace method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -125,8 +125,8 @@ declare class HashMap { /** * Executes the given callback function once for each real key in the map. * It does not perform functions on deleted keys - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -134,14 +134,14 @@ declare class HashMap { thisArg?: Object): void; /** * Returns a new Iterator object that contains the [key, value] pairs for each element in the Map object in insertion order - * @throws {ContainerBindError}: The entries method cannot be bound. + * @throws { BusinessError } 10200011 - The entries method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ entries(): IterableIterator<[K, V]>; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.HashSet.d.ts b/api/@ohos.util.HashSet.d.ts index 478bb206b5..8efc3a7d5b 100644 --- a/api/@ohos.util.HashSet.d.ts +++ b/api/@ohos.util.HashSet.d.ts @@ -16,7 +16,7 @@ declare class HashSet { /** * A constructor used to create a HashSet object. - * @throws {NewTargetIsNullError}: The HashSet's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The HashSet's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -30,7 +30,7 @@ declare class HashSet { /** * Returns whether the Set object contains elements * @return the boolean type - * @throws {ContainerBindError}: The isEmpty method cannot be bound. + * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -39,8 +39,8 @@ declare class HashSet { * Returns whether the Set object contain s the elements * @param value need to determine whether to include the element * @return the boolean type - * @throws {ContainerBindError}: The has method cannot be bound. - * @throws {TypeError}: The type of "value" must be not null. Received value is: [value] + * @throws { BusinessError } 10200011 - The has method cannot be bound. + * @throws { BusinessError } 401 - The type of "value" must be not null. Received value is: [value] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -49,8 +49,8 @@ declare class HashSet { * If the set does not contain the element, the specified element is added * @param value Added element * @returns the boolean type(Is there contain this element) - * @throws {ContainerBindError}: The add method cannot be bound. - * @throws {TypeError}: The type of "value" must be not null. Received value is: [value] + * @throws { BusinessError } 10200011 - The add method cannot be bound. + * @throws { BusinessError } 401 - The type of "value" must be not null. Received value is: [value] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -59,23 +59,23 @@ declare class HashSet { * Remove a specified element from a Set object * @param value Target to be deleted * @return the boolean type(Is there contain this element) - * @throws {ContainerBindError}: The remove method cannot be bound. - * @throws {TypeError}: The type of "value" must be not null. Received value is: [value] + * @throws { BusinessError } 10200011 - The remove method cannot be bound. + * @throws { BusinessError } 401 - The type of "value" must be not null. Received value is: [value] * @since 8 * @syscap SystemCapability.Utils.Lang */ remove(value: T): boolean; /** * Clears all element groups in a set - * @throws {ContainerBindError}: The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ clear(): void; /** * Executes a provided function once for each value in the Set object. - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -83,21 +83,21 @@ declare class HashSet { thisArg?: Object): void; /** * Returns a new Iterator object that contains the values contained in this set - * @throws {ContainerBindError}: The values method cannot be bound. + * @throws { BusinessError } 10200011 - The values method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ values(): IterableIterator; /** * Returns a new Iterator object that contains the [key, value] pairs for each element in the Set object in insertion order - * @throws {ContainerBindError}: The entries method cannot be bound. + * @throws { BusinessError } 10200011 - The entries method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ entries(): IterableIterator<[T, T]>; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.LightWeightMap.d.ts b/api/@ohos.util.LightWeightMap.d.ts index b542d80b50..5090b2ffcf 100644 --- a/api/@ohos.util.LightWeightMap.d.ts +++ b/api/@ohos.util.LightWeightMap.d.ts @@ -16,7 +16,7 @@ declare class LightWeightMap { /** * A constructor used to create a LightWeightMap object. - * @throws {NewTargetIsNullError}: The LightWeightMap's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The LightWeightMap's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -31,8 +31,8 @@ declare class LightWeightMap { * Returns whether this map has all the object in a specified map * @param map the Map object to compare * @return the boolean type - * @throws {TypeError}: The type of "map" must be LightWeightMap. Received value is: [map] - * @throws {ContainerBindError}: The hasAll method cannot be bound. + * @throws { BusinessError } 401 - The type of "map" must be LightWeightMap. Received value is: [map] + * @throws { BusinessError } 10200011 - The hasAll method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -41,7 +41,7 @@ declare class LightWeightMap { * Returns whether a key is contained in this map * @param key need to determine whether to include the key * @return the boolean type - * @throws {ContainerBindError}: The hasKey method cannot be bound. + * @throws { BusinessError } 10200011 - The hasKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -50,7 +50,7 @@ declare class LightWeightMap { * Returns whether a value is contained in this map * @param value need to determine whether to include the value * @return the boolean type - * @throws {ContainerBindError}: The hasValue method cannot be bound. + * @throws { BusinessError } 10200011 - The hasValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -59,15 +59,15 @@ declare class LightWeightMap { * Ensures that the capacity of an LightWeightMap container is greater than or equal to a apecified value, * and that the container has all the original objects after capacity expansion * @param minimumCapacity Minimum capacity to be reserved - * @throws {ContainerBindError}: The increaseCapacityTo method cannot be bound. - * @throws {TypeError}: The type of "minimumCapacity" must be number. Received value is: [minimumCapacity] + * @throws { BusinessError } 10200011 - The increaseCapacityTo method cannot be bound. + * @throws { BusinessError } 401 - The type of "minimumCapacity" must be number. Received value is: [minimumCapacity] * @since 8 * @syscap SystemCapability.Utils.Lang */ increaseCapacityTo(minimumCapacity: number): void; /** * Returns a new Iterator object that contains the [key, value] pairs for each element in the Map object in insertion order - * @throws {ContainerBindError}: The entries method cannot be bound. + * @throws { BusinessError } 10200011 - The entries method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -76,7 +76,7 @@ declare class LightWeightMap { * Returns the value to which the specified key is mapped, or undefined if this map contains no mapping for the key * @param key the index in LightWeightMap * @return value or undefined - * @throws {ContainerBindError}: The get method cannot be bound. + * @throws { BusinessError } 10200011 - The get method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -85,7 +85,7 @@ declare class LightWeightMap { * Obtains the index of the key equal to a specified key in an LightWeightMap container * @param key Looking for goals * @return Subscript corresponding to target - * @throws {ContainerBindError}: The getIndexOfKey method cannot be bound. + * @throws { BusinessError } 10200011 - The getIndexOfKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -94,7 +94,7 @@ declare class LightWeightMap { * Obtains the index of the value equal to a specified value in an LightWeightMap container * @param value Looking for goals * @return Subscript corresponding to target - * @throws {ContainerBindError}: The getIndexOfValue method cannot be bound. + * @throws { BusinessError } 10200011 - The getIndexOfValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -102,7 +102,7 @@ declare class LightWeightMap { /** * Returns whether the Map object contains elements * @return the boolean type - * @throws {ContainerBindError}: The isEmpty method cannot be bound. + * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -111,16 +111,16 @@ declare class LightWeightMap { * Obtains the key at the loaction identified by index in an LightWeightMap container * @param index Target subscript for search * @return the key of key-value pairs - * @throws {ContainerBindError}: The getKeyAt method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The getKeyAt method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ getKeyAt(index: number): K; /** * Obtains a ES6 iterator that contains all the keys of an LightWeightMap container - * @throws {ContainerBindError}: The keys method cannot be bound. + * @throws { BusinessError } 10200011 - The keys method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -128,8 +128,8 @@ declare class LightWeightMap { /** * Adds all element groups in one map to another map * @param map the Map object to add members - * @throws {ContainerBindError}: The setAll method cannot be bound. - * @throws {TypeError}: The type of "map" must be LightWeightMap. Received value is: [map] + * @throws { BusinessError } 10200011 - The setAll method cannot be bound. + * @throws { BusinessError } 401 - The type of "map" must be LightWeightMap. Received value is: [map] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -139,7 +139,7 @@ declare class LightWeightMap { * @param key Added or updated targets * @param value Added or updated value * @returns the map object after set - * @throws {ContainerBindError}: The set method cannot be bound. + * @throws { BusinessError } 10200011 - The set method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -148,7 +148,7 @@ declare class LightWeightMap { * Remove the mapping for this key from this map if present * @param key Target to be deleted * @return Target mapped value - * @throws {ContainerBindError}: The remove method cannot be bound. + * @throws { BusinessError } 10200011 - The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -157,8 +157,8 @@ declare class LightWeightMap { * Deletes a key-value pair at the loaction identified by index from an LightWeightMap container * @param index Target subscript for search * @return the boolean type(Is there a delete value) - * @throws {ContainerBindError}: The removeAt method cannot be bound. - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The removeAt method cannot be bound. + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -166,7 +166,7 @@ declare class LightWeightMap { /** * Removes all of the mapping from this map * The map will be empty after this call returns - * @throws {ContainerBindError}: The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -176,9 +176,9 @@ declare class LightWeightMap { * @param index Target subscript for search * @param value Updated the target mapped value * @return the boolean type(Is there a value corresponding to the subscript) - * @throws {ContainerBindError}: The setValueAt method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The setValueAt method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -186,8 +186,8 @@ declare class LightWeightMap { /** * Executes the given callback function once for each real key in the map. * It does not perform functions on deleted keys - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -195,14 +195,14 @@ declare class LightWeightMap { thisArg?: Object): void; /** * returns an ES6 iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ [Symbol.iterator](): IterableIterator<[K, V]>; /** * Obtains a string that contains all the keys and values in an LightWeightMap container - * @throws {ContainerBindError}: The toString method cannot be bound. + * @throws { BusinessError } 10200011 - The toString method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -211,16 +211,16 @@ declare class LightWeightMap { * Obtains the value identified by index in an LightWeightMap container * @param index Target subscript for search * @return the value of key-value pairs - * @throws {ContainerBindError}: The getValueAt method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The getValueAt method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ getValueAt(index: number): V; /** * Returns an iterator of the values contained in this map - * @throws {ContainerBindError}: The values method cannot be bound. + * @throws { BusinessError } 10200011 - The values method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.LightWeightSet.d.ts b/api/@ohos.util.LightWeightSet.d.ts index 7c8dc838b0..1ea28f53e0 100644 --- a/api/@ohos.util.LightWeightSet.d.ts +++ b/api/@ohos.util.LightWeightSet.d.ts @@ -16,7 +16,7 @@ declare class LightWeightSet { /** * A constructor used to create a LightWeightSet object. - * @throws {NewTargetIsNullError}: The LightWeightSet's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The LightWeightSet's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -31,7 +31,7 @@ declare class LightWeightSet { * If the set does not contain the element, the specified element is added * @param value Added element * @returns the boolean type(Is there contain this element) - * @throws {ContainerBindError}: The add method cannot be bound. + * @throws { BusinessError } 10200011 - The add method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -40,8 +40,8 @@ declare class LightWeightSet { * Adds all the objects in a specified LightWeightSet container to the current LightWeightSet container * @param set the Set object to provide the added element * @returns the boolean type(Is there any new data added successfully) - * @throws {ContainerBindError}: The addAll method cannot be bound. - * @throws {TypeError}: The type of "set" must be LightWeightSet. Received value is: [set] + * @throws { BusinessError } 10200011 - The addAll method cannot be bound. + * @throws { BusinessError } 401 - The type of "set" must be LightWeightSet. Received value is: [set] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -50,8 +50,8 @@ declare class LightWeightSet { * Returns whether this set has all the object in a specified set * @param set the Set object to compare * @return the boolean type - * @throws {ContainerBindError}: The hasAll method cannot be bound. - * @throws {TypeError}: The type of "set" must be LightWeightSet. Received value is: [set] + * @throws { BusinessError } 10200011 - The hasAll method cannot be bound. + * @throws { BusinessError } 401 - The type of "set" must be LightWeightSet. Received value is: [set] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -60,7 +60,7 @@ declare class LightWeightSet { * Checks whether an LightWeightSet container has a specified key * @param key need to determine whether to include the key * @return the boolean type - * @throws {ContainerBindError}: The has method cannot be bound. + * @throws { BusinessError } 10200011 - The has method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -69,7 +69,7 @@ declare class LightWeightSet { * Checks whether an the objects of an LightWeighSet containeer are of the same type as a specified Object LightWeightSet * @param obj need to determine whether to include the obj * @return the boolean type - * @throws {ContainerBindError}: The equal method cannot be bound. + * @throws { BusinessError } 10200011 - The equal method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -78,9 +78,9 @@ declare class LightWeightSet { * Ensures that the capacity of an LightWeightSet container is greater than or equal to a apecified value, * and that the container has all the original objects after capacity expansion * @param minimumCapacity Minimum capacity to be reserved - * @throws {ContainerBindError}: The increaseCapacityTo method cannot be bound. - * @throws {TypeError}: The type of "minimumCapacity" must be number. Received value is: [minimumCapacity] - * @throws {RangeError}: The value of "minimumCapacity" is out of range. It must be > [currentCapacity]. Received value is: [minimumCapacity] + * @throws { BusinessError } 10200011 - The increaseCapacityTo method cannot be bound. + * @throws { BusinessError } 401 - The type of "minimumCapacity" must be number. Received value is: [minimumCapacity] + * @throws { BusinessError } 10200001 - The value of "minimumCapacity" is out of range. It must be > [currentCapacity]. Received value is: [minimumCapacity] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -89,7 +89,7 @@ declare class LightWeightSet { * Obtains the index of s key of a specified Object type in an LightWeightSet container * @param key Looking for goals * @return Subscript corresponding to target - * @throws {ContainerBindError}: The getIndexOf method cannot be bound. + * @throws { BusinessError } 10200011 - The getIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -98,7 +98,7 @@ declare class LightWeightSet { * Deletes an object of a specified Object type from an LightWeightSet container * @param key Target to be deleted * @return Target element - * @throws {ContainerBindError}: The remove method cannot be bound. + * @throws { BusinessError } 10200011 - The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -107,8 +107,8 @@ declare class LightWeightSet { * Deletes an object at the loaction identified by index from an LightWeightSet container * @param index Target subscript for search * @return the boolean type(Is there a delete value) - * @throws {ContainerBindError}: The removeAt method cannot be bound. - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The removeAt method cannot be bound. + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -116,7 +116,7 @@ declare class LightWeightSet { /** * Removes all of the mapping from this map * The map will be empty after this call returns - * @throws {ContainerBindError}: The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -124,8 +124,8 @@ declare class LightWeightSet { /** * Executes the given callback function once for each real key in the map. * It does not perform functions on deleted keys - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -133,7 +133,7 @@ declare class LightWeightSet { thisArg?: Object): void; /** * returns an ES6 iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -146,7 +146,7 @@ declare class LightWeightSet { toString(): String; /** * Obtains an Array that contains all the objects of an LightWeightSet container. - * @throws {ContainerBindError}: The toArray method cannot be bound. + * @throws { BusinessError } 10200011 - The toArray method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -155,29 +155,29 @@ declare class LightWeightSet { * Obtains the object at the location identified by index in an LightWeightSet container * @param index Target subscript for search * @return the value of key-value pairs - * @throws {ContainerBindError}: The getValueAt method cannot be bound. - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The getValueAt method cannot be bound. + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ getValueAt(index: number): T; /** * Returns a ES6 iterator of the values contained in this Set - * @throws {ContainerBindError}: The values method cannot be bound. + * @throws { BusinessError } 10200011 - The values method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ values(): IterableIterator; /** * Returns a Iterator object that contains the [key, value] pairs for each element in the Set object in insertion order - * @throws {ContainerBindError}: The entries method cannot be bound. + * @throws { BusinessError } 10200011 - The entries method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ entries(): IterableIterator<[T, T]>; /** * Returns whether the set object contains elements - * @throws {ContainerBindError}: The isEmpty method cannot be bound. + * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.LinkedList.d.ts b/api/@ohos.util.LinkedList.d.ts index e6166e5a26..6c6bd9df94 100644 --- a/api/@ohos.util.LinkedList.d.ts +++ b/api/@ohos.util.LinkedList.d.ts @@ -16,7 +16,7 @@ declare class LinkedList { /** * A constructor used to create a LinkedList object. - * @throws {NewTargetIsNullError}: The LinkedList's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The LinkedList's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -31,7 +31,7 @@ declare class LinkedList { * Appends the specified element to the end of this linkedlist. * @param element to be appended to this linkedlist * @returns the boolean type, returns true if the addition is successful, and returns false if it fails. - * @throws {ContainerBindError}: The add method cannot be bound. + * @throws { BusinessError } 10200011 - The add method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -40,9 +40,9 @@ declare class LinkedList { * Inserts the specified element at the specified position in this linkedlist. * @param index index at which the specified element is to be inserted * @param element element to be inserted - * @throws {ContainerBindError}: The insert method cannot be bound. - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length]. Received value is: [index] + * @throws { BusinessError } 10200011 - The insert method cannot be bound. + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length]. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -52,8 +52,8 @@ declare class LinkedList { * or returns undefined if this linkedlist is empty * @param index specified position * @return the T type - * @throws {ContainerBindError}: The get method cannot be bound. - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The get method cannot be bound. + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -61,7 +61,7 @@ declare class LinkedList { /** * Inserts the specified element at the beginning of this LinkedList. * @param element the element to add - * @throws {ContainerBindError}: The addFirst method cannot be bound. + * @throws { BusinessError } 10200011 - The addFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -69,8 +69,8 @@ declare class LinkedList { /** * Retrieves and removes the head (first element) of this linkedlist. * @return the head of this list - * @throws {ContainerBindError}: The removeFirst method cannot be bound. - * @throws {ContainerIsEmptyError} Container is Empty. + * @throws { BusinessError } 10200011 - The removeFirst method cannot be bound. + * @throws { BusinessError } 10200010 - Container is Empty. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -78,8 +78,8 @@ declare class LinkedList { /** * Removes and returns the last element from this linkedlist. * @return the head of this list - * @throws {ContainerBindError}: The removeLast method cannot be bound. - * @throws {ContainerIsEmptyError} Container is Empty. + * @throws { BusinessError } 10200011 - The removeLast method cannot be bound. + * @throws { BusinessError } 10200010 - Container is Empty. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -88,7 +88,7 @@ declare class LinkedList { * Check if linkedlist contains the specified element * @param element element to be contained * @return the boolean type,if linkedList contains the specified element,return true,else return false - * @throws {ContainerBindError}: The has method cannot be bound. + * @throws { BusinessError } 10200011 - The has method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -98,7 +98,7 @@ declare class LinkedList { * in this linkedlist, or -1 if this linkedlist does not contain the element. * @param element element to be contained * @return the number type ,returns the lowest index such that or -1 if there is no such index. - * @throws {ContainerBindError}: The getIndexOf method cannot be bound. + * @throws { BusinessError } 10200011 - The getIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -108,9 +108,9 @@ declare class LinkedList { * @param index the index in the linkedlist * @return the T type ,returns undefined if linkedlist is empty,If the index is * out of bounds (greater than or equal to length or less than 0), throw an exception - * @throws {ContainerBindError}: The removeByIndex method cannot be bound. - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 10200011 - The removeByIndex method cannot be bound. + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -121,7 +121,7 @@ declare class LinkedList { * unchanged. More formally, removes the element with the lowest index * @param element element to remove * @return the boolean type ,If there is no such element, return false - * @throws {ContainerBindError}: The remove method cannot be bound. + * @throws { BusinessError } 10200011 - The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -132,8 +132,8 @@ declare class LinkedList { * unchanged. More formally, removes the element with the lowest index * @param element element to remove * @return the boolean type ,If there is no such element, return false - * @throws {ContainerBindError}: The removeFirstFound method cannot be bound. - * @throws {ContainerIsEmptyError} Container is Empty. + * @throws { BusinessError } 10200011 - The removeFirstFound method cannot be bound. + * @throws { BusinessError } 10200010 - Container is Empty. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -144,8 +144,8 @@ declare class LinkedList { * unchanged. More formally, removes the element with the lowest index * @param element element to remove * @return the boolean type ,If there is no such element, return false - * @throws {ContainerBindError}: The removeLastFound method cannot be bound. - * @throws {ContainerIsEmptyError} Container is Empty. + * @throws { BusinessError } 10200011 - The removeLastFound method cannot be bound. + * @throws { BusinessError } 10200010 - Container is Empty. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -155,7 +155,7 @@ declare class LinkedList { * or -1 if the linkedlist does not contain the element. * @param element element to find * @return the number type - * @throws {ContainerBindError}: The getLastIndexOf method cannot be bound. + * @throws { BusinessError } 10200011 - The getLastIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -164,7 +164,7 @@ declare class LinkedList { * Returns the first element (the item at index 0) of this linkedlist. * or returns undefined if linkedlist is empty * @return the T type ,returns undefined if linkedList is empty - * @throws {ContainerBindError}: The getFirst method cannot be bound. + * @throws { BusinessError } 10200011 - The getFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -173,7 +173,7 @@ declare class LinkedList { * Returns the Last element (the item at index length-1) of this linkedlist. * or returns undefined if linkedlist is empty * @return the T type ,returns undefined if linkedList is empty - * @throws {ContainerBindError}: The getLast method cannot be bound. + * @throws { BusinessError } 10200011 - The getLast method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -183,9 +183,9 @@ declare class LinkedList { * @param element replaced element * @param index index to find * @return the T type ,returns undefined if linkedList is empty - * @throws {ContainerBindError}: The set method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The set method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -199,8 +199,8 @@ declare class LinkedList { * @param LinkedList (Optional) The linkedlist object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -209,7 +209,7 @@ declare class LinkedList { /** * Removes all of the elements from this linkedlist.The linkedlist will * be empty after this call returns.length becomes 0 - * @throws {ContainerBindError}: The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -217,7 +217,7 @@ declare class LinkedList { /** * Returns a shallow copy of this instance. (The elements themselves are not copied.) * @return this linkedlist instance - * @throws {ContainerBindError}: The clone method cannot be bound. + * @throws { BusinessError } 10200011 - The clone method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -225,14 +225,14 @@ declare class LinkedList { /** * convert linkedlist to array * @return the Array type - * @throws {ContainerBindError}: The convertToArray method cannot be bound. + * @throws { BusinessError } 10200011 - The convertToArray method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ convertToArray(): Array; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.List.d.ts b/api/@ohos.util.List.d.ts index 24822675c3..ef439cb8e6 100644 --- a/api/@ohos.util.List.d.ts +++ b/api/@ohos.util.List.d.ts @@ -16,7 +16,7 @@ declare class List { /** * A constructor used to create a List object. - * @throws {NewTargetIsNullError}: The List's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The List's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -31,7 +31,7 @@ declare class List { * Appends the specified element to the end of this list. * @param element to be appended to this list * @returns the boolean type, returns true if the addition is successful, and returns false if it fails. - * @throws {ContainerBindError}: The add method cannot be bound. + * @throws { BusinessError } 10200011 - The add method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -40,9 +40,9 @@ declare class List { * Inserts the specified element at the specified position in this list. * @param index index at which the specified element is to be inserted * @param element element to be inserted - * @throws {ContainerBindError}: The insert method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The insert method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -52,8 +52,8 @@ declare class List { * or returns undefined if this list is empty * @param index specified position * @return the T type - * @throws {ContainerBindError}: The get method cannot be bound. - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The get method cannot be bound. + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -62,7 +62,7 @@ declare class List { * Check if list contains the specified element * @param element element to be contained * @return the boolean type,if list contains the specified element,return true,else return false - * @throws {ContainerBindError}: The has method cannot be bound. + * @throws { BusinessError } 10200011 - The has method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -72,7 +72,7 @@ declare class List { * in this list, or -1 if this list does not contain the element. * @param element element to be contained * @return the number type ,returns the lowest index such that or -1 if there is no such index. - * @throws {ContainerBindError}: The getIndexOf method cannot be bound. + * @throws { BusinessError } 10200011 - The getIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -82,9 +82,9 @@ declare class List { * @param index the index in the list * @return the T type ,returns undefined if list is empty,If the index is * out of bounds (greater than or equal to length or less than 0), throw an exception - * @throws {ContainerBindError}: The removeByIndex method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The removeByIndex method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -95,7 +95,7 @@ declare class List { * unchanged. More formally, removes the element with the lowest index * @param element element to remove * @return the boolean type ,If there is no such element, return false - * @throws {ContainerBindError}: The remove method cannot be bound. + * @throws { BusinessError } 10200011 - The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -105,7 +105,7 @@ declare class List { * or -1 if the list does not contain the element. * @param element element to find * @return the number type - * @throws {ContainerBindError}: The getLastIndexOf method cannot be bound. + * @throws { BusinessError } 10200011 - The getLastIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -114,7 +114,7 @@ declare class List { * Returns the first element (the item at index 0) of this list. * or returns undefined if list is empty * @return the T type ,returns undefined if list is empty - * @throws {ContainerBindError}: The getFirst method cannot be bound. + * @throws { BusinessError } 10200011 - The getFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -123,7 +123,7 @@ declare class List { * Returns the Last element (the item at index length-1) of this list. * or returns undefined if list is empty * @return the T type ,returns undefined if list is empty - * @throws {ContainerBindError}: The getLast method cannot be bound. + * @throws { BusinessError } 10200011 - The getLast method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -133,9 +133,9 @@ declare class List { * @param element replaced element * @param index index to find * @return the T type - * @throws {ContainerBindError}: The set method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The set method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -145,7 +145,7 @@ declare class List { * return true, otherwise return false. * @param obj Compare objects * @return the boolean type - * @throws {ContainerBindError}: The equal method cannot be bound. + * @throws { BusinessError } 10200011 - The equal method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -159,8 +159,8 @@ declare class List { * @param List (Optional) The list object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -174,8 +174,8 @@ declare class List { * minus firstValue, it returns an list sorted in descending order; * @param firstValue (Optional) previous element * @param secondValue (Optional) next elements - * @throws {TypeError}: The type of "comparator" must be callable. Received value is: [comparator] - * @throws {ContainerBindError}: The sort method cannot be bound. + * @throws { BusinessError } 401 - The type of "comparator" must be callable. Received value is: [comparator] + * @throws { BusinessError } 10200011 - The sort method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -183,7 +183,7 @@ declare class List { /** * Removes all of the elements from this list.The list will * be empty after this call returns.length becomes 0 - * @throws {ContainerBindError}: The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -192,11 +192,11 @@ declare class List { * Returns a view of the portion of this list between the specified fromIndex,inclusize,and toIndex,exclusive * @param fromIndex The starting position of the index, containing the value at that index position * @param toIndex the end of the index, excluding the value at that index - * @throws {ContainerBindError}: The getSubList method cannot be bound. - * @throws {RangeError}: The value of "fromIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [fromIndex] - * @throws {RangeError}: The value of "toIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [toIndex] - * @throws {TypeError}: The type of "fromIndex" must be number. Received value is: [fromIndex] - * @throws {TypeError}: The type of "toIndex" must be number. Received value is: [toIndex] + * @throws { BusinessError } 10200011 - The getSubList method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "fromIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [fromIndex] + * @throws { BusinessError } 10200001 - The value of "toIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [toIndex] + * @throws { BusinessError } 401 - The type of "fromIndex" must be number. Received value is: [fromIndex] + * @throws { BusinessError } 401 - The type of "toIndex" must be number. Received value is: [toIndex] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -210,8 +210,8 @@ declare class List { * @param list (Optional) The list object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError}: The replaceAllElements method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The replaceAllElements method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -220,7 +220,7 @@ declare class List { /** * convert list to array * @return the Array type - * @throws {ContainerBindError}: The convertToArray method cannot be bound. + * @throws { BusinessError } 10200011 - The convertToArray method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -228,14 +228,14 @@ declare class List { /** * Determine whether list is empty and whether there is an element * @return the boolean type - * @throws {ContainerBindError}: The isEmpty method cannot be bound. + * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ isEmpty(): boolean; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.PlainArray.d.ts b/api/@ohos.util.PlainArray.d.ts index cc9e9622a4..bc4d455752 100644 --- a/api/@ohos.util.PlainArray.d.ts +++ b/api/@ohos.util.PlainArray.d.ts @@ -16,7 +16,7 @@ declare class PlainArray { /** * A constructor used to create a PlainArray object. - * @throws {NewTargetIsNullError}: The PlainArray's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The PlainArray's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -31,22 +31,22 @@ declare class PlainArray { * Appends a key-value pair to PlainArray * @param key Added the key of key-value * @param value Added the value of key-value - * @throws {ContainerBindError}: The add method cannot be bound. - * @throws {TypeError}: The type of "key" must be number. Received value is: [key] + * @throws { BusinessError } 10200011 - The add method cannot be bound. + * @throws { BusinessError } 401 - The type of "key" must be number. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ add(key: number, value: T): void; /** * Clears the current PlainArray object - * @throws {ContainerBindError}: The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ clear(): void; /** * Obtains a clone of the current PlainArray object - * @throws {ContainerBindError}: The clone method cannot be bound. + * @throws { BusinessError } 10200011 - The clone method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -55,8 +55,8 @@ declare class PlainArray { * Checks whether the current PlainArray object contains the specified key * @param key need to determine whether to include the key * @return the boolean type - * @throws {ContainerBindError}: The has method cannot be bound. - * @throws {TypeError}: The type of "key" must be number. Received value is: [key] + * @throws { BusinessError } 10200011 - The has method cannot be bound. + * @throws { BusinessError } 401 - The type of "key" must be number. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -65,8 +65,8 @@ declare class PlainArray { * Queries the value associated with the specified key * @param key Looking for goals * @return the value of key-value pairs - * @throws {ContainerBindError}: The get method cannot be bound. - * @throws {TypeError}: The type of "key" must be number. Received value is: [key] + * @throws { BusinessError } 10200011 - The get method cannot be bound. + * @throws { BusinessError } 401 - The type of "key" must be number. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -75,8 +75,8 @@ declare class PlainArray { * Queries the index for a specified key * @param key Looking for goals * @return Subscript corresponding to target - * @throws {ContainerBindError}: The getIndexOfKey method cannot be bound. - * @throws {TypeError}: The type of "key" must be number. Received value is: [key] + * @throws { BusinessError } 10200011 - The getIndexOfKey method cannot be bound. + * @throws { BusinessError } 401 - The type of "key" must be number. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -85,7 +85,7 @@ declare class PlainArray { * Queries the index for a specified value * @param value Looking for goals * @return Subscript corresponding to target - * @throws {ContainerBindError}: The getIndexOfValue method cannot be bound. + * @throws { BusinessError } 10200011 - The getIndexOfValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -93,7 +93,7 @@ declare class PlainArray { /** * Checks whether the current PlainArray object is empty * @return the boolean type - * @throws {ContainerBindError}: The isEmpty method cannot be bound. + * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -102,8 +102,8 @@ declare class PlainArray { * Queries the key at a specified index * @param index Target subscript for search * @return the key of key-value pairs - * @throws {ContainerBindError}: The getKeyAt method cannot be bound. - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The getKeyAt method cannot be bound. + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -112,8 +112,8 @@ declare class PlainArray { * Remove the key-value pair based on a specified key if it exists and return the value * @param key Target to be deleted * @return Target mapped value - * @throws {ContainerBindError}: The remove method cannot be bound. - * @throws {TypeError}: The type of "key" must be number. Received value is: [key] + * @throws { BusinessError } 10200011 - The remove method cannot be bound. + * @throws { BusinessError } 401 - The type of "key" must be number. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -122,8 +122,8 @@ declare class PlainArray { * Remove the key-value pair at a specified index if it exists and return the value * @param index Target subscript for search * @return the T type - * @throws {ContainerBindError}: The removeAt method cannot be bound. - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The removeAt method cannot be bound. + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -133,9 +133,9 @@ declare class PlainArray { * @param index remove start index * @param size Expected deletion quantity * @return Actual deleted quantity - * @throws {ContainerBindError}: The removeRangeFrom method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The removeRangeFrom method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -144,16 +144,16 @@ declare class PlainArray { * Update value on specified index * @param index Target subscript for search * @param value Updated the target mapped value - * @throws {ContainerBindError}: The setValueAt method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The setValueAt method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ setValueAt(index: number, value: T): void; /** * Obtains the string representation of the PlainArray object - * @throws {ContainerBindError}: The toString method cannot be bound. + * @throws { BusinessError } 10200011 - The toString method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -162,17 +162,17 @@ declare class PlainArray { * Queries the value at a specified index * @param index Target subscript for search * @return the value of key-value pairs - * @throws {ContainerBindError}: The getValueAt method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The getValueAt method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ getValueAt(index: number): T; /** * Executes a provided function once for each value in the PlainArray object. - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -180,7 +180,7 @@ declare class PlainArray { thisArg?: Object): void; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.Queue.d.ts b/api/@ohos.util.Queue.d.ts index 4711a01724..a605ba12f6 100644 --- a/api/@ohos.util.Queue.d.ts +++ b/api/@ohos.util.Queue.d.ts @@ -16,7 +16,7 @@ declare class Queue { /** * A constructor used to create a Queue object. - * @throws {NewTargetIsNullError}: The Queue's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The Queue's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -32,7 +32,7 @@ declare class Queue { * so immediately without violating capacity restrictions. * @param element to be appended to this queue * @return the boolean type - * @throws {ContainerBindError}: The add method cannot be bound. + * @throws { BusinessError } 10200011 - The add method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -40,7 +40,7 @@ declare class Queue { /** * Obtains the header element of a queue. * @return the T type - * @throws {ContainerBindError}: The getFirst method cannot be bound. + * @throws { BusinessError } 10200011 - The getFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -48,7 +48,7 @@ declare class Queue { /** * Retrieves and removes the head of this queue * @return the T type - * @throws {ContainerBindError}: The pop method cannot be bound. + * @throws { BusinessError } 10200011 - The pop method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -62,8 +62,8 @@ declare class Queue { * @param Queue (Optional) The queue object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -71,7 +71,7 @@ declare class Queue { thisArg?: Object): void; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.Stack.d.ts b/api/@ohos.util.Stack.d.ts index 3539b676be..811d1e10fe 100644 --- a/api/@ohos.util.Stack.d.ts +++ b/api/@ohos.util.Stack.d.ts @@ -16,7 +16,7 @@ declare class Stack { /** * A constructor used to create a Stack object. - * @throws {NewTargetIsNullError}: The Stack's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The Stack's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -30,7 +30,7 @@ declare class Stack { /** * Tests if this stack is empty * @return the boolean type - * @throws {ContainerBindError}: The isEmpty method cannot be bound. + * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -39,7 +39,7 @@ declare class Stack { * Looks at the object at the top of this stack without removing it from the stack * Return undfined if this stack is empty * @return the top value or undefined - * @throws {ContainerBindError}: The peek method cannot be bound. + * @throws { BusinessError } 10200011 - The peek method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -48,7 +48,7 @@ declare class Stack { * Removes the object at the top of this stack and returns that object as the value of this function * an exception if the stack is empty * @returns Stack top value or undefined - * @throws {ContainerBindError}: The pop method cannot be bound. + * @throws { BusinessError } 10200011 - The pop method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -57,7 +57,7 @@ declare class Stack { * Pushes an item onto the top of this stack * @param item to be appended to this Stack * @returns the T type - * @throws {ContainerBindError}: The push method cannot be bound. + * @throws { BusinessError } 10200011 - The push method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -66,7 +66,7 @@ declare class Stack { * Returns the 1-based position where an object is on this stack * @param element Target to be deleted * @returns the T type,If there is no such element, return -1 - * @throws {ContainerBindError}: The locate method cannot be bound. + * @throws { BusinessError } 10200011 - The locate method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -80,8 +80,8 @@ declare class Stack { * @param stack (Optional) The Stack object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -89,7 +89,7 @@ declare class Stack { thisArg?: Object): void; /** * returns an ES6 iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.TreeMap.d.ts b/api/@ohos.util.TreeMap.d.ts index 9bbc58ca6f..aebdd248c6 100644 --- a/api/@ohos.util.TreeMap.d.ts +++ b/api/@ohos.util.TreeMap.d.ts @@ -20,8 +20,8 @@ declare class TreeMap { * @param comparator (Optional) User-defined comparison functions * @param firstValue (Optional) previous element * @param secondValue (Optional) next element - * @throws {NewTargetIsNullError}: The TreeMap's constructor cannot be directly invoked. - * @throws {TypeError}: The type of "comparator" must be callable. Received value is: [comparator] + * @throws { BusinessError } 10200012 - The TreeMap's constructor cannot be directly invoked. + * @throws { BusinessError } 401 - The type of "comparator" must be callable. Received value is: [comparator] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -35,7 +35,7 @@ declare class TreeMap { /** * Returns whether the Map object contains elements * @return the boolean type - * @throws {ContainerBindError}: The isEmpty method cannot be bound. + * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -44,7 +44,7 @@ declare class TreeMap { * Returns whether a key is contained in this map * @param key need to determine whether to include the key * @return the boolean type - * @throws {ContainerBindError}: The hasKey method cannot be bound. + * @throws { BusinessError } 10200011 - The hasKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -53,7 +53,7 @@ declare class TreeMap { * Returns whether a value is contained in this map * @param value need to determine whether to include the value * @return the boolean type - * @throws {ContainerBindError}: The hasValue method cannot be bound. + * @throws { BusinessError } 10200011 - The hasValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -62,7 +62,7 @@ declare class TreeMap { * Returns a specified element in a Map object, or null if there is no corresponding element * @param key the index in TreeMap * @return value or null - * @throws {ContainerBindError}: The get method cannot be bound. + * @throws { BusinessError } 10200011 - The get method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -71,7 +71,7 @@ declare class TreeMap { * Obtains the first sorted key in the treemap. * Or returns undefined if tree map is empty * @return value or undefined - * @throws {ContainerBindError}: The getFirstKey method cannot be bound. + * @throws { BusinessError } 10200011 - The getFirstKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -80,7 +80,7 @@ declare class TreeMap { * Obtains the last sorted key in the treemap. * Or returns undefined if tree map is empty * @return value or undefined - * @throws {ContainerBindError}: The getLastKey method cannot be bound. + * @throws { BusinessError } 10200011 - The getLastKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -88,8 +88,8 @@ declare class TreeMap { /** * Adds all element groups in one map to another map * @param map the Map object to add members - * @throws {ContainerBindError}: The setAll method cannot be bound. - * @throws {TypeError}: The type of "map" must be TreeMap. Received value is: [map] + * @throws { BusinessError } 10200011 - The setAll method cannot be bound. + * @throws { BusinessError } 401 - The type of "map" must be TreeMap. Received value is: [map] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -99,8 +99,8 @@ declare class TreeMap { * @param key Added or updated targets * @param value Added or updated value * @returns the map object after set - * @throws {ContainerBindError}: The set method cannot be bound. - * @throws {TypeError}: The type of "key" must be not null. Received value is: [key] + * @throws { BusinessError } 10200011 - The set method cannot be bound. + * @throws { BusinessError } 401 - The type of "key" must be not null. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -108,7 +108,7 @@ declare class TreeMap { /** * Remove a specified element from a Map object * @param key Target to be deleted - * @throws {ContainerBindError}: The remove method cannot be bound. + * @throws { BusinessError } 10200011 - The remove method cannot be bound. * @return Target mapped value * @since 8 * @syscap SystemCapability.Utils.Lang @@ -116,7 +116,7 @@ declare class TreeMap { remove(key: K): V; /** * Clear all element groups in the map - * @throws {ContainerBindError}: The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -125,7 +125,7 @@ declare class TreeMap { * Returns the greatest element smaller than or equal to the specified key * if the key does not exist, undefied is returned * @param key Objective of comparison - * @throws {ContainerBindError}: The getLowerKey method cannot be bound. + * @throws { BusinessError } 10200011 - The getLowerKey method cannot be bound. * @return key or undefined * @since 8 * @syscap SystemCapability.Utils.Lang @@ -136,21 +136,21 @@ declare class TreeMap { * if the key does not exist, undefied is returned * @param key Objective of comparison * @return key or undefined - * @throws {ContainerBindError}: The getHigherKey method cannot be bound. + * @throws { BusinessError } 10200011 - The getHigherKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ getHigherKey(key: K): K; /** * Returns a new Iterator object that contains the keys contained in this map - * @throws {ContainerBindError}: The keys method cannot be bound. + * @throws { BusinessError } 10200011 - The keys method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ keys(): IterableIterator; /** * Returns a new Iterator object that contains the values contained in this map - * @throws {ContainerBindError}: The values method cannot be bound. + * @throws { BusinessError } 10200011 - The values method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -160,7 +160,7 @@ declare class TreeMap { * @param key Updated targets * @param value Updated the target mapped value * @returns the boolean type(Is there a target pointed to by the key) - * @throws {ContainerBindError}: The replace method cannot be bound. + * @throws { BusinessError } 10200011 - The replace method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -168,8 +168,8 @@ declare class TreeMap { /** * Executes the given callback function once for each real key in the map. * It does not perform functions on deleted keys - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -177,14 +177,14 @@ declare class TreeMap { thisArg?: Object): void; /** * Returns a new Iterator object that contains the [key, value] pairs for each element in the Map object in insertion order - * @throws {ContainerBindError}: The entries method cannot be bound. + * @throws { BusinessError } 10200011 - The entries method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ entries(): IterableIterator<[K, V]>; /** * returns an ES6 iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.TreeSet.d.ts b/api/@ohos.util.TreeSet.d.ts index eabec4bb9a..c1c9e26a1a 100644 --- a/api/@ohos.util.TreeSet.d.ts +++ b/api/@ohos.util.TreeSet.d.ts @@ -19,8 +19,8 @@ declare class TreeSet { * @param comparator (Optional) User-defined comparison functions * @param firstValue (Optional) previous element * @param secondValue (Optional) next element - * @throws {NewTargetIsNullError}: The TreeSet's constructor cannot be directly invoked. - * @throws {TypeError}: The type of "comparator" must be callable. Received value is: [comparator] + * @throws { BusinessError } 10200012 - The TreeSet's constructor cannot be directly invoked. + * @throws { BusinessError } 401 - The type of "comparator" must be callable. Received value is: [comparator] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -34,7 +34,7 @@ declare class TreeSet { /** * Returns whether the Set object contains elements * @return the boolean type - * @throws {ContainerBindError}: The isEmpty method cannot be bound. + * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -43,7 +43,7 @@ declare class TreeSet { * Returns whether the Set object contain s the elements * @param value need to determine whether to include the element * @return the boolean type - * @throws {ContainerBindError}: The has method cannot be bound. + * @throws { BusinessError } 10200011 - The has method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -52,8 +52,8 @@ declare class TreeSet { * If the set does not contain the element, the specified element is added * @param value Added element * @returns the boolean type(Is there contain this element) - * @throws {TypeError}: The type of "value" must be not null. Received value is: [value] - * @throws {ContainerBindError}: The add method cannot be bound. + * @throws { BusinessError } 401 - The type of "value" must be not null. Received value is: [value] + * @throws { BusinessError } 10200011 - The add method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -62,14 +62,14 @@ declare class TreeSet { * Remove a specified element from a Set object * @param value Target to be deleted * @return the boolean type(Is there contain this element) - * @throws {ContainerBindError}: The remove method cannot be bound. + * @throws { BusinessError } 10200011 - The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ remove(value: T): boolean; /** * Clears all element groups in a set - * @throws {ContainerBindError}: The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -77,7 +77,7 @@ declare class TreeSet { /** * Gets the first elements in a set * @return value or undefined - * @throws {ContainerBindError}: The getFirstValue method cannot be bound. + * @throws { BusinessError } 10200011 - The getFirstValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -85,7 +85,7 @@ declare class TreeSet { /** * Gets the last elements in a set * @return value or undefined - * @throws {ContainerBindError}: The getLastValue method cannot be bound. + * @throws { BusinessError } 10200011 - The getLastValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -95,8 +95,8 @@ declare class TreeSet { * if the key does not exist, undefied is returned * @param key Objective of comparison * @return key or undefined - * @throws {ContainerBindError}: The getLowerValue method cannot be bound. - * @throws {TypeError}: The type of "key" must be not null. Received value is: [key] + * @throws { BusinessError } 10200011 - The getLowerValue method cannot be bound. + * @throws { BusinessError } 401 - The type of "key" must be not null. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -106,8 +106,8 @@ declare class TreeSet { * if the key does not exist, undefied is returned * @param key Objective of comparison * @return key or undefined - * @throws {ContainerBindError}: The getHigherValue method cannot be bound. - * @throws {TypeError}: The type of "key" must be not null. Received value is: [key] + * @throws { BusinessError } 10200011 - The getHigherValue method cannot be bound. + * @throws { BusinessError } 401 - The type of "key" must be not null. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -115,7 +115,7 @@ declare class TreeSet { /** * Return and delete the first element, returns undefined if tree set is empty * @return first value or undefined - * @throws {ContainerBindError}: The popFirst method cannot be bound. + * @throws { BusinessError } 10200011 - The popFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -123,15 +123,15 @@ declare class TreeSet { /** * Return and delete the last element, returns undefined if tree set is empty * @return last value or undefined - * @throws {ContainerBindError}: The popLast method cannot be bound. + * @throws { BusinessError } 10200011 - The popLast method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ popLast(): T; /** * Executes a provided function once for each value in the Set object. - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -139,21 +139,21 @@ declare class TreeSet { thisArg?: Object): void; /** * Returns a new Iterator object that contains the values contained in this set - * @throws {ContainerBindError}: The values method cannot be bound. + * @throws { BusinessError } 10200011 - The values method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ values(): IterableIterator; /** * Returns a new Iterator object that contains the [key, value] pairs for each element in the Set object in insertion order - * @throws {ContainerBindError}: The entries method cannot be bound. + * @throws { BusinessError } 10200011 - The entries method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ entries(): IterableIterator<[T, T]>; /** * returns an ES6 iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ -- Gitee From 79e52d6385ab0a0f23c09032a97205b296f4b47e Mon Sep 17 00:00:00 2001 From: linhaoran Date: Thu, 13 Oct 2022 14:30:16 +0800 Subject: [PATCH 4/7] update container exception information Signed-off-by: linhaoran --- api/@ohos.util.ArrayList.d.ts | 29 +++++++++++++---------------- api/@ohos.util.Deque.d.ts | 2 +- api/@ohos.util.HashMap.d.ts | 6 +++--- api/@ohos.util.HashSet.d.ts | 8 ++++---- api/@ohos.util.LightWeightMap.d.ts | 22 +++++++++++----------- api/@ohos.util.LightWeightSet.d.ts | 14 +++++++------- api/@ohos.util.LinkedList.d.ts | 24 ++++++++++++------------ api/@ohos.util.List.d.ts | 26 ++++++++++++-------------- api/@ohos.util.PlainArray.d.ts | 28 ++++++++++++++-------------- api/@ohos.util.Queue.d.ts | 2 +- api/@ohos.util.Stack.d.ts | 2 +- api/@ohos.util.TreeMap.d.ts | 8 ++++---- api/@ohos.util.TreeSet.d.ts | 10 +++++----- api/@ohos.util.Vector.d.ts | 7 ++++++- 14 files changed, 94 insertions(+), 94 deletions(-) diff --git a/api/@ohos.util.ArrayList.d.ts b/api/@ohos.util.ArrayList.d.ts index 547343ffbb..abeeada5a6 100644 --- a/api/@ohos.util.ArrayList.d.ts +++ b/api/@ohos.util.ArrayList.d.ts @@ -42,9 +42,9 @@ declare class ArrayList { * any subsequent elements to the right (adds one to their index). * @param index index at which the specified element is to be inserted * @param element element to be inserted + * @throws { BusinessError } 10200001 - The type of parameters are out of range. * @throws { BusinessError } 10200011 - The insert method cannot be bound. - * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length]. Received value is: [index] - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -73,9 +73,9 @@ declare class ArrayList { * delete the element, and move the index of all elements to the right of the element forward by one. * @param index the index in the arraylist * @return the T type ,returns undefined if arraylist is empty,If the index is + * @throws { BusinessError } 10200001 - The type of parameters are out of range. * @throws { BusinessError } 10200011 - The removeByIndex method cannot be bound. - * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -105,11 +105,9 @@ declare class ArrayList { * Removes from this arraylist all of the elements whose index is between fromIndex,inclusive,and toIndex ,exclusive. * @param fromIndex The starting position of the index, containing the value at that index position * @param toIndex the end of the index, excluding the value at that index + * @throws { BusinessError } 10200001 - The type of parameters are out of range. * @throws { BusinessError } 10200011 - The removeByRange method cannot be bound. - * @throws { BusinessError } 10200001 - The value of "fromIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [fromIndex] - * @throws { BusinessError } 10200001 - The value of "toIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [toIndex] - * @throws { BusinessError } 401 - The type of "fromIndex" must be number. Received value is: [fromIndex] - * @throws { BusinessError } 401 - The type of "toIndex" must be number. Received value is: [toIndex] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -124,7 +122,7 @@ declare class ArrayList { * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value * @throws { BusinessError } 10200011 - The replaceAllElements method cannot be bound. - * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -140,7 +138,7 @@ declare class ArrayList { * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value * @throws { BusinessError } 10200011 - The forEach method cannot be bound. - * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -156,7 +154,7 @@ declare class ArrayList { * @param secondValue (Optional) next elements * If this parameter is empty, it will default to ASCII sorting * @throws { BusinessError } 10200011 - The sort method cannot be bound. - * @throws { BusinessError } 401 - The type of "comparator" must be callable. Received value is: [comparator] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -165,11 +163,10 @@ declare class ArrayList { * Returns a view of the portion of this arraylist between the specified fromIndex,inclusize,and toIndex,exclusive * @param fromIndex The starting position of the index, containing the value at that index position * @param toIndex the end of the index, excluding the value at that index + * @throws { BusinessError } 10200001 - The type of parameters are out of range. * @throws { BusinessError } 10200011 - The subArrayList method cannot be bound. - * @throws { BusinessError } 10200001 - The value of "fromIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [fromIndex] - * @throws { BusinessError } 10200001 - The value of "toIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [toIndex] - * @throws { BusinessError } 401 - The type of "fromIndex" must be number. Received value is: [fromIndex] - * @throws { BusinessError } 401 - The type of "toIndex" must be number. Received value is: [toIndex] + * @throws { BusinessError } 401 - The type of parameters are invalid. + * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -218,7 +215,7 @@ declare class ArrayList { * If the newCapacity provided by the user is greater than or equal to length, * change the capacity of the arraylist to newCapacity, otherwise the capacity will not be changed * @throws { BusinessError } 10200011 - The increaseCapacityTo method cannot be bound. - * @throws { BusinessError } 401 - The type of "newCapacity" must be number. Received value is: [newCapacity] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.Deque.d.ts b/api/@ohos.util.Deque.d.ts index 3b5e4f2fe0..15c3906eab 100644 --- a/api/@ohos.util.Deque.d.ts +++ b/api/@ohos.util.Deque.d.ts @@ -92,7 +92,7 @@ declare class Deque { * @param deque (Optional) The deque object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @throws { BusinessError } 10200011 - The forEach method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang diff --git a/api/@ohos.util.HashMap.d.ts b/api/@ohos.util.HashMap.d.ts index d89d330946..46db82f142 100644 --- a/api/@ohos.util.HashMap.d.ts +++ b/api/@ohos.util.HashMap.d.ts @@ -66,7 +66,7 @@ declare class HashMap { * Adds all element groups in one map to another map * @param map the Map object to add members * @throws { BusinessError } 10200011 - The setAll method cannot be bound. - * @throws { BusinessError } 401 - The type of "map" must be HashMap. Received value is: [map] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -77,7 +77,7 @@ declare class HashMap { * @param value Added or updated value * @returns the map object after set * @throws { BusinessError } 10200011 - The set method cannot be bound. - * @throws { BusinessError } 401 - The type of "key" must be not null. Received value is: [key] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -126,7 +126,7 @@ declare class HashMap { * Executes the given callback function once for each real key in the map. * It does not perform functions on deleted keys * @throws { BusinessError } 10200011 - The forEach method cannot be bound. - * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.HashSet.d.ts b/api/@ohos.util.HashSet.d.ts index 8efc3a7d5b..e10b40ea0b 100644 --- a/api/@ohos.util.HashSet.d.ts +++ b/api/@ohos.util.HashSet.d.ts @@ -40,7 +40,7 @@ declare class HashSet { * @param value need to determine whether to include the element * @return the boolean type * @throws { BusinessError } 10200011 - The has method cannot be bound. - * @throws { BusinessError } 401 - The type of "value" must be not null. Received value is: [value] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -50,7 +50,7 @@ declare class HashSet { * @param value Added element * @returns the boolean type(Is there contain this element) * @throws { BusinessError } 10200011 - The add method cannot be bound. - * @throws { BusinessError } 401 - The type of "value" must be not null. Received value is: [value] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -60,7 +60,7 @@ declare class HashSet { * @param value Target to be deleted * @return the boolean type(Is there contain this element) * @throws { BusinessError } 10200011 - The remove method cannot be bound. - * @throws { BusinessError } 401 - The type of "value" must be not null. Received value is: [value] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -75,7 +75,7 @@ declare class HashSet { /** * Executes a provided function once for each value in the Set object. * @throws { BusinessError } 10200011 - The forEach method cannot be bound. - * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.LightWeightMap.d.ts b/api/@ohos.util.LightWeightMap.d.ts index 5090b2ffcf..94862c4fc1 100644 --- a/api/@ohos.util.LightWeightMap.d.ts +++ b/api/@ohos.util.LightWeightMap.d.ts @@ -31,7 +31,7 @@ declare class LightWeightMap { * Returns whether this map has all the object in a specified map * @param map the Map object to compare * @return the boolean type - * @throws { BusinessError } 401 - The type of "map" must be LightWeightMap. Received value is: [map] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @throws { BusinessError } 10200011 - The hasAll method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang @@ -60,7 +60,7 @@ declare class LightWeightMap { * and that the container has all the original objects after capacity expansion * @param minimumCapacity Minimum capacity to be reserved * @throws { BusinessError } 10200011 - The increaseCapacityTo method cannot be bound. - * @throws { BusinessError } 401 - The type of "minimumCapacity" must be number. Received value is: [minimumCapacity] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -112,8 +112,8 @@ declare class LightWeightMap { * @param index Target subscript for search * @return the key of key-value pairs * @throws { BusinessError } 10200011 - The getKeyAt method cannot be bound. - * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200001 - The type of parameters are out of range. + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -129,7 +129,7 @@ declare class LightWeightMap { * Adds all element groups in one map to another map * @param map the Map object to add members * @throws { BusinessError } 10200011 - The setAll method cannot be bound. - * @throws { BusinessError } 401 - The type of "map" must be LightWeightMap. Received value is: [map] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -158,7 +158,7 @@ declare class LightWeightMap { * @param index Target subscript for search * @return the boolean type(Is there a delete value) * @throws { BusinessError } 10200011 - The removeAt method cannot be bound. - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -177,8 +177,8 @@ declare class LightWeightMap { * @param value Updated the target mapped value * @return the boolean type(Is there a value corresponding to the subscript) * @throws { BusinessError } 10200011 - The setValueAt method cannot be bound. - * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200001 - The type of parameters are out of range. + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -187,7 +187,7 @@ declare class LightWeightMap { * Executes the given callback function once for each real key in the map. * It does not perform functions on deleted keys * @throws { BusinessError } 10200011 - The forEach method cannot be bound. - * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -212,8 +212,8 @@ declare class LightWeightMap { * @param index Target subscript for search * @return the value of key-value pairs * @throws { BusinessError } 10200011 - The getValueAt method cannot be bound. - * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200001 - The type of parameters are out of range. + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.LightWeightSet.d.ts b/api/@ohos.util.LightWeightSet.d.ts index 1ea28f53e0..628504e614 100644 --- a/api/@ohos.util.LightWeightSet.d.ts +++ b/api/@ohos.util.LightWeightSet.d.ts @@ -41,7 +41,7 @@ declare class LightWeightSet { * @param set the Set object to provide the added element * @returns the boolean type(Is there any new data added successfully) * @throws { BusinessError } 10200011 - The addAll method cannot be bound. - * @throws { BusinessError } 401 - The type of "set" must be LightWeightSet. Received value is: [set] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -51,7 +51,7 @@ declare class LightWeightSet { * @param set the Set object to compare * @return the boolean type * @throws { BusinessError } 10200011 - The hasAll method cannot be bound. - * @throws { BusinessError } 401 - The type of "set" must be LightWeightSet. Received value is: [set] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -79,8 +79,8 @@ declare class LightWeightSet { * and that the container has all the original objects after capacity expansion * @param minimumCapacity Minimum capacity to be reserved * @throws { BusinessError } 10200011 - The increaseCapacityTo method cannot be bound. - * @throws { BusinessError } 401 - The type of "minimumCapacity" must be number. Received value is: [minimumCapacity] - * @throws { BusinessError } 10200001 - The value of "minimumCapacity" is out of range. It must be > [currentCapacity]. Received value is: [minimumCapacity] + * @throws { BusinessError } 401 - The type of parameters are invalid. + * @throws { BusinessError } 10200001 - The type of parameters are out of range. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -108,7 +108,7 @@ declare class LightWeightSet { * @param index Target subscript for search * @return the boolean type(Is there a delete value) * @throws { BusinessError } 10200011 - The removeAt method cannot be bound. - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -125,7 +125,7 @@ declare class LightWeightSet { * Executes the given callback function once for each real key in the map. * It does not perform functions on deleted keys * @throws { BusinessError } 10200011 - The forEach method cannot be bound. - * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -156,7 +156,7 @@ declare class LightWeightSet { * @param index Target subscript for search * @return the value of key-value pairs * @throws { BusinessError } 10200011 - The getValueAt method cannot be bound. - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.LinkedList.d.ts b/api/@ohos.util.LinkedList.d.ts index 6c6bd9df94..c46491eba3 100644 --- a/api/@ohos.util.LinkedList.d.ts +++ b/api/@ohos.util.LinkedList.d.ts @@ -41,8 +41,8 @@ declare class LinkedList { * @param index index at which the specified element is to be inserted * @param element element to be inserted * @throws { BusinessError } 10200011 - The insert method cannot be bound. - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] - * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length]. Received value is: [index] + * @throws { BusinessError } 401 - The type of parameters are invalid. + * @throws { BusinessError } 10200001 - The type of parameters are out of range. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -53,7 +53,7 @@ declare class LinkedList { * @param index specified position * @return the T type * @throws { BusinessError } 10200011 - The get method cannot be bound. - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -70,7 +70,7 @@ declare class LinkedList { * Retrieves and removes the head (first element) of this linkedlist. * @return the head of this list * @throws { BusinessError } 10200011 - The removeFirst method cannot be bound. - * @throws { BusinessError } 10200010 - Container is Empty. + * @throws { BusinessError } 10200010 - Container is empty. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -79,7 +79,7 @@ declare class LinkedList { * Removes and returns the last element from this linkedlist. * @return the head of this list * @throws { BusinessError } 10200011 - The removeLast method cannot be bound. - * @throws { BusinessError } 10200010 - Container is Empty. + * @throws { BusinessError } 10200010 - Container is empty. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -109,8 +109,8 @@ declare class LinkedList { * @return the T type ,returns undefined if linkedlist is empty,If the index is * out of bounds (greater than or equal to length or less than 0), throw an exception * @throws { BusinessError } 10200011 - The removeByIndex method cannot be bound. - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] - * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of parameters are invalid. + * @throws { BusinessError } 10200001 - The type of parameters are out of range. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -133,7 +133,7 @@ declare class LinkedList { * @param element element to remove * @return the boolean type ,If there is no such element, return false * @throws { BusinessError } 10200011 - The removeFirstFound method cannot be bound. - * @throws { BusinessError } 10200010 - Container is Empty. + * @throws { BusinessError } 10200010 - Container is empty. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -145,7 +145,7 @@ declare class LinkedList { * @param element element to remove * @return the boolean type ,If there is no such element, return false * @throws { BusinessError } 10200011 - The removeLastFound method cannot be bound. - * @throws { BusinessError } 10200010 - Container is Empty. + * @throws { BusinessError } 10200010 - Container is empty. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -184,8 +184,8 @@ declare class LinkedList { * @param index index to find * @return the T type ,returns undefined if linkedList is empty * @throws { BusinessError } 10200011 - The set method cannot be bound. - * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200001 - The type of parameters are out of range. + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -200,7 +200,7 @@ declare class LinkedList { * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value * @throws { BusinessError } 10200011 - The forEach method cannot be bound. - * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.List.d.ts b/api/@ohos.util.List.d.ts index ef439cb8e6..e2d80d0575 100644 --- a/api/@ohos.util.List.d.ts +++ b/api/@ohos.util.List.d.ts @@ -41,8 +41,8 @@ declare class List { * @param index index at which the specified element is to be inserted * @param element element to be inserted * @throws { BusinessError } 10200011 - The insert method cannot be bound. - * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length]. Received value is: [index] - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200001 - The type of parameters are out of range. + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -53,7 +53,7 @@ declare class List { * @param index specified position * @return the T type * @throws { BusinessError } 10200011 - The get method cannot be bound. - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -83,8 +83,8 @@ declare class List { * @return the T type ,returns undefined if list is empty,If the index is * out of bounds (greater than or equal to length or less than 0), throw an exception * @throws { BusinessError } 10200011 - The removeByIndex method cannot be bound. - * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200001 - The type of parameters are out of range. + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -134,8 +134,8 @@ declare class List { * @param index index to find * @return the T type * @throws { BusinessError } 10200011 - The set method cannot be bound. - * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200001 - The type of parameters are out of range. + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -160,7 +160,7 @@ declare class List { * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value * @throws { BusinessError } 10200011 - The forEach method cannot be bound. - * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -174,7 +174,7 @@ declare class List { * minus firstValue, it returns an list sorted in descending order; * @param firstValue (Optional) previous element * @param secondValue (Optional) next elements - * @throws { BusinessError } 401 - The type of "comparator" must be callable. Received value is: [comparator] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @throws { BusinessError } 10200011 - The sort method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang @@ -193,10 +193,8 @@ declare class List { * @param fromIndex The starting position of the index, containing the value at that index position * @param toIndex the end of the index, excluding the value at that index * @throws { BusinessError } 10200011 - The getSubList method cannot be bound. - * @throws { BusinessError } 10200001 - The value of "fromIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [fromIndex] - * @throws { BusinessError } 10200001 - The value of "toIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [toIndex] - * @throws { BusinessError } 401 - The type of "fromIndex" must be number. Received value is: [fromIndex] - * @throws { BusinessError } 401 - The type of "toIndex" must be number. Received value is: [toIndex] + * @throws { BusinessError } 10200001 - The type of parameters are out of range. + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -211,7 +209,7 @@ declare class List { * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value * @throws { BusinessError } 10200011 - The replaceAllElements method cannot be bound. - * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.PlainArray.d.ts b/api/@ohos.util.PlainArray.d.ts index bc4d455752..ef10608a24 100644 --- a/api/@ohos.util.PlainArray.d.ts +++ b/api/@ohos.util.PlainArray.d.ts @@ -32,7 +32,7 @@ declare class PlainArray { * @param key Added the key of key-value * @param value Added the value of key-value * @throws { BusinessError } 10200011 - The add method cannot be bound. - * @throws { BusinessError } 401 - The type of "key" must be number. Received value is: [key] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -56,7 +56,7 @@ declare class PlainArray { * @param key need to determine whether to include the key * @return the boolean type * @throws { BusinessError } 10200011 - The has method cannot be bound. - * @throws { BusinessError } 401 - The type of "key" must be number. Received value is: [key] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -66,7 +66,7 @@ declare class PlainArray { * @param key Looking for goals * @return the value of key-value pairs * @throws { BusinessError } 10200011 - The get method cannot be bound. - * @throws { BusinessError } 401 - The type of "key" must be number. Received value is: [key] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -76,7 +76,7 @@ declare class PlainArray { * @param key Looking for goals * @return Subscript corresponding to target * @throws { BusinessError } 10200011 - The getIndexOfKey method cannot be bound. - * @throws { BusinessError } 401 - The type of "key" must be number. Received value is: [key] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -103,7 +103,7 @@ declare class PlainArray { * @param index Target subscript for search * @return the key of key-value pairs * @throws { BusinessError } 10200011 - The getKeyAt method cannot be bound. - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -113,7 +113,7 @@ declare class PlainArray { * @param key Target to be deleted * @return Target mapped value * @throws { BusinessError } 10200011 - The remove method cannot be bound. - * @throws { BusinessError } 401 - The type of "key" must be number. Received value is: [key] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -123,7 +123,7 @@ declare class PlainArray { * @param index Target subscript for search * @return the T type * @throws { BusinessError } 10200011 - The removeAt method cannot be bound. - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -134,8 +134,8 @@ declare class PlainArray { * @param size Expected deletion quantity * @return Actual deleted quantity * @throws { BusinessError } 10200011 - The removeRangeFrom method cannot be bound. - * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200001 - The type of parameters are out of range. + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -145,8 +145,8 @@ declare class PlainArray { * @param index Target subscript for search * @param value Updated the target mapped value * @throws { BusinessError } 10200011 - The setValueAt method cannot be bound. - * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200001 - The type of parameters are out of range. + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -163,8 +163,8 @@ declare class PlainArray { * @param index Target subscript for search * @return the value of key-value pairs * @throws { BusinessError } 10200011 - The getValueAt method cannot be bound. - * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200001 - The type of parameters are out of range. + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -172,7 +172,7 @@ declare class PlainArray { /** * Executes a provided function once for each value in the PlainArray object. * @throws { BusinessError } 10200011 - The forEach method cannot be bound. - * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.Queue.d.ts b/api/@ohos.util.Queue.d.ts index a605ba12f6..20443d8d11 100644 --- a/api/@ohos.util.Queue.d.ts +++ b/api/@ohos.util.Queue.d.ts @@ -63,7 +63,7 @@ declare class Queue { * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value * @throws { BusinessError } 10200011 - The forEach method cannot be bound. - * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.Stack.d.ts b/api/@ohos.util.Stack.d.ts index 811d1e10fe..e1c4ade374 100644 --- a/api/@ohos.util.Stack.d.ts +++ b/api/@ohos.util.Stack.d.ts @@ -81,7 +81,7 @@ declare class Stack { * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value * @throws { BusinessError } 10200011 - The forEach method cannot be bound. - * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.TreeMap.d.ts b/api/@ohos.util.TreeMap.d.ts index aebdd248c6..3598b07737 100644 --- a/api/@ohos.util.TreeMap.d.ts +++ b/api/@ohos.util.TreeMap.d.ts @@ -21,7 +21,7 @@ declare class TreeMap { * @param firstValue (Optional) previous element * @param secondValue (Optional) next element * @throws { BusinessError } 10200012 - The TreeMap's constructor cannot be directly invoked. - * @throws { BusinessError } 401 - The type of "comparator" must be callable. Received value is: [comparator] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -89,7 +89,7 @@ declare class TreeMap { * Adds all element groups in one map to another map * @param map the Map object to add members * @throws { BusinessError } 10200011 - The setAll method cannot be bound. - * @throws { BusinessError } 401 - The type of "map" must be TreeMap. Received value is: [map] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -100,7 +100,7 @@ declare class TreeMap { * @param value Added or updated value * @returns the map object after set * @throws { BusinessError } 10200011 - The set method cannot be bound. - * @throws { BusinessError } 401 - The type of "key" must be not null. Received value is: [key] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -169,7 +169,7 @@ declare class TreeMap { * Executes the given callback function once for each real key in the map. * It does not perform functions on deleted keys * @throws { BusinessError } 10200011 - The forEach method cannot be bound. - * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.TreeSet.d.ts b/api/@ohos.util.TreeSet.d.ts index c1c9e26a1a..77d9e5635b 100644 --- a/api/@ohos.util.TreeSet.d.ts +++ b/api/@ohos.util.TreeSet.d.ts @@ -20,7 +20,7 @@ declare class TreeSet { * @param firstValue (Optional) previous element * @param secondValue (Optional) next element * @throws { BusinessError } 10200012 - The TreeSet's constructor cannot be directly invoked. - * @throws { BusinessError } 401 - The type of "comparator" must be callable. Received value is: [comparator] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -52,7 +52,7 @@ declare class TreeSet { * If the set does not contain the element, the specified element is added * @param value Added element * @returns the boolean type(Is there contain this element) - * @throws { BusinessError } 401 - The type of "value" must be not null. Received value is: [value] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @throws { BusinessError } 10200011 - The add method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang @@ -96,7 +96,7 @@ declare class TreeSet { * @param key Objective of comparison * @return key or undefined * @throws { BusinessError } 10200011 - The getLowerValue method cannot be bound. - * @throws { BusinessError } 401 - The type of "key" must be not null. Received value is: [key] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -107,7 +107,7 @@ declare class TreeSet { * @param key Objective of comparison * @return key or undefined * @throws { BusinessError } 10200011 - The getHigherValue method cannot be bound. - * @throws { BusinessError } 401 - The type of "key" must be not null. Received value is: [key] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -131,7 +131,7 @@ declare class TreeSet { /** * Executes a provided function once for each value in the Set object. * @throws { BusinessError } 10200011 - The forEach method cannot be bound. - * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 401 - The type of parameters are invalid. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.Vector.d.ts b/api/@ohos.util.Vector.d.ts index b170704ac7..8b1603b83a 100644 --- a/api/@ohos.util.Vector.d.ts +++ b/api/@ohos.util.Vector.d.ts @@ -12,7 +12,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -// @deprecated since 9 + +/** + * @syscap SystemCapability.Utils.Lang + * @since 8 + * @deprecated since 9 + */ declare class Vector { /** * A constructor used to create a Vector object. -- Gitee From 60520a15bc7340fb4d2e467cca6b8b3bc3a64122 Mon Sep 17 00:00:00 2001 From: fanjiaojiao Date: Tue, 18 Oct 2022 14:41:29 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E8=BF=90=E8=A1=8Cfs=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: fanjiaojiao --- build-tools/api_check_plugin/entry.js | 1 + 1 file changed, 1 insertion(+) diff --git a/build-tools/api_check_plugin/entry.js b/build-tools/api_check_plugin/entry.js index 849416c805..b81208d3c7 100644 --- a/build-tools/api_check_plugin/entry.js +++ b/build-tools/api_check_plugin/entry.js @@ -14,6 +14,7 @@ */ const path = require("path"); +const fs = require("fs"); const { writeResultFile } = require('./src/utils'); function checkEntry(url) { -- Gitee From e3190f942a2940e61e0170823cde2d951f08e2d0 Mon Sep 17 00:00:00 2001 From: openharmony_ci <120357966@qq.com> Date: Tue, 18 Oct 2022 09:49:52 +0000 Subject: [PATCH 6/7] =?UTF-8?q?=E5=9B=9E=E9=80=80=20'Pull=20Request=20!301?= =?UTF-8?q?3=20:=20=E6=97=A0=E9=9A=9C=E7=A2=8D=E5=A2=9E=E5=BC=BA=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=94=AF=E6=8C=81=E5=BC=82=E5=B8=B8=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=A0=81'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/@ohos.accessibility.config.d.ts | 24 ++---- api/@ohos.accessibility.d.ts | 73 +++++-------------- .../AccessibilityExtensionContext.d.ts | 19 +---- 3 files changed, 29 insertions(+), 87 deletions(-) diff --git a/api/@ohos.accessibility.config.d.ts b/api/@ohos.accessibility.config.d.ts index 690c702cff..2dfac6d56a 100644 --- a/api/@ohos.accessibility.config.d.ts +++ b/api/@ohos.accessibility.config.d.ts @@ -77,10 +77,6 @@ declare namespace config { * Enable the accessibility extension ability. * @param name Indicates the accessibility extension name, in "bundleName/abilityName" format. * @param capability Indicates the ability. - * @throws { BusinessError } 201 - Permission denied. - * @throws { BusinessError } 401 - Input parameter error. - * @throws { BusinessError } 9300001 - Invalid bundle name or ability name. - * @throws { BusinessError } 9300002 - Target ability already enabled. */ function enableAbility(name: string, capability: Array): Promise; function enableAbility(name: string, capability: Array, callback: AsyncCallback): void; @@ -88,28 +84,23 @@ declare namespace config { /** * Disable the accessibility extension ability. * @param name Indicates the accessibility extension name, in "bundleName/abilityName" format. - * @throws { BusinessError } 201 - Permission denied. - * @throws { BusinessError } 401 - Input parameter error. - * @throws { BusinessError } 9300001 - Invalid bundle name or ability name. */ function disableAbility(name: string): Promise; function disableAbility(name: string, callback: AsyncCallback): void; /** * Register the listener that watches for changes in the enabled status of accessibility extensions. - * @param type Indicates the type of event. + * @param type Indicates the enableAbilityListsStateChanged type. * @param callback Indicates the listener. - * @throws { BusinessError } 401 - Input parameter error. */ - function on(type: 'enabledAccessibilityExtensionListChange', callback: Callback): void; + function on(type: 'enableAbilityListsStateChanged', callback: Callback): void; /** - * Unregister listener that watches for changes in the enabled status of accessibility extensions. - * @param type Indicates the type of event. + * Deregister listener that watches for changes in the enabled status of accessibility extensions. + * @param type Indicates the enableAbilityListsStateChanged type. * @param callback Indicates the listener. - * @throws { BusinessError } 401 - Input parameter error. */ - function off(type: 'enabledAccessibilityExtensionListChange', callback?: Callback): void; + function off(type: 'enableAbilityListsStateChanged', callback?: Callback): void; /** * Indicates setting, getting, and listening to changes in configuration. @@ -118,8 +109,6 @@ declare namespace config { /** * Setting configuration value. * @param value Indicates the value. - * @throws { BusinessError } 201 - Permission denied. - * @throws { BusinessError } 401 - Input parameter error. */ set(value: T): Promise; set(value: T, callback: AsyncCallback): void; @@ -133,12 +122,11 @@ declare namespace config { /** * Register the listener to listen for configuration changes. * @param callback Indicates the listener. - * @throws { BusinessError } 401 - Input parameter error. */ on(callback: Callback): void; /** - * Unregister the listener to listen for configuration changes. + * Deregister the listener to listen for configuration changes. * @param callback Indicates the listener. */ off(callback?: Callback): void; diff --git a/api/@ohos.accessibility.d.ts b/api/@ohos.accessibility.d.ts index 8b5b372e0a..50f45c0251 100644 --- a/api/@ohos.accessibility.d.ts +++ b/api/@ohos.accessibility.d.ts @@ -24,19 +24,13 @@ import { Callback } from './basic'; * @import basic,abilityInfo */ declare namespace accessibility { + /** * The type of the Ability app. - * @type { 'audible' | 'generic' | 'haptic' | 'spoken' | 'visual' } * @syscap SystemCapability.BarrierFree.Accessibility.Core * @since 7 */ - /** - * The type of the Ability app. - * @type { 'audible' | 'generic' | 'haptic' | 'spoken' | 'visual' | 'all' } - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since 9 - */ - type AbilityType = 'audible' | 'generic' | 'haptic' | 'spoken' | 'visual' | 'all'; + type AbilityType = 'audible' | 'generic' | 'haptic' | 'spoken' | 'visual'; /** * The action that the ability can execute. @@ -104,7 +98,7 @@ declare namespace accessibility { * @param callback Asynchronous callback interface. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @return Returns {@code true} if the accessibility is enabled; returns {@code false} otherwise. - */ + */ function isOpenAccessibility(callback: AsyncCallback): void; function isOpenAccessibility(): Promise; @@ -114,7 +108,7 @@ declare namespace accessibility { * @param callback Asynchronous callback interface. * @syscap SystemCapability.BarrierFree.Accessibility.Vision * @return Returns {@code true} if the touch browser is enabled; returns {@code false} otherwise. - */ + */ function isOpenTouchGuide(callback: AsyncCallback): void; function isOpenTouchGuide(): Promise; @@ -125,26 +119,24 @@ declare namespace accessibility { * @param stateType The state of the accessibility ability. {@code AbilityState} eg.installed * @syscap SystemCapability.BarrierFree.Accessibility.Core * @return Returns the list of abilityInfos. - * @deprecated since 9 - * @useinstead ohos.accessibility#getAccessibilityExtensionList - */ + */ function getAbilityLists(abilityType: AbilityType, stateType: AbilityState, callback: AsyncCallback>): void; function getAbilityLists(abilityType: AbilityType, stateType: AbilityState): Promise>; - /** * Queries the list of accessibility abilities. * @since 9 - * @param abilityType The type of the accessibility ability. {@code AbilityType} eg.spoken + * @param abilityType The all type of the accessibility ability. * @param stateType The state of the accessibility ability. {@code AbilityState} eg.installed * @syscap SystemCapability.BarrierFree.Accessibility.Core * @return Returns the list of abilityInfos. - * @throws { BusinessError } 401 - Input parameter error. - */ - function getAccessibilityExtensionList(abilityType: AbilityType, stateType: AbilityState): Promise>; - function getAccessibilityExtensionList(abilityType: AbilityType, stateType: AbilityState, callback: AsyncCallback>): void; + */ + function getAbilityLists(abilityType: 'all', stateType: AbilityState, + callback: AsyncCallback>): void; + function getAbilityLists(abilityType: 'all', + stateType: AbilityState): Promise>; /** * Send accessibility Event. @@ -153,64 +145,46 @@ declare namespace accessibility { * @param callback Asynchronous callback interface. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @return Returns {@code true} if success ; returns {@code false} otherwise. - * @deprecated since 9 - * @useinstead ohos.accessibility#sendAccessibilityEvent */ function sendEvent(event: EventInfo, callback: AsyncCallback): void; function sendEvent(event: EventInfo): Promise; /** - * Send accessibility event. - * @since 9 - * @param event The object of the accessibility {@code EventInfo} . - * @param callback Asynchronous callback interface. - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @return Returns {@code true} if success ; returns {@code false} otherwise. - * @throws { BusinessError } 401 - Input parameter error. - */ - function sendAccessibilityEvent(event: EventInfo, callback: AsyncCallback): void; - function sendAccessibilityEvent(event: EventInfo): Promise; - - /** - * Register the observer of the accessibility state changed. + * Register the observe of the accessibility state changed. * @since 7 * @param type state event type. * @param callback Asynchronous callback interface. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @return Returns {@code true} if the register is success ; returns {@code false} otherwise. - * @throws { BusinessError } 401 - Input parameter error. */ function on(type: 'accessibilityStateChange', callback: Callback): void; /** - * Register the observer of the touchGuide state changed. + * Register the observe of the touchGuide state changed. * @since 7 * @param type state event type. * @param callback Asynchronous callback interface. * @syscap SystemCapability.BarrierFree.Accessibility.Vision * @return Returns {@code true} if the register is success ; returns {@code false} otherwise. - * @throws { BusinessError } 401 - Input parameter error. */ function on(type: 'touchGuideStateChange', callback: Callback): void; /** - * Unregister the observer of the accessibility state changed. + * Deregister the observe of the accessibility state changed. * @since 7 * @param type state event type * @param callback Asynchronous callback interface. * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @return Returns {@code true} if the Unregister is success ; returns {@code false} otherwise. - * @throws { BusinessError } 401 - Input parameter error. + * @return Returns {@code true} if the deregister is success ; returns {@code false} otherwise. */ function off(type: 'accessibilityStateChange', callback?: Callback): void; /** - * Unregister the observer of the touchGuide state changed. + * Deregister the observe of the touchGuide state changed. * @since 7 * @param type state event type * @param callback Asynchronous callback interface. - * @return Returns {@code true} if the Unregister is success ; returns {@code false} otherwise. - * @throws { BusinessError } 401 - Input parameter error. + * @return Returns {@code true} if the deregister is success ; returns {@code false} otherwise. */ function off(type: 'touchGuideStateChange', callback?: Callback): void; @@ -238,26 +212,19 @@ declare namespace accessibility { style: CaptionsStyle; /** - * Register the observer of the enable state. - * @throws { BusinessError } 401 - Input parameter error. + * Register the observe of the enable state. */ on(type: 'enableChange', callback: Callback): void; - /** * Register the observer of the style. - * @throws { BusinessError } 401 - Input parameter error. */ on(type: 'styleChange', callback: Callback): void; - /** - * Unregister the observer of the enable state. - * @throws { BusinessError } 401 - Input parameter error. + * Deregister the observe of the enable state. */ off(type: 'enableChange', callback?: Callback): void; - /** - * Unregister the observer of the style. - * @throws { BusinessError } 401 - Input parameter error. + * Deregister the observer of the style. */ off(type: 'styleChange', callback?: Callback): void; } diff --git a/api/application/AccessibilityExtensionContext.d.ts b/api/application/AccessibilityExtensionContext.d.ts index d3c38cddde..76ee1b0e0b 100644 --- a/api/application/AccessibilityExtensionContext.d.ts +++ b/api/application/AccessibilityExtensionContext.d.ts @@ -28,7 +28,6 @@ export default class AccessibilityExtensionContext extends ExtensionContext { /** * Set the name of the bundle name that is interested in sending the event. * @param targetNames - * @throws { BusinessError } 401 - Input parameter error. */ setTargetBundleName(targetNames: Array): Promise; setTargetBundleName(targetNames: Array, callback: AsyncCallback): void; @@ -36,7 +35,6 @@ export default class AccessibilityExtensionContext extends ExtensionContext { /** * Get focus element. * @param isAccessibilityFocus Indicates whether the acquired element has an accessibility focus. - * @throws { BusinessError } 9300003 - Do not have accessibility right for this operation. */ getFocusElement(isAccessibilityFocus?: boolean): Promise; getFocusElement(callback: AsyncCallback): void; @@ -45,7 +43,6 @@ export default class AccessibilityExtensionContext extends ExtensionContext { /** * Get window root element. * @param windowId Indicates the window ID. - * @throws { BusinessError } 9300003 - Do not have accessibility right for this operation. */ getWindowRootElement(windowId?: number): Promise; getWindowRootElement(callback: AsyncCallback): void; @@ -54,7 +51,6 @@ export default class AccessibilityExtensionContext extends ExtensionContext { /** * Get window list. * @param displayId Indicates the display ID. - * @throws { BusinessError } 9300003 - Do not have accessibility right for this operation. */ getWindows(displayId?: number): Promise>; getWindows(callback: AsyncCallback>): void; @@ -63,8 +59,6 @@ export default class AccessibilityExtensionContext extends ExtensionContext { /** * Inject gesture path events. * @param gesturePath Indicates the gesture path. - * @throws { BusinessError } 401 - Input parameter error. - * @throws { BusinessError } 9300003 - Do not have accessibility right for this operation. */ injectGesture(gesturePath: GesturePath): Promise; injectGesture(gesturePath: GesturePath, callback: AsyncCallback): void; @@ -87,8 +81,6 @@ declare interface AccessibilityElement { /** * Get the value of an attribute. * @param attributeName Indicates the attribute name. - * @throws { BusinessError } 401 - Input parameter error. - * @throws { BusinessError } 9300004 - This property does not exist. */ attributeValue(attributeName: T): Promise; attributeValue(attributeName: T, @@ -104,18 +96,15 @@ declare interface AccessibilityElement { * Perform the specified action. * @param actionName Indicates the action name. * @param parameters Indicates the parameters needed to execute the action. - * @throws { BusinessError } 401 - Input parameter error. - * @throws { BusinessError } 9300005 - This action is not supported. */ - performAction(actionName: string, parameters?: object): Promise; - performAction(actionName: string, callback: AsyncCallback): void; - performAction(actionName: string, parameters: object, callback: AsyncCallback): void; + performAction(actionName: string, parameters?: object): Promise; + performAction(actionName: string, callback: AsyncCallback): void; + performAction(actionName: string, parameters: object, callback: AsyncCallback): void; /** * Find elements that match the condition. * @param type The type of query condition is content. * @param condition Indicates the specific content to be queried. - * @throws { BusinessError } 401 - Input parameter error. */ findElement(type: 'content', condition: string): Promise>; findElement(type: 'content', condition: string, callback: AsyncCallback>): void @@ -124,7 +113,6 @@ declare interface AccessibilityElement { * Find elements that match the condition. * @param type The type of query condition is focus type. * @param condition Indicates the type of focus to query. - * @throws { BusinessError } 401 - Input parameter error. */ findElement(type: 'focusType', condition: FocusType): Promise; findElement(type: 'focusType', condition: FocusType, callback: AsyncCallback): void @@ -133,7 +121,6 @@ declare interface AccessibilityElement { * Find elements that match the condition. * @param type The type of query condition is focus direction. * @param condition Indicates the direction of search focus to query. - * @throws { BusinessError } 401 - Input parameter error. */ findElement(type: 'focusDirection', condition: FocusDirection): Promise; findElement(type: 'focusDirection', condition: FocusDirection, callback: AsyncCallback): void -- Gitee From 6d1f799da2d62f6a3c1c0a757c7fc91df4f86fca Mon Sep 17 00:00:00 2001 From: laiguizhong Date: Tue, 18 Oct 2022 20:02:05 +0800 Subject: [PATCH 7/7] =?UTF-8?q?Revert=20"!3040=20=E5=9B=9E=E9=80=80=20'Pul?= =?UTF-8?q?l=20Request=20!3013=20:=20=E6=97=A0=E9=9A=9C=E7=A2=8D=E5=A2=9E?= =?UTF-8?q?=E5=BC=BA=E6=8E=A5=E5=8F=A3=E6=94=AF=E6=8C=81=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=A0=81'"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 82e61d0de23b7dbc1edbf38094b79ac2348c87d0, reversing changes made to 5e281f7b65ead4e452bd564193c6169decdae0dc. Signed-off-by: laiguizhong --- api/@ohos.accessibility.config.d.ts | 24 ++++-- api/@ohos.accessibility.d.ts | 73 ++++++++++++++----- .../AccessibilityExtensionContext.d.ts | 19 ++++- 3 files changed, 87 insertions(+), 29 deletions(-) diff --git a/api/@ohos.accessibility.config.d.ts b/api/@ohos.accessibility.config.d.ts index 2dfac6d56a..690c702cff 100644 --- a/api/@ohos.accessibility.config.d.ts +++ b/api/@ohos.accessibility.config.d.ts @@ -77,6 +77,10 @@ declare namespace config { * Enable the accessibility extension ability. * @param name Indicates the accessibility extension name, in "bundleName/abilityName" format. * @param capability Indicates the ability. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 401 - Input parameter error. + * @throws { BusinessError } 9300001 - Invalid bundle name or ability name. + * @throws { BusinessError } 9300002 - Target ability already enabled. */ function enableAbility(name: string, capability: Array): Promise; function enableAbility(name: string, capability: Array, callback: AsyncCallback): void; @@ -84,23 +88,28 @@ declare namespace config { /** * Disable the accessibility extension ability. * @param name Indicates the accessibility extension name, in "bundleName/abilityName" format. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 401 - Input parameter error. + * @throws { BusinessError } 9300001 - Invalid bundle name or ability name. */ function disableAbility(name: string): Promise; function disableAbility(name: string, callback: AsyncCallback): void; /** * Register the listener that watches for changes in the enabled status of accessibility extensions. - * @param type Indicates the enableAbilityListsStateChanged type. + * @param type Indicates the type of event. * @param callback Indicates the listener. + * @throws { BusinessError } 401 - Input parameter error. */ - function on(type: 'enableAbilityListsStateChanged', callback: Callback): void; + function on(type: 'enabledAccessibilityExtensionListChange', callback: Callback): void; /** - * Deregister listener that watches for changes in the enabled status of accessibility extensions. - * @param type Indicates the enableAbilityListsStateChanged type. + * Unregister listener that watches for changes in the enabled status of accessibility extensions. + * @param type Indicates the type of event. * @param callback Indicates the listener. + * @throws { BusinessError } 401 - Input parameter error. */ - function off(type: 'enableAbilityListsStateChanged', callback?: Callback): void; + function off(type: 'enabledAccessibilityExtensionListChange', callback?: Callback): void; /** * Indicates setting, getting, and listening to changes in configuration. @@ -109,6 +118,8 @@ declare namespace config { /** * Setting configuration value. * @param value Indicates the value. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 401 - Input parameter error. */ set(value: T): Promise; set(value: T, callback: AsyncCallback): void; @@ -122,11 +133,12 @@ declare namespace config { /** * Register the listener to listen for configuration changes. * @param callback Indicates the listener. + * @throws { BusinessError } 401 - Input parameter error. */ on(callback: Callback): void; /** - * Deregister the listener to listen for configuration changes. + * Unregister the listener to listen for configuration changes. * @param callback Indicates the listener. */ off(callback?: Callback): void; diff --git a/api/@ohos.accessibility.d.ts b/api/@ohos.accessibility.d.ts index 50f45c0251..8b5b372e0a 100644 --- a/api/@ohos.accessibility.d.ts +++ b/api/@ohos.accessibility.d.ts @@ -24,13 +24,19 @@ import { Callback } from './basic'; * @import basic,abilityInfo */ declare namespace accessibility { - /** * The type of the Ability app. + * @type { 'audible' | 'generic' | 'haptic' | 'spoken' | 'visual' } * @syscap SystemCapability.BarrierFree.Accessibility.Core * @since 7 */ - type AbilityType = 'audible' | 'generic' | 'haptic' | 'spoken' | 'visual'; + /** + * The type of the Ability app. + * @type { 'audible' | 'generic' | 'haptic' | 'spoken' | 'visual' | 'all' } + * @syscap SystemCapability.BarrierFree.Accessibility.Core + * @since 9 + */ + type AbilityType = 'audible' | 'generic' | 'haptic' | 'spoken' | 'visual' | 'all'; /** * The action that the ability can execute. @@ -98,7 +104,7 @@ declare namespace accessibility { * @param callback Asynchronous callback interface. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @return Returns {@code true} if the accessibility is enabled; returns {@code false} otherwise. - */ + */ function isOpenAccessibility(callback: AsyncCallback): void; function isOpenAccessibility(): Promise; @@ -108,7 +114,7 @@ declare namespace accessibility { * @param callback Asynchronous callback interface. * @syscap SystemCapability.BarrierFree.Accessibility.Vision * @return Returns {@code true} if the touch browser is enabled; returns {@code false} otherwise. - */ + */ function isOpenTouchGuide(callback: AsyncCallback): void; function isOpenTouchGuide(): Promise; @@ -119,24 +125,26 @@ declare namespace accessibility { * @param stateType The state of the accessibility ability. {@code AbilityState} eg.installed * @syscap SystemCapability.BarrierFree.Accessibility.Core * @return Returns the list of abilityInfos. - */ + * @deprecated since 9 + * @useinstead ohos.accessibility#getAccessibilityExtensionList + */ function getAbilityLists(abilityType: AbilityType, stateType: AbilityState, callback: AsyncCallback>): void; function getAbilityLists(abilityType: AbilityType, stateType: AbilityState): Promise>; + /** * Queries the list of accessibility abilities. * @since 9 - * @param abilityType The all type of the accessibility ability. + * @param abilityType The type of the accessibility ability. {@code AbilityType} eg.spoken * @param stateType The state of the accessibility ability. {@code AbilityState} eg.installed * @syscap SystemCapability.BarrierFree.Accessibility.Core * @return Returns the list of abilityInfos. - */ - function getAbilityLists(abilityType: 'all', stateType: AbilityState, - callback: AsyncCallback>): void; - function getAbilityLists(abilityType: 'all', - stateType: AbilityState): Promise>; + * @throws { BusinessError } 401 - Input parameter error. + */ + function getAccessibilityExtensionList(abilityType: AbilityType, stateType: AbilityState): Promise>; + function getAccessibilityExtensionList(abilityType: AbilityType, stateType: AbilityState, callback: AsyncCallback>): void; /** * Send accessibility Event. @@ -145,46 +153,64 @@ declare namespace accessibility { * @param callback Asynchronous callback interface. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @return Returns {@code true} if success ; returns {@code false} otherwise. + * @deprecated since 9 + * @useinstead ohos.accessibility#sendAccessibilityEvent */ function sendEvent(event: EventInfo, callback: AsyncCallback): void; function sendEvent(event: EventInfo): Promise; /** - * Register the observe of the accessibility state changed. + * Send accessibility event. + * @since 9 + * @param event The object of the accessibility {@code EventInfo} . + * @param callback Asynchronous callback interface. + * @syscap SystemCapability.BarrierFree.Accessibility.Core + * @return Returns {@code true} if success ; returns {@code false} otherwise. + * @throws { BusinessError } 401 - Input parameter error. + */ + function sendAccessibilityEvent(event: EventInfo, callback: AsyncCallback): void; + function sendAccessibilityEvent(event: EventInfo): Promise; + + /** + * Register the observer of the accessibility state changed. * @since 7 * @param type state event type. * @param callback Asynchronous callback interface. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @return Returns {@code true} if the register is success ; returns {@code false} otherwise. + * @throws { BusinessError } 401 - Input parameter error. */ function on(type: 'accessibilityStateChange', callback: Callback): void; /** - * Register the observe of the touchGuide state changed. + * Register the observer of the touchGuide state changed. * @since 7 * @param type state event type. * @param callback Asynchronous callback interface. * @syscap SystemCapability.BarrierFree.Accessibility.Vision * @return Returns {@code true} if the register is success ; returns {@code false} otherwise. + * @throws { BusinessError } 401 - Input parameter error. */ function on(type: 'touchGuideStateChange', callback: Callback): void; /** - * Deregister the observe of the accessibility state changed. + * Unregister the observer of the accessibility state changed. * @since 7 * @param type state event type * @param callback Asynchronous callback interface. * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @return Returns {@code true} if the deregister is success ; returns {@code false} otherwise. + * @return Returns {@code true} if the Unregister is success ; returns {@code false} otherwise. + * @throws { BusinessError } 401 - Input parameter error. */ function off(type: 'accessibilityStateChange', callback?: Callback): void; /** - * Deregister the observe of the touchGuide state changed. + * Unregister the observer of the touchGuide state changed. * @since 7 * @param type state event type * @param callback Asynchronous callback interface. - * @return Returns {@code true} if the deregister is success ; returns {@code false} otherwise. + * @return Returns {@code true} if the Unregister is success ; returns {@code false} otherwise. + * @throws { BusinessError } 401 - Input parameter error. */ function off(type: 'touchGuideStateChange', callback?: Callback): void; @@ -212,19 +238,26 @@ declare namespace accessibility { style: CaptionsStyle; /** - * Register the observe of the enable state. + * Register the observer of the enable state. + * @throws { BusinessError } 401 - Input parameter error. */ on(type: 'enableChange', callback: Callback): void; + /** * Register the observer of the style. + * @throws { BusinessError } 401 - Input parameter error. */ on(type: 'styleChange', callback: Callback): void; + /** - * Deregister the observe of the enable state. + * Unregister the observer of the enable state. + * @throws { BusinessError } 401 - Input parameter error. */ off(type: 'enableChange', callback?: Callback): void; + /** - * Deregister the observer of the style. + * Unregister the observer of the style. + * @throws { BusinessError } 401 - Input parameter error. */ off(type: 'styleChange', callback?: Callback): void; } diff --git a/api/application/AccessibilityExtensionContext.d.ts b/api/application/AccessibilityExtensionContext.d.ts index 76ee1b0e0b..d3c38cddde 100644 --- a/api/application/AccessibilityExtensionContext.d.ts +++ b/api/application/AccessibilityExtensionContext.d.ts @@ -28,6 +28,7 @@ export default class AccessibilityExtensionContext extends ExtensionContext { /** * Set the name of the bundle name that is interested in sending the event. * @param targetNames + * @throws { BusinessError } 401 - Input parameter error. */ setTargetBundleName(targetNames: Array): Promise; setTargetBundleName(targetNames: Array, callback: AsyncCallback): void; @@ -35,6 +36,7 @@ export default class AccessibilityExtensionContext extends ExtensionContext { /** * Get focus element. * @param isAccessibilityFocus Indicates whether the acquired element has an accessibility focus. + * @throws { BusinessError } 9300003 - Do not have accessibility right for this operation. */ getFocusElement(isAccessibilityFocus?: boolean): Promise; getFocusElement(callback: AsyncCallback): void; @@ -43,6 +45,7 @@ export default class AccessibilityExtensionContext extends ExtensionContext { /** * Get window root element. * @param windowId Indicates the window ID. + * @throws { BusinessError } 9300003 - Do not have accessibility right for this operation. */ getWindowRootElement(windowId?: number): Promise; getWindowRootElement(callback: AsyncCallback): void; @@ -51,6 +54,7 @@ export default class AccessibilityExtensionContext extends ExtensionContext { /** * Get window list. * @param displayId Indicates the display ID. + * @throws { BusinessError } 9300003 - Do not have accessibility right for this operation. */ getWindows(displayId?: number): Promise>; getWindows(callback: AsyncCallback>): void; @@ -59,6 +63,8 @@ export default class AccessibilityExtensionContext extends ExtensionContext { /** * Inject gesture path events. * @param gesturePath Indicates the gesture path. + * @throws { BusinessError } 401 - Input parameter error. + * @throws { BusinessError } 9300003 - Do not have accessibility right for this operation. */ injectGesture(gesturePath: GesturePath): Promise; injectGesture(gesturePath: GesturePath, callback: AsyncCallback): void; @@ -81,6 +87,8 @@ declare interface AccessibilityElement { /** * Get the value of an attribute. * @param attributeName Indicates the attribute name. + * @throws { BusinessError } 401 - Input parameter error. + * @throws { BusinessError } 9300004 - This property does not exist. */ attributeValue(attributeName: T): Promise; attributeValue(attributeName: T, @@ -96,15 +104,18 @@ declare interface AccessibilityElement { * Perform the specified action. * @param actionName Indicates the action name. * @param parameters Indicates the parameters needed to execute the action. + * @throws { BusinessError } 401 - Input parameter error. + * @throws { BusinessError } 9300005 - This action is not supported. */ - performAction(actionName: string, parameters?: object): Promise; - performAction(actionName: string, callback: AsyncCallback): void; - performAction(actionName: string, parameters: object, callback: AsyncCallback): void; + performAction(actionName: string, parameters?: object): Promise; + performAction(actionName: string, callback: AsyncCallback): void; + performAction(actionName: string, parameters: object, callback: AsyncCallback): void; /** * Find elements that match the condition. * @param type The type of query condition is content. * @param condition Indicates the specific content to be queried. + * @throws { BusinessError } 401 - Input parameter error. */ findElement(type: 'content', condition: string): Promise>; findElement(type: 'content', condition: string, callback: AsyncCallback>): void @@ -113,6 +124,7 @@ declare interface AccessibilityElement { * Find elements that match the condition. * @param type The type of query condition is focus type. * @param condition Indicates the type of focus to query. + * @throws { BusinessError } 401 - Input parameter error. */ findElement(type: 'focusType', condition: FocusType): Promise; findElement(type: 'focusType', condition: FocusType, callback: AsyncCallback): void @@ -121,6 +133,7 @@ declare interface AccessibilityElement { * Find elements that match the condition. * @param type The type of query condition is focus direction. * @param condition Indicates the direction of search focus to query. + * @throws { BusinessError } 401 - Input parameter error. */ findElement(type: 'focusDirection', condition: FocusDirection): Promise; findElement(type: 'focusDirection', condition: FocusDirection, callback: AsyncCallback): void -- Gitee