Skip to content

Commit acfee0d

Browse files
Ritesh ShuklaRitesh Shukla
authored andcommitted
IterableIterator to Iterator
1 parent 24701f1 commit acfee0d

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

packages/react-native/Libraries/Blob/URLSearchParams.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ export class URLSearchParams {
6565
this._searchParams.set(name, [value]);
6666
}
6767

68-
keys(name: string): IterableIterator<string> {
68+
keys(name: string): Iterator<string> {
6969
return this._searchParams.keys();
7070
}
7171

72-
values(name: string): IterableIterator<string> {
72+
values(name: string): Iterator<string> {
7373
function* generateValues(
7474
params: Map<string, string[]>,
75-
): IterableIterator<string> {
75+
): Iterator<string> {
7676
for (const valueArray of params.values()) {
7777
for (const value of valueArray) {
7878
yield value;
@@ -82,10 +82,10 @@ export class URLSearchParams {
8282
return generateValues(this._searchParams);
8383
}
8484

85-
entries(name: string): IterableIterator<[string, string]> {
85+
entries(name: string): Iterator<[string, string]> {
8686
function* generateEntries(
8787
params: Map<string, string[]>,
88-
): IterableIterator<[string, string]> {
88+
): Iterator<[string, string]> {
8989
for (const [key, values] of params) {
9090
for (const value of values) {
9191
yield [key, value];

packages/react-native/Libraries/Blob/URLSearchParams.js.flow

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ declare export class URLSearchParams {
2020
sort(): void;
2121
@@iterator(): Iterator<[string, string]>;
2222
toString(): string;
23-
keys(): IterableIterator<string>;
24-
values(): IterableIterator<string>;
25-
entries(): IterableIterator<string>;
23+
keys(): Iterator<string>;
24+
values(): Iterator<string>;
25+
entries(): Iterator<[string, string]>;
2626
}

packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,9 +1315,9 @@ exports[`public API should not change unintentionally Libraries/Blob/URLSearchPa
13151315
sort(): void;
13161316
@@iterator(): Iterator<[string, string]>;
13171317
toString(): string;
1318-
keys(): IterableIterator<string>;
1319-
values(): IterableIterator<string>;
1320-
entries(): IterableIterator<string>;
1318+
keys(): Iterator<string>;
1319+
values(): Iterator<string>;
1320+
entries(): Iterator<[string, string]>;
13211321
}
13221322
"
13231323
`;

0 commit comments

Comments
 (0)