diff --git a/arkts/@arkts.collections.d.ets b/arkts/@arkts.collections.d.ets index 8a1a3f908..96a891306 100644 --- a/arkts/@arkts.collections.d.ets +++ b/arkts/@arkts.collections.d.ets @@ -218,6 +218,19 @@ declare namespace collections { * @since 12 */ static from(arrayLike: ArrayLike): Array; + /** + * Creates an ArkTS Array from an iterable object. + * + * @param { Iterable } iterable - An iterable object to convert to an ArkTS Array. + * @returns { Array } A new Array instance + * @throws { BusinessError } 401 - Parameter error. + * @throws { BusinessError } 10200011 - The from method cannot be bound. + * @static + * @syscap SystemCapability.Utils.Lang + * @atomicservice + * @since 12 + */ + static from(iterable: Iterable): Array; /** * A constructor used to create an ArkTS Array. * @@ -677,7 +690,7 @@ declare namespace collections { * A constructor used to create a Map. * * @param { readonly (readonly [K, V])[] | null } [entries] - An Array or other iterable object - * whose elements are key-value pairs. + * whose elements are key-value pairs. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 10200012 - The Map's constructor cannot be directly invoked. * @syscap SystemCapability.Utils.Lang @@ -685,6 +698,18 @@ declare namespace collections { * @since 12 */ constructor(entries?: readonly (readonly [K, V])[] | null) + /** + * A constructor used to create a Map. + * + * @param { Iterable} [iterable] - An iterable object to convert to an ArkTS Map. + * whose elements are key-value pairs. + * @throws { BusinessError } 401 - Parameter error. + * @throws { BusinessError } 10200012 - The Map's constructor cannot be directly invoked. + * @syscap SystemCapability.Utils.Lang + * @atomicservice + * @since 12 + */ + constructor(iterable: Iterable); /** * Returns an iterator that iterates over key-value pairs. * @@ -846,6 +871,19 @@ declare namespace collections { * @since 12 */ constructor(values?: readonly T[] | null); + /** + * A constructor used to create a Set. + * + * @param { Iterable} [iterable] - If an iterable object is passed, + * all of its elements will be added to the new Set. + * If you don't specify this parameter, or its value is null, the new Set is empty. + * @throws { BusinessError } 401 - Parameter error. + * @throws { BusinessError } 10200012 - The Set's constructor cannot be directly invoked. + * @syscap SystemCapability.Utils.Lang + * @atomicservice + * @since 12 + */ + constructor(iterable: Iterable); /** * Returns an iterator that can be used to iterate over elements of type T. * @@ -1086,6 +1124,17 @@ declare namespace collections { * @since 12 */ constructor(length: number); + /** + * A constructor used to create an Int8Array. + * + * @param { Iterable } elements - An iterable object to convert to an Int8Array. + * @throws { BusinessError } 10200012 - The Int8Array's constructor cannot be directly invoked. + * @throws { BusinessError } 401 - Parameter error. + * @syscap SystemCapability.Utils.Lang + * @atomicservice + * @since 12 + */ + constructor(elements: Iterable); /** * A constructor used to create an Int8Array. * @@ -1624,6 +1673,17 @@ declare namespace collections { * @since 12 */ constructor(length: number); + /** + * A constructor used to create an Uint8ClampedArray. + * + * @param { Iterable } elements - An iterable object to convert to an Uint8ClampedArray. + * @throws { BusinessError } 10200012 - The Uint8ClampedArray's constructor cannot be directly invoked. + * @throws { BusinessError } 401 - Parameter error. + * @syscap SystemCapability.Utils.Lang + * @atomicservice + * @since 12 + */ + constructor(elements: Iterable); /** * A constructor used to create an Uint8ClampedArray. * @@ -2144,6 +2204,17 @@ declare namespace collections { * @since 12 */ constructor(length: number); + /** + * A constructor used to create an Uint8Array. + * + * @param { Iterable } elements - An iterable object to convert to an Uint8Array. + * @throws { BusinessError } 10200012 - The Uint8Array's constructor cannot be directly invoked. + * @throws { BusinessError } 401 - Parameter error. + * @syscap SystemCapability.Utils.Lang + * @atomicservice + * @since 12 + */ + constructor(elements: Iterable); /** * A constructor used to create an Uint8Array. * @@ -2680,6 +2751,17 @@ declare namespace collections { * @since 12 */ constructor(length: number); + /** + * A constructor used to create an Int16Array. + * + * @param { Iterable } elements - An iterable object to convert to an Int16Array. + * @throws { BusinessError } 10200012 - The Int16Array's constructor cannot be directly invoked. + * @throws { BusinessError } 401 - Parameter error. + * @syscap SystemCapability.Utils.Lang + * @atomicservice + * @since 12 + */ + constructor(elements: Iterable); /** * A constructor used to create an Int16Array. * @@ -3216,6 +3298,17 @@ declare namespace collections { * @since 12 */ constructor(length: number); + /** + * A constructor used to create an Uint16Array. + * + * @param { Iterable } elements - An iterable object to convert to an Uint16Array. + * @throws { BusinessError } 10200012 - The Uint16Array's constructor cannot be directly invoked. + * @throws { BusinessError } 401 - Parameter error. + * @syscap SystemCapability.Utils.Lang + * @atomicservice + * @since 12 + */ + constructor(elements: Iterable); /** * A constructor used to create an Uint16Array. * @@ -3751,6 +3844,17 @@ declare namespace collections { * @since 12 */ constructor(length: number); + /** + * A constructor used to create an Int32Array. + * + * @param { Iterable } elements - An iterable object to convert to an Int32Array. + * @throws { BusinessError } 10200012 - The Int32Array's constructor cannot be directly invoked. + * @throws { BusinessError } 401 - Parameter error. + * @syscap SystemCapability.Utils.Lang + * @atomicservice + * @since 12 + */ + constructor(elements: Iterable); /** * A constructor used to create an Int32Array. * @@ -4287,6 +4391,17 @@ declare namespace collections { * @since 12 */ constructor(length: number); + /** + * A constructor used to create an Uint32Array. + * + * @param { Iterable } elements - An iterable object to convert to an Uint32Array. + * @throws { BusinessError } 10200012 - The Uint32Array's constructor cannot be directly invoked. + * @throws { BusinessError } 401 - Parameter error. + * @syscap SystemCapability.Utils.Lang + * @atomicservice + * @since 12 + */ + constructor(elements: Iterable); /** * A constructor used to create an Uint32Array. * @@ -4822,6 +4937,17 @@ declare namespace collections { * @since 12 */ constructor(length: number); + /** + * A constructor used to create an Float32Array. + * + * @param { Iterable } elements - An iterable object to convert to an Float32Array. + * @throws { BusinessError } 10200012 - The Float32Array's constructor cannot be directly invoked. + * @throws { BusinessError } 401 - Parameter error. + * @syscap SystemCapability.Utils.Lang + * @atomicservice + * @since 12 + */ + constructor(elements: Iterable); /** * A constructor used to create an Float32Array. *