Skip to content

Commit bb8a875

Browse files
authored
Merge pull request #15050 from YuichiNukiyama/add_headers_iteratableiterator
Fix Headers interface
2 parents a1a2006 + 2713501 commit bb8a875

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/lib/dom.iterable.d.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,22 @@ interface FormData {
2121
[Symbol.iterator](): IterableIterator<string | File>;
2222
}
2323

24+
interface Headers {
25+
[Symbol.iterator](): IterableIterator<[string, string]>;
26+
/**
27+
* Returns an iterator allowing to go through all key/value pairs contained in this object.
28+
*/
29+
entries(): IterableIterator<[string, string]>;
30+
/**
31+
* Returns an iterator allowing to go through all keys f the key/value pairs contained in this object.
32+
*/
33+
keys(): IterableIterator<string>;
34+
/**
35+
* Returns an iterator allowing to go through all values of the key/value pairs contained in this object.
36+
*/
37+
values(): IterableIterator<string>;
38+
}
39+
2440
interface NodeList {
2541
/**
2642
* Returns an array of key, value pairs for every entry in the list

0 commit comments

Comments
 (0)