-
Notifications
You must be signed in to change notification settings - Fork 12.6k
/
Copy pathdom.iterable.d.ts
125 lines (109 loc) · 4.08 KB
/
dom.iterable.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/// <reference lib="dom" />
interface DOMTokenList {
[Symbol.iterator](): ArrayIterator<string>;
}
interface HeadersIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
[Symbol.iterator](): HeadersIterator<T>;
}
interface Headers {
[Symbol.iterator](): HeadersIterator<[string, string]>;
/**
* Returns an iterator allowing to go through all key/value pairs contained in this object.
*/
entries(): HeadersIterator<[string, string]>;
/**
* Returns an iterator allowing to go through all keys f the key/value pairs contained in this object.
*/
keys(): HeadersIterator<string>;
/**
* Returns an iterator allowing to go through all values of the key/value pairs contained in this object.
*/
values(): HeadersIterator<string>;
}
interface NodeList {
/**
* Returns an array of key, value pairs for every entry in the list
*/
entries(): ArrayIterator<[number, Node]>;
/**
* Performs the specified action for each node in an list.
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the list.
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
*/
forEach(callbackfn: (value: Node, index: number, listObj: NodeList) => void, thisArg?: any): void;
/**
* Returns an list of keys in the list
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the list
*/
values(): ArrayIterator<Node>;
[Symbol.iterator](): ArrayIterator<Node>;
}
interface NodeListOf<TNode extends Node> {
/**
* Returns an array of key, value pairs for every entry in the list
*/
entries(): ArrayIterator<[number, TNode]>;
/**
* Performs the specified action for each node in an list.
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the list.
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
*/
forEach(callbackfn: (value: TNode, index: number, listObj: NodeListOf<TNode>) => void, thisArg?: any): void;
/**
* Returns an list of keys in the list
*/
keys(): ArrayIterator<number>;
/**
* Returns an list of values in the list
*/
values(): ArrayIterator<TNode>;
[Symbol.iterator](): ArrayIterator<TNode>;
}
interface HTMLCollectionBase {
[Symbol.iterator](): ArrayIterator<Element>;
}
interface HTMLCollectionOf<T extends Element> {
[Symbol.iterator](): ArrayIterator<T>;
}
interface FormDataIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
[Symbol.iterator](): FormDataIterator<T>;
}
interface FormData {
/**
* Returns an array of key, value pairs for every entry in the list
*/
entries(): FormDataIterator<[string, string | File]>;
/**
* Returns a list of keys in the list
*/
keys(): FormDataIterator<string>;
/**
* Returns a list of values in the list
*/
values(): FormDataIterator<string | File>;
[Symbol.iterator](): FormDataIterator<string | File>;
}
interface URLSearchParamsIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
[Symbol.iterator](): URLSearchParamsIterator<T>;
}
interface URLSearchParams {
/**
* Returns an array of key, value pairs for every entry in the search params
*/
entries(): URLSearchParamsIterator<[string, string]>;
/**
* Returns a list of keys in the search params
*/
keys(): URLSearchParamsIterator<string>;
/**
* Returns a list of values in the search params
*/
values(): URLSearchParamsIterator<string>;
/**
* iterate over key/value pairs
*/
[Symbol.iterator](): URLSearchParamsIterator<[string, string]>;
}