!12195 support [Symbol.iterator]

Merge pull request !12195 from hzzhouzebin/Symbol.iterator
This commit is contained in:
openharmony_ci 2024-07-08 13:58:47 +00:00 committed by Gitee
commit c5dac62f3b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -451,6 +451,15 @@ declare namespace collections {
* @since 12
*/
at(index: number): T | undefined;
/**
* Returns an iterator that can be used to iterate over elements of type T.
*
* @returns { IterableIterator<T> } Iterator object.
* @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound.
* @syscap SystemCapability.Utils.Lang
* @since 12
*/
[Symbol.iterator](): IterableIterator<T>;
/**
* Returns an iterable of key, value pairs for every entry in the array
*
@ -676,6 +685,15 @@ declare namespace collections {
* @since 12
*/
constructor(entries?: readonly (readonly [K, V])[] | null)
/**
* Returns an iterator that iterates over key-value pairs.
*
* @returns { IterableIterator<[K, V]> } Iterator object that yields key-value pairs.
* @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound.
* @syscap SystemCapability.Utils.Lang
* @since 12
*/
[Symbol.iterator](): IterableIterator<[K, V]>
/**
* Returns an iterable of key, value pairs for every entry in the map.
*
@ -828,6 +846,15 @@ declare namespace collections {
* @since 12
*/
constructor(values?: readonly T[] | null);
/**
* Returns an iterator that can be used to iterate over elements of type T.
*
* @returns { IterableIterator<T> } Iterator object.
* @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound.
* @syscap SystemCapability.Utils.Lang
* @since 12
*/
[Symbol.iterator](): IterableIterator<T>;
/**
* Returns an iterable of [value, value] pairs for each element in this set.
*
@ -1446,6 +1473,15 @@ declare namespace collections {
* @since 12
*/
at(index: number): number | undefined;
/**
* Returns an iterator that iterates over numbers.
*
* @returns { IterableIterator<number> } Iterator object that yields numbers.
* @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound.
* @syscap SystemCapability.Utils.Lang
* @since 12
*/
[Symbol.iterator](): IterableIterator<number>;
/**
* Returns an iterable of key, value pairs for every entry in the array
*
@ -1958,6 +1994,15 @@ declare namespace collections {
* @since 12
*/
at(index: number): number | undefined;
/**
* Returns an iterator that iterates over numbers.
*
* @returns { IterableIterator<number> } Iterator object that yields numbers.
* @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound.
* @syscap SystemCapability.Utils.Lang
* @since 12
*/
[Symbol.iterator](): IterableIterator<number>;
/**
* Returns an iterable of key, value pairs for every entry in the array
*
@ -2485,6 +2530,15 @@ declare namespace collections {
* @since 12
*/
at(index: number): number | undefined;
/**
* Returns an iterator that iterates over numbers.
*
* @returns { IterableIterator<number> } Iterator object that yields numbers.
* @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound.
* @syscap SystemCapability.Utils.Lang
* @since 12
*/
[Symbol.iterator](): IterableIterator<number>;
/**
* Returns an iterable of key, value pairs for every entry in the array
*
@ -3012,6 +3066,15 @@ declare namespace collections {
* @since 12
*/
at(index: number): number | undefined;
/**
* Returns an iterator that iterates over numbers.
*
* @returns { IterableIterator<number> } Iterator object that yields numbers.
* @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound.
* @syscap SystemCapability.Utils.Lang
* @since 12
*/
[Symbol.iterator](): IterableIterator<number>;
/**
* Returns an iterable of key, value pairs for every entry in the array
*
@ -3538,6 +3601,15 @@ declare namespace collections {
* @since 12
*/
at(index: number): number | undefined;
/**
* Returns an iterator that iterates over numbers.
*
* @returns { IterableIterator<number> } Iterator object that yields numbers.
* @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound.
* @syscap SystemCapability.Utils.Lang
* @since 12
*/
[Symbol.iterator](): IterableIterator<number>;
/**
* Returns an iterable of key, value pairs for every entry in the array
*
@ -4065,6 +4137,15 @@ declare namespace collections {
* @since 12
*/
at(index: number): number | undefined;
/**
* Returns an iterator that iterates over numbers.
*
* @returns { IterableIterator<number> } Iterator object that yields numbers.
* @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound.
* @syscap SystemCapability.Utils.Lang
* @since 12
*/
[Symbol.iterator](): IterableIterator<number>;
/**
* Returns an iterable of key, value pairs for every entry in the array
*
@ -4591,6 +4672,15 @@ declare namespace collections {
* @since 12
*/
at(index: number): number | undefined;
/**
* Returns an iterator that iterates over numbers.
*
* @returns { IterableIterator<number> } Iterator object that yields numbers.
* @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound.
* @syscap SystemCapability.Utils.Lang
* @since 12
*/
[Symbol.iterator](): IterableIterator<number>;
/**
* Returns an iterable of key, value pairs for every entry in the array
*