Skip to content

Commit 28ed9b3

Browse files
falsandtrumhegazy
falsandtru
authored andcommittedNov 6, 2017
Update DOM iterable interfaces (#19752)
* Make HTMLCollections Iterable * Sort definitions
1 parent ed38889 commit 28ed9b3

File tree

1 file changed

+25
-17
lines changed

1 file changed

+25
-17
lines changed
 

‎src/lib/dom.iterable.d.ts

+25-17
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,6 @@ interface DOMTokenList {
44
[Symbol.iterator](): IterableIterator<string>;
55
}
66

7-
interface FormData {
8-
/**
9-
* Returns an array of key, value pairs for every entry in the list
10-
*/
11-
entries(): IterableIterator<[string, string | File]>;
12-
/**
13-
* Returns a list of keys in the list
14-
*/
15-
keys(): IterableIterator<string>;
16-
/**
17-
* Returns a list of values in the list
18-
*/
19-
values(): IterableIterator<string | File>;
20-
21-
[Symbol.iterator](): IterableIterator<string | File>;
22-
}
23-
247
interface Headers {
258
[Symbol.iterator](): IterableIterator<[string, string]>;
269
/**
@@ -87,6 +70,31 @@ interface NodeListOf<TNode extends Node> {
8770
[Symbol.iterator](): IterableIterator<TNode>;
8871
}
8972

73+
interface HTMLCollectionBase {
74+
[Symbol.iterator](): IterableIterator<Element>;
75+
}
76+
77+
interface HTMLCollectionOf<T extends Element> {
78+
[Symbol.iterator](): IterableIterator<T>;
79+
}
80+
81+
interface FormData {
82+
/**
83+
* Returns an array of key, value pairs for every entry in the list
84+
*/
85+
entries(): IterableIterator<[string, string | File]>;
86+
/**
87+
* Returns a list of keys in the list
88+
*/
89+
keys(): IterableIterator<string>;
90+
/**
91+
* Returns a list of values in the list
92+
*/
93+
values(): IterableIterator<string | File>;
94+
95+
[Symbol.iterator](): IterableIterator<string | File>;
96+
}
97+
9098
interface URLSearchParams {
9199
/**
92100
* Returns an array of key, value pairs for every entry in the search params

0 commit comments

Comments
 (0)
Please sign in to comment.