@cloudflare/workers-types 5.20260811.1 → 5.20260813.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/experimental/index.d.ts +332 -356
- package/experimental/index.ts +334 -368
- package/index.d.ts +319 -343
- package/index.ts +321 -355
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -16,26 +16,26 @@ and limitations under the License.
|
|
|
16
16
|
// noinspection JSUnusedGlobalSymbols
|
|
17
17
|
declare var onmessage: never;
|
|
18
18
|
/**
|
|
19
|
-
* The **`DOMException`** interface represents an abnormal event (called an
|
|
19
|
+
* The **`DOMException`** interface represents an abnormal event (called an exception) that occurs as a result of calling a method or accessing a property of a web API. This is how error conditions are described in web APIs.
|
|
20
20
|
*
|
|
21
21
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException)
|
|
22
22
|
*/
|
|
23
23
|
declare class DOMException extends Error {
|
|
24
24
|
constructor(message?: string, name?: string);
|
|
25
25
|
/**
|
|
26
|
-
* The **`message`** read-only property of the a message or description associated with the given error name.
|
|
26
|
+
* The **`message`** read-only property of the DOMException interface returns a string representing a message or description associated with the given error name.
|
|
27
27
|
*
|
|
28
28
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message)
|
|
29
29
|
*/
|
|
30
30
|
readonly message: string;
|
|
31
31
|
/**
|
|
32
|
-
* The **`name`** read-only property of the one of the strings associated with an error name.
|
|
32
|
+
* The **`name`** read-only property of the DOMException interface returns a string that contains one of the strings associated with an error name.
|
|
33
33
|
*
|
|
34
34
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name)
|
|
35
35
|
*/
|
|
36
36
|
readonly name: string;
|
|
37
37
|
/**
|
|
38
|
-
* The **`code`** read-only property of the DOMException interface returns one of the legacy error code constants, or
|
|
38
|
+
* The **`code`** read-only property of the DOMException interface returns one of the legacy error code constants, or 0 if none match.
|
|
39
39
|
* @deprecated
|
|
40
40
|
*
|
|
41
41
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/code)
|
|
@@ -85,7 +85,7 @@ declare abstract class WorkerGlobalScope extends EventTarget<WorkerGlobalScopeEv
|
|
|
85
85
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console)
|
|
86
86
|
*/
|
|
87
87
|
interface Console {
|
|
88
|
-
|
|
88
|
+
assert(condition?: boolean, ...data: any[]): void;
|
|
89
89
|
/**
|
|
90
90
|
* The **`console.clear()`** static method clears the console if possible.
|
|
91
91
|
*
|
|
@@ -93,61 +93,61 @@ interface Console {
|
|
|
93
93
|
*/
|
|
94
94
|
clear(): void;
|
|
95
95
|
/**
|
|
96
|
-
* The **`console.count()`** static method logs the number of times that this particular call to
|
|
96
|
+
* The **`console.count()`** static method logs the number of times that this particular call to count() has been called.
|
|
97
97
|
*
|
|
98
98
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static)
|
|
99
99
|
*/
|
|
100
100
|
count(label?: string): void;
|
|
101
101
|
/**
|
|
102
|
-
* The **`console.countReset()`** static method resets counter used with console
|
|
102
|
+
* The **`console.countReset()`** static method resets counter used with console.count().
|
|
103
103
|
*
|
|
104
104
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static)
|
|
105
105
|
*/
|
|
106
106
|
countReset(label?: string): void;
|
|
107
107
|
/**
|
|
108
|
-
* The **`console.debug()`** static method outputs a message to the console at the
|
|
108
|
+
* The **`console.debug()`** static method outputs a message to the console at the "debug" log level. The message is only displayed to the user if the console is configured to display debug output. In most cases, the log level is configured within the console UI. This log level might correspond to the Debug or Verbose log level.
|
|
109
109
|
*
|
|
110
110
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static)
|
|
111
111
|
*/
|
|
112
112
|
debug(...data: any[]): void;
|
|
113
113
|
/**
|
|
114
|
-
* The **`console.dir()`** static method displays a list of the properties of the specified JavaScript object.
|
|
114
|
+
* The **`console.dir()`** static method displays a list of the properties of the specified JavaScript object. In browser consoles, the output is presented as a hierarchical listing with disclosure triangles that let you see the contents of child objects.
|
|
115
115
|
*
|
|
116
116
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static)
|
|
117
117
|
*/
|
|
118
118
|
dir(item?: any, options?: any): void;
|
|
119
119
|
/**
|
|
120
|
-
* The **`console.dirxml()`** static method displays an interactive tree of the descendant elements of the specified XML/HTML element.
|
|
120
|
+
* The **`console.dirxml()`** static method displays an interactive tree of the descendant elements of the specified XML/HTML element. If it is not possible to display as an element the JavaScript Object view is shown instead. The output is presented as a hierarchical listing of expandable nodes that let you see the contents of child nodes.
|
|
121
121
|
*
|
|
122
122
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static)
|
|
123
123
|
*/
|
|
124
124
|
dirxml(...data: any[]): void;
|
|
125
125
|
/**
|
|
126
|
-
* The **`console.error()`** static method outputs a message to the console at the
|
|
126
|
+
* The **`console.error()`** static method outputs a message to the console at the "error" log level. The message is only displayed to the user if the console is configured to display error output. In most cases, the log level is configured within the console UI. The message may be formatted as an error, with red colors and call stack information.
|
|
127
127
|
*
|
|
128
128
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static)
|
|
129
129
|
*/
|
|
130
130
|
error(...data: any[]): void;
|
|
131
131
|
/**
|
|
132
|
-
* The **`console.group()`** static method creates a new inline group in the Web console log, causing any subsequent console messages to be indented by an additional level, until console
|
|
132
|
+
* The **`console.group()`** static method creates a new inline group in the Web console log, causing any subsequent console messages to be indented by an additional level, until console.groupEnd() is called.
|
|
133
133
|
*
|
|
134
134
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static)
|
|
135
135
|
*/
|
|
136
136
|
group(...data: any[]): void;
|
|
137
137
|
/**
|
|
138
|
-
* The **`console.groupCollapsed()`** static method creates a new inline group in the console.
|
|
138
|
+
* The **`console.groupCollapsed()`** static method creates a new inline group in the console. Unlike console.group(), however, the new group is created collapsed. The user will need to use the disclosure button next to it to expand it, revealing the entries created in the group.
|
|
139
139
|
*
|
|
140
140
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static)
|
|
141
141
|
*/
|
|
142
142
|
groupCollapsed(...data: any[]): void;
|
|
143
143
|
/**
|
|
144
|
-
* The **`console.groupEnd()`** static method exits the current inline group in the console.
|
|
144
|
+
* The **`console.groupEnd()`** static method exits the current inline group in the console. See Using groups in the console in the console documentation for details and examples.
|
|
145
145
|
*
|
|
146
146
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static)
|
|
147
147
|
*/
|
|
148
148
|
groupEnd(): void;
|
|
149
149
|
/**
|
|
150
|
-
* The **`console.info()`** static method outputs a message to the console at the
|
|
150
|
+
* The **`console.info()`** static method outputs a message to the console at the "info" log level. The message is only displayed to the user if the console is configured to display info output. In most cases, the log level is configured within the console UI. The message may receive special formatting, such as a small "i" icon next to it.
|
|
151
151
|
*
|
|
152
152
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static)
|
|
153
153
|
*/
|
|
@@ -165,23 +165,24 @@ interface Console {
|
|
|
165
165
|
*/
|
|
166
166
|
table(tabularData?: any, properties?: string[]): void;
|
|
167
167
|
/**
|
|
168
|
-
* The **`console.time()`** static method starts a timer you can use to track how long an operation takes.
|
|
168
|
+
* The **`console.time()`** static method starts a timer you can use to track how long an operation takes. You give each timer a unique name, and may have up to 10,000 timers running on a given page. When you call console.timeEnd() with the same name, the browser will output the time, in milliseconds, that elapsed since the timer was started.
|
|
169
169
|
*
|
|
170
170
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static)
|
|
171
171
|
*/
|
|
172
172
|
time(label?: string): void;
|
|
173
173
|
/**
|
|
174
|
-
* The **`console.timeEnd()`** static method stops a timer that was previously started by calling console
|
|
174
|
+
* The **`console.timeEnd()`** static method stops a timer that was previously started by calling console.time().
|
|
175
175
|
*
|
|
176
176
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static)
|
|
177
177
|
*/
|
|
178
178
|
timeEnd(label?: string): void;
|
|
179
179
|
/**
|
|
180
|
-
* The **`console.timeLog()`** static method logs the current value of a timer that was previously started by calling console
|
|
180
|
+
* The **`console.timeLog()`** static method logs the current value of a timer that was previously started by calling console.time().
|
|
181
181
|
*
|
|
182
182
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static)
|
|
183
183
|
*/
|
|
184
184
|
timeLog(label?: string, ...data: any[]): void;
|
|
185
|
+
/* The **`console.timeStamp()`** static method adds a single marker to the browser's Performance tool (Firefox bug 1387528, Chrome). This lets you correlate a point in your code with the other events recorded in the timeline, such as layout and paint events. */
|
|
185
186
|
timeStamp(label?: string): void;
|
|
186
187
|
/**
|
|
187
188
|
* The **`console.trace()`** static method outputs a stack trace to the console.
|
|
@@ -190,7 +191,7 @@ interface Console {
|
|
|
190
191
|
*/
|
|
191
192
|
trace(...data: any[]): void;
|
|
192
193
|
/**
|
|
193
|
-
* The **`console.warn()`** static method outputs a warning message to the console at the
|
|
194
|
+
* The **`console.warn()`** static method outputs a warning message to the console at the "warning" log level. The message is only displayed to the user if the console is configured to display warning output. In most cases, the log level is configured within the console UI. The message may receive special formatting, such as yellow colors and a warning icon.
|
|
194
195
|
*
|
|
195
196
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static)
|
|
196
197
|
*/
|
|
@@ -218,13 +219,7 @@ declare namespace WebAssembly {
|
|
|
218
219
|
constructor(message?: string);
|
|
219
220
|
}
|
|
220
221
|
type ValueType =
|
|
221
|
-
| "
|
|
222
|
-
| "externref"
|
|
223
|
-
| "f32"
|
|
224
|
-
| "f64"
|
|
225
|
-
| "i32"
|
|
226
|
-
| "i64"
|
|
227
|
-
| "v128";
|
|
222
|
+
"anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128";
|
|
228
223
|
interface GlobalDescriptor {
|
|
229
224
|
value: ValueType;
|
|
230
225
|
mutable?: boolean;
|
|
@@ -410,7 +405,7 @@ declare function removeEventListener<
|
|
|
410
405
|
options?: EventTargetEventListenerOptions | boolean,
|
|
411
406
|
): void;
|
|
412
407
|
/**
|
|
413
|
-
* The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
|
|
408
|
+
* The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
|
|
414
409
|
*
|
|
415
410
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
|
|
416
411
|
*/
|
|
@@ -477,6 +472,7 @@ declare const crypto: Crypto;
|
|
|
477
472
|
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
478
473
|
*/
|
|
479
474
|
declare const caches: CacheStorage;
|
|
475
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
|
|
480
476
|
declare const scheduler: Scheduler;
|
|
481
477
|
/**
|
|
482
478
|
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
@@ -819,8 +815,7 @@ interface DurableObjectFacets {
|
|
|
819
815
|
get<T extends Rpc.DurableObjectBranded | undefined = undefined>(
|
|
820
816
|
name: string,
|
|
821
817
|
getStartupOptions: () =>
|
|
822
|
-
| FacetStartupOptions<T
|
|
823
|
-
| Promise<FacetStartupOptions<T>>,
|
|
818
|
+
FacetStartupOptions<T> | Promise<FacetStartupOptions<T>>,
|
|
824
819
|
): Fetcher<T>;
|
|
825
820
|
abort(name: string, reason: any): void;
|
|
826
821
|
delete(name: string): void;
|
|
@@ -841,26 +836,26 @@ interface AnalyticsEngineDataPoint {
|
|
|
841
836
|
blobs?: ((ArrayBuffer | string) | null)[];
|
|
842
837
|
}
|
|
843
838
|
/**
|
|
844
|
-
* The **`Event`** interface represents an event which takes place on an
|
|
839
|
+
* The **`Event`** interface represents an event which takes place on an EventTarget.
|
|
845
840
|
*
|
|
846
841
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event)
|
|
847
842
|
*/
|
|
848
843
|
declare class Event {
|
|
849
844
|
constructor(type: string, init?: EventInit);
|
|
850
845
|
/**
|
|
851
|
-
* The **`type`** read-only property of the Event interface returns a string containing the event's type.
|
|
846
|
+
* The **`type`** read-only property of the Event interface returns a string containing the event's type. It is set when the event is constructed and is the name commonly used to refer to the specific event, such as click, load, or error.
|
|
852
847
|
*
|
|
853
848
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)
|
|
854
849
|
*/
|
|
855
850
|
get type(): string;
|
|
856
851
|
/**
|
|
857
|
-
* The **`eventPhase`** read-only property of the being evaluated.
|
|
852
|
+
* The **`eventPhase`** read-only property of the Event interface indicates which phase of the event flow is currently being evaluated.
|
|
858
853
|
*
|
|
859
854
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)
|
|
860
855
|
*/
|
|
861
856
|
get eventPhase(): number;
|
|
862
857
|
/**
|
|
863
|
-
* The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.
|
|
858
|
+
* The read-only **`composed`** property of the Event interface returns a boolean value which indicates whether or not the event will propagate across the shadow DOM boundary into the standard DOM.
|
|
864
859
|
*
|
|
865
860
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)
|
|
866
861
|
*/
|
|
@@ -897,13 +892,13 @@ declare class Event {
|
|
|
897
892
|
*/
|
|
898
893
|
get currentTarget(): EventTarget | undefined;
|
|
899
894
|
/**
|
|
900
|
-
* The read-only **`target`** property of the dispatched.
|
|
895
|
+
* The read-only **`target`** property of the Event interface is a reference to the object onto which the event was dispatched. It is different from Event.currentTarget when the event handler is called during the bubbling or capturing phase of the event.
|
|
901
896
|
*
|
|
902
897
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)
|
|
903
898
|
*/
|
|
904
899
|
get target(): EventTarget | undefined;
|
|
905
900
|
/**
|
|
906
|
-
* The deprecated **`Event.srcElement`** is an alias for the Event.target property.
|
|
901
|
+
* The deprecated **`Event.srcElement`** is an alias for the Event.target property. Use Event.target instead.
|
|
907
902
|
* @deprecated
|
|
908
903
|
*
|
|
909
904
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)
|
|
@@ -916,45 +911,45 @@ declare class Event {
|
|
|
916
911
|
*/
|
|
917
912
|
get timeStamp(): number;
|
|
918
913
|
/**
|
|
919
|
-
* The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and
|
|
914
|
+
* The **`isTrusted`** read-only property of the Event interface is a boolean value that is true when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and false when the event was dispatched via EventTarget.dispatchEvent(). The only exception is the click event, which initializes the isTrusted property to false in user agents.
|
|
920
915
|
*
|
|
921
916
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)
|
|
922
917
|
*/
|
|
923
918
|
get isTrusted(): boolean;
|
|
924
919
|
/**
|
|
925
|
-
* The **`cancelBubble`** property of the Event interface is deprecated.
|
|
920
|
+
* The **`cancelBubble`** property of the Event interface is deprecated. Use Event.stopPropagation() instead. Setting its value to true before returning from an event handler prevents propagation of the event. In later implementations, setting this to false does nothing. See Browser compatibility for details.
|
|
926
921
|
* @deprecated
|
|
927
922
|
*
|
|
928
923
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)
|
|
929
924
|
*/
|
|
930
925
|
get cancelBubble(): boolean;
|
|
931
926
|
/**
|
|
932
|
-
* The **`cancelBubble`** property of the Event interface is deprecated.
|
|
927
|
+
* The **`cancelBubble`** property of the Event interface is deprecated. Use Event.stopPropagation() instead. Setting its value to true before returning from an event handler prevents propagation of the event. In later implementations, setting this to false does nothing. See Browser compatibility for details.
|
|
933
928
|
* @deprecated
|
|
934
929
|
*
|
|
935
930
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)
|
|
936
931
|
*/
|
|
937
932
|
set cancelBubble(value: boolean);
|
|
938
933
|
/**
|
|
939
|
-
* The **`stopImmediatePropagation()`** method of the
|
|
934
|
+
* The **`stopImmediatePropagation()`** method of the Event interface prevents other listeners of the same event from being called.
|
|
940
935
|
*
|
|
941
936
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)
|
|
942
937
|
*/
|
|
943
938
|
stopImmediatePropagation(): void;
|
|
944
939
|
/**
|
|
945
|
-
* The **`preventDefault()`** method of the Event interface tells the user agent that
|
|
940
|
+
* The **`preventDefault()`** method of the Event interface tells the user agent that the event is being explicitly handled, so its default action, such as page scrolling, link navigation, or pasting text, should not be taken.
|
|
946
941
|
*
|
|
947
942
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)
|
|
948
943
|
*/
|
|
949
944
|
preventDefault(): void;
|
|
950
945
|
/**
|
|
951
|
-
* The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.
|
|
946
|
+
* The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases. It does not, however, prevent any default behaviors from occurring; for instance, clicks on links are still processed. If you want to stop those behaviors, see the preventDefault() method. It also does not prevent propagation to other event-handlers of the current element. If you want to stop those, see stopImmediatePropagation().
|
|
952
947
|
*
|
|
953
948
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)
|
|
954
949
|
*/
|
|
955
950
|
stopPropagation(): void;
|
|
956
951
|
/**
|
|
957
|
-
* The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.
|
|
952
|
+
* The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked. This does not include nodes in shadow trees if the shadow root was created with its ShadowRoot.mode closed.
|
|
958
953
|
*
|
|
959
954
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)
|
|
960
955
|
*/
|
|
@@ -976,10 +971,9 @@ interface EventListenerObject<EventType extends Event = Event> {
|
|
|
976
971
|
handleEvent(event: EventType): void;
|
|
977
972
|
}
|
|
978
973
|
type EventListenerOrEventListenerObject<EventType extends Event = Event> =
|
|
979
|
-
|
|
|
980
|
-
| EventListenerObject<EventType>;
|
|
974
|
+
EventListener<EventType> | EventListenerObject<EventType>;
|
|
981
975
|
/**
|
|
982
|
-
* The **`EventTarget`** interface is implemented by objects that can receive events and may have listeners for them.
|
|
976
|
+
* The **`EventTarget`** interface is implemented by objects that can receive events and may have listeners for them. In other words, any target of events implements the three methods associated with this interface.
|
|
983
977
|
*
|
|
984
978
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
|
|
985
979
|
*/
|
|
@@ -998,7 +992,7 @@ declare class EventTarget<
|
|
|
998
992
|
options?: EventTargetAddEventListenerOptions | boolean,
|
|
999
993
|
): void;
|
|
1000
994
|
/**
|
|
1001
|
-
* The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.
|
|
995
|
+
* The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
|
|
1002
996
|
*
|
|
1003
997
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
|
|
1004
998
|
*/
|
|
@@ -1008,7 +1002,7 @@ declare class EventTarget<
|
|
|
1008
1002
|
options?: EventTargetEventListenerOptions | boolean,
|
|
1009
1003
|
): void;
|
|
1010
1004
|
/**
|
|
1011
|
-
* The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
|
|
1005
|
+
* The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
|
|
1012
1006
|
*
|
|
1013
1007
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
|
|
1014
1008
|
*/
|
|
@@ -1040,7 +1034,7 @@ declare class AbortController {
|
|
|
1040
1034
|
*/
|
|
1041
1035
|
get signal(): AbortSignal;
|
|
1042
1036
|
/**
|
|
1043
|
-
* The **`abort()`** method of the AbortController interface aborts an asynchronous operation before it has completed.
|
|
1037
|
+
* The **`abort()`** method of the AbortController interface aborts an asynchronous operation before it has completed. This is able to abort fetch requests, the consumption of any response bodies, or streams.
|
|
1044
1038
|
*
|
|
1045
1039
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/abort)
|
|
1046
1040
|
*/
|
|
@@ -1053,7 +1047,7 @@ declare class AbortController {
|
|
|
1053
1047
|
*/
|
|
1054
1048
|
declare abstract class AbortSignal extends EventTarget {
|
|
1055
1049
|
/**
|
|
1056
|
-
* The **`AbortSignal.abort()`** static method returns an AbortSignal that is already set as aborted (and which does not trigger an
|
|
1050
|
+
* The **`AbortSignal.abort()`** static method returns an AbortSignal that is already set as aborted (and which does not trigger an abort event).
|
|
1057
1051
|
*
|
|
1058
1052
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static)
|
|
1059
1053
|
*/
|
|
@@ -1065,13 +1059,13 @@ declare abstract class AbortSignal extends EventTarget {
|
|
|
1065
1059
|
*/
|
|
1066
1060
|
static timeout(delay: number): AbortSignal;
|
|
1067
1061
|
/**
|
|
1068
|
-
* The **`AbortSignal.any()`** static method takes an iterable of abort signals and returns an AbortSignal.
|
|
1062
|
+
* The **`AbortSignal.any()`** static method takes an iterable of abort signals and returns an AbortSignal. The returned abort signal is aborted when any of the input iterable abort signals are aborted. The abort reason will be set to the reason of the first signal that is aborted. If any of the given abort signals are already aborted then so will be the returned AbortSignal.
|
|
1069
1063
|
*
|
|
1070
1064
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static)
|
|
1071
1065
|
*/
|
|
1072
1066
|
static any(signals: AbortSignal[]): AbortSignal;
|
|
1073
1067
|
/**
|
|
1074
|
-
* The **`aborted`** read-only property returns a value that indicates whether the asynchronous operations the signal is communicating with are aborted (
|
|
1068
|
+
* The **`aborted`** read-only property returns a value that indicates whether the asynchronous operations the signal is communicating with are aborted (true) or not (false).
|
|
1075
1069
|
*
|
|
1076
1070
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
|
|
1077
1071
|
*/
|
|
@@ -1087,12 +1081,17 @@ declare abstract class AbortSignal extends EventTarget {
|
|
|
1087
1081
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
1088
1082
|
set onabort(value: any | null);
|
|
1089
1083
|
/**
|
|
1090
|
-
* The **`throwIfAborted()`** method throws the signal's abort
|
|
1084
|
+
* The **`throwIfAborted()`** method throws the signal's abort reason if the signal has been aborted; otherwise it does nothing.
|
|
1091
1085
|
*
|
|
1092
1086
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted)
|
|
1093
1087
|
*/
|
|
1094
1088
|
throwIfAborted(): void;
|
|
1095
1089
|
}
|
|
1090
|
+
/**
|
|
1091
|
+
* The **`Scheduler`** interface of the Prioritized Task Scheduling API provides methods for scheduling prioritized tasks.
|
|
1092
|
+
*
|
|
1093
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Scheduler)
|
|
1094
|
+
*/
|
|
1096
1095
|
interface Scheduler {
|
|
1097
1096
|
wait(delay: number, maybeOptions?: SchedulerWaitOptions): Promise<void>;
|
|
1098
1097
|
}
|
|
@@ -1100,20 +1099,20 @@ interface SchedulerWaitOptions {
|
|
|
1100
1099
|
signal?: AbortSignal;
|
|
1101
1100
|
}
|
|
1102
1101
|
/**
|
|
1103
|
-
* The **`ExtendableEvent`** interface extends the lifetime of the
|
|
1102
|
+
* The **`ExtendableEvent`** interface extends the lifetime of the install and activate events dispatched on the global scope as part of the service worker lifecycle. This ensures that any functional events (like FetchEvent) are not dispatched until it upgrades database schemas and deletes the outdated cache entries.
|
|
1104
1103
|
*
|
|
1105
1104
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent)
|
|
1106
1105
|
*/
|
|
1107
1106
|
declare abstract class ExtendableEvent extends Event {
|
|
1108
1107
|
/**
|
|
1109
|
-
* The **`ExtendableEvent.waitUntil()`** method tells the event dispatcher that work is ongoing.
|
|
1108
|
+
* The **`ExtendableEvent.waitUntil()`** method tells the event dispatcher that work is ongoing. It can also be used to detect whether that work was successful. In service workers, waitUntil() tells the browser that work is ongoing until the promise settles, and it shouldn't terminate the service worker if it wants that work to complete.
|
|
1110
1109
|
*
|
|
1111
1110
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil)
|
|
1112
1111
|
*/
|
|
1113
1112
|
waitUntil(promise: Promise<any>): void;
|
|
1114
1113
|
}
|
|
1115
1114
|
/**
|
|
1116
|
-
* The **`CustomEvent`** interface
|
|
1115
|
+
* The **`CustomEvent`** interface can be used to attach custom data to an event generated by an application.
|
|
1117
1116
|
*
|
|
1118
1117
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent)
|
|
1119
1118
|
*/
|
|
@@ -1155,7 +1154,7 @@ declare class Blob {
|
|
|
1155
1154
|
*/
|
|
1156
1155
|
get type(): string;
|
|
1157
1156
|
/**
|
|
1158
|
-
* The **`slice()`** method of the Blob interface creates and returns a new
|
|
1157
|
+
* The **`slice()`** method of the Blob interface creates and returns a new Blob object which contains data from a subset of the blob on which it's called.
|
|
1159
1158
|
*
|
|
1160
1159
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice)
|
|
1161
1160
|
*/
|
|
@@ -1173,13 +1172,13 @@ declare class Blob {
|
|
|
1173
1172
|
*/
|
|
1174
1173
|
bytes(): Promise<Uint8Array>;
|
|
1175
1174
|
/**
|
|
1176
|
-
* The **`text()`** method of the string containing the contents of the blob, interpreted as UTF-8.
|
|
1175
|
+
* The **`text()`** method of the Blob interface returns a Promise that resolves with a string containing the contents of the blob, interpreted as UTF-8.
|
|
1177
1176
|
*
|
|
1178
1177
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text)
|
|
1179
1178
|
*/
|
|
1180
1179
|
text(): Promise<string>;
|
|
1181
1180
|
/**
|
|
1182
|
-
* The **`stream()`** method of the Blob interface returns a ReadableStream which upon reading returns the data contained within the
|
|
1181
|
+
* The **`stream()`** method of the Blob interface returns a ReadableStream which upon reading returns the data contained within the Blob.
|
|
1183
1182
|
*
|
|
1184
1183
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream)
|
|
1185
1184
|
*/
|
|
@@ -1200,13 +1199,13 @@ declare class File extends Blob {
|
|
|
1200
1199
|
options?: FileOptions,
|
|
1201
1200
|
);
|
|
1202
1201
|
/**
|
|
1203
|
-
* The **`name`** read-only property of the File interface returns the name of the file represented by a File object.
|
|
1202
|
+
* The **`name`** read-only property of the File interface returns the name of the file represented by a File object. For security reasons, the path is excluded from this property.
|
|
1204
1203
|
*
|
|
1205
1204
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name)
|
|
1206
1205
|
*/
|
|
1207
1206
|
get name(): string;
|
|
1208
1207
|
/**
|
|
1209
|
-
* The **`lastModified`** read-only property of the File interface provides the last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight).
|
|
1208
|
+
* The **`lastModified`** read-only property of the File interface provides the last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current date.
|
|
1210
1209
|
*
|
|
1211
1210
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified)
|
|
1212
1211
|
*/
|
|
@@ -1223,7 +1222,7 @@ interface FileOptions {
|
|
|
1223
1222
|
*/
|
|
1224
1223
|
declare abstract class CacheStorage {
|
|
1225
1224
|
/**
|
|
1226
|
-
* The **`open()`** method of the the Cache object matching the
|
|
1225
|
+
* The **`open()`** method of the CacheStorage interface returns a Promise that resolves to the Cache object matching the cacheName.
|
|
1227
1226
|
*
|
|
1228
1227
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open)
|
|
1229
1228
|
*/
|
|
@@ -1262,14 +1261,14 @@ interface CacheQueryOptions {
|
|
|
1262
1261
|
*/
|
|
1263
1262
|
declare abstract class Crypto {
|
|
1264
1263
|
/**
|
|
1265
|
-
* The **`Crypto.subtle`** read-only property returns a cryptographic operations.
|
|
1264
|
+
* The **`Crypto.subtle`** read-only property returns a SubtleCrypto which can then be used to perform low-level cryptographic operations.
|
|
1266
1265
|
* Available only in secure contexts.
|
|
1267
1266
|
*
|
|
1268
1267
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
|
|
1269
1268
|
*/
|
|
1270
1269
|
get subtle(): SubtleCrypto;
|
|
1271
1270
|
/**
|
|
1272
|
-
* The **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.
|
|
1271
|
+
* The **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values. The array given as the parameter is filled with random numbers (random in its cryptographic meaning).
|
|
1273
1272
|
*
|
|
1274
1273
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues)
|
|
1275
1274
|
*/
|
|
@@ -1311,7 +1310,7 @@ declare abstract class SubtleCrypto {
|
|
|
1311
1310
|
plainText: ArrayBuffer | ArrayBufferView,
|
|
1312
1311
|
): Promise<ArrayBuffer>;
|
|
1313
1312
|
/**
|
|
1314
|
-
* The **`decrypt()`** method of the SubtleCrypto interface decrypts some encrypted data.
|
|
1313
|
+
* The **`decrypt()`** method of the SubtleCrypto interface decrypts some encrypted data. It takes as arguments a key to decrypt with, some optional extra parameters, and the data to decrypt (also known as "ciphertext"). It returns a Promise which will be fulfilled with the decrypted data (also known as "plaintext").
|
|
1315
1314
|
*
|
|
1316
1315
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt)
|
|
1317
1316
|
*/
|
|
@@ -1342,7 +1341,7 @@ declare abstract class SubtleCrypto {
|
|
|
1342
1341
|
data: ArrayBuffer | ArrayBufferView,
|
|
1343
1342
|
): Promise<boolean>;
|
|
1344
1343
|
/**
|
|
1345
|
-
* The **`digest()`** method of the SubtleCrypto interface generates a
|
|
1344
|
+
* The **`digest()`** method of the SubtleCrypto interface generates a digest of the given data, using the specified hash function. A digest is a short fixed-length value derived from some variable-length input. Cryptographic digests should exhibit collision-resistance, meaning that it's hard to come up with two different inputs that have the same digest value.
|
|
1346
1345
|
*
|
|
1347
1346
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest)
|
|
1348
1347
|
*/
|
|
@@ -1373,7 +1372,7 @@ declare abstract class SubtleCrypto {
|
|
|
1373
1372
|
keyUsages: string[],
|
|
1374
1373
|
): Promise<CryptoKey>;
|
|
1375
1374
|
/**
|
|
1376
|
-
* The **`deriveBits()`** method of the key.
|
|
1375
|
+
* The **`deriveBits()`** method of the SubtleCrypto interface can be used to derive an array of bits from a base key.
|
|
1377
1376
|
*
|
|
1378
1377
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits)
|
|
1379
1378
|
*/
|
|
@@ -1401,7 +1400,7 @@ declare abstract class SubtleCrypto {
|
|
|
1401
1400
|
*/
|
|
1402
1401
|
exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
1403
1402
|
/**
|
|
1404
|
-
* The **`wrapKey()`** method of the SubtleCrypto interface
|
|
1403
|
+
* The **`wrapKey()`** method of the SubtleCrypto interface "wraps" a key. This means that it exports the key in an external, portable format, then encrypts the exported key. Wrapping a key helps protect it in untrusted environments, such as inside an otherwise unprotected data store or in transmission over an unprotected network.
|
|
1405
1404
|
*
|
|
1406
1405
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey)
|
|
1407
1406
|
*/
|
|
@@ -1412,7 +1411,7 @@ declare abstract class SubtleCrypto {
|
|
|
1412
1411
|
wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1413
1412
|
): Promise<ArrayBuffer>;
|
|
1414
1413
|
/**
|
|
1415
|
-
* The **`unwrapKey()`** method of the SubtleCrypto interface
|
|
1414
|
+
* The **`unwrapKey()`** method of the SubtleCrypto interface "unwraps" a key. This means that it takes as its input a key that has been exported and then encrypted (also called "wrapped"). It decrypts the key and then imports it, returning a CryptoKey object that can be used in the Web Crypto API.
|
|
1416
1415
|
*
|
|
1417
1416
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey)
|
|
1418
1417
|
*/
|
|
@@ -1431,20 +1430,20 @@ declare abstract class SubtleCrypto {
|
|
|
1431
1430
|
): boolean;
|
|
1432
1431
|
}
|
|
1433
1432
|
/**
|
|
1434
|
-
* The **`CryptoKey`** interface of the Web Crypto API represents a cryptographic key obtained from one of the SubtleCrypto methods
|
|
1433
|
+
* The **`CryptoKey`** interface of the Web Crypto API represents a cryptographic key obtained from one of the SubtleCrypto methods generateKey(), deriveKey(), importKey(), or unwrapKey().
|
|
1435
1434
|
* Available only in secure contexts.
|
|
1436
1435
|
*
|
|
1437
1436
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)
|
|
1438
1437
|
*/
|
|
1439
1438
|
declare abstract class CryptoKey {
|
|
1440
1439
|
/**
|
|
1441
|
-
* The read-only **`type`** property of the CryptoKey interface indicates which kind of key is represented by the object.
|
|
1440
|
+
* The read-only **`type`** property of the CryptoKey interface indicates which kind of key is represented by the object. It can have the following values:
|
|
1442
1441
|
*
|
|
1443
1442
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type)
|
|
1444
1443
|
*/
|
|
1445
1444
|
readonly type: string;
|
|
1446
1445
|
/**
|
|
1447
|
-
* The read-only **`extractable`** property of the CryptoKey interface indicates whether or not the key may be extracted using
|
|
1446
|
+
* The read-only **`extractable`** property of the CryptoKey interface indicates whether or not the key may be extracted using SubtleCrypto.exportKey() or SubtleCrypto.wrapKey().
|
|
1448
1447
|
*
|
|
1449
1448
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable)
|
|
1450
1449
|
*/
|
|
@@ -1574,7 +1573,7 @@ declare class DigestStream extends WritableStream<
|
|
|
1574
1573
|
get bytesWritten(): number | bigint;
|
|
1575
1574
|
}
|
|
1576
1575
|
/**
|
|
1577
|
-
* The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as
|
|
1576
|
+
* The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as UTF-8, ISO-8859-2, or GBK. A decoder takes an array of bytes as input and returns a JavaScript string.
|
|
1578
1577
|
*
|
|
1579
1578
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
|
|
1580
1579
|
*/
|
|
@@ -1594,20 +1593,20 @@ declare class TextDecoder {
|
|
|
1594
1593
|
get ignoreBOM(): boolean;
|
|
1595
1594
|
}
|
|
1596
1595
|
/**
|
|
1597
|
-
* The **`TextEncoder`** interface
|
|
1596
|
+
* The **`TextEncoder`** interface enables you to encode a JavaScript string using UTF-8.
|
|
1598
1597
|
*
|
|
1599
1598
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
|
|
1600
1599
|
*/
|
|
1601
1600
|
declare class TextEncoder {
|
|
1602
1601
|
constructor();
|
|
1603
1602
|
/**
|
|
1604
|
-
* The **`TextEncoder.encode()`** method takes a string as input, and returns a
|
|
1603
|
+
* The **`TextEncoder.encode()`** method takes a string as input, and returns a Uint8Array containing the string encoded using UTF-8.
|
|
1605
1604
|
*
|
|
1606
1605
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encode)
|
|
1607
1606
|
*/
|
|
1608
1607
|
encode(input?: string): Uint8Array;
|
|
1609
1608
|
/**
|
|
1610
|
-
* The **`TextEncoder.encodeInto()`** method takes a string to encode and a destination Uint8Array to put resulting UTF-8 encoded text into, and returns
|
|
1609
|
+
* The **`TextEncoder.encodeInto()`** method takes a string to encode and a destination Uint8Array to put resulting UTF-8 encoded text into, and returns an object indicating the progress of the encoding. This is potentially more performant than the encode() method — especially when the target buffer is a view into a Wasm heap.
|
|
1611
1610
|
*
|
|
1612
1611
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
|
|
1613
1612
|
*/
|
|
@@ -1678,31 +1677,31 @@ interface ErrorEventErrorEventInit {
|
|
|
1678
1677
|
declare class MessageEvent extends Event {
|
|
1679
1678
|
constructor(type: string, initializer: MessageEventInit);
|
|
1680
1679
|
/**
|
|
1681
|
-
* The **`data`** read-only property of the
|
|
1680
|
+
* The **`data`** read-only property of the MessageEvent interface represents the data sent by the message emitter.
|
|
1682
1681
|
*
|
|
1683
1682
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
|
|
1684
1683
|
*/
|
|
1685
1684
|
readonly data: any;
|
|
1686
1685
|
/**
|
|
1687
|
-
* The **`origin`** read-only property of the origin of the message emitter.
|
|
1686
|
+
* The **`origin`** read-only property of the MessageEvent interface is a string representing the origin of the message emitter.
|
|
1688
1687
|
*
|
|
1689
1688
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/origin)
|
|
1690
1689
|
*/
|
|
1691
1690
|
readonly origin: string | null;
|
|
1692
1691
|
/**
|
|
1693
|
-
* The **`lastEventId`** read-only property of the unique ID for the event.
|
|
1692
|
+
* The **`lastEventId`** read-only property of the MessageEvent interface is a string representing a unique ID for the event.
|
|
1694
1693
|
*
|
|
1695
1694
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/lastEventId)
|
|
1696
1695
|
*/
|
|
1697
1696
|
readonly lastEventId: string;
|
|
1698
1697
|
/**
|
|
1699
|
-
* The **`source`** read-only property of the
|
|
1698
|
+
* The **`source`** read-only property of the MessageEvent interface is a MessageEventSource (which can be a WindowProxy, MessagePort, or ServiceWorker object) representing the message emitter.
|
|
1700
1699
|
*
|
|
1701
1700
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/source)
|
|
1702
1701
|
*/
|
|
1703
1702
|
readonly source: MessagePort | null;
|
|
1704
1703
|
/**
|
|
1705
|
-
* The **`ports`** read-only property of the containing all MessagePort objects sent with the message, in order.
|
|
1704
|
+
* The **`ports`** read-only property of the MessageEvent interface is an array of MessagePort objects containing all MessagePort objects sent with the message, in order.
|
|
1706
1705
|
*
|
|
1707
1706
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/ports)
|
|
1708
1707
|
*/
|
|
@@ -1712,96 +1711,93 @@ interface MessageEventInit {
|
|
|
1712
1711
|
data: ArrayBuffer | string;
|
|
1713
1712
|
}
|
|
1714
1713
|
/**
|
|
1715
|
-
* The **`PromiseRejectionEvent`** interface represents events which are sent to the global script context when JavaScript Promises are rejected.
|
|
1714
|
+
* The **`PromiseRejectionEvent`** interface represents events which are sent to the global script context when JavaScript Promises are rejected. These events are particularly useful for telemetry and debugging purposes.
|
|
1716
1715
|
*
|
|
1717
1716
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent)
|
|
1718
1717
|
*/
|
|
1719
1718
|
declare abstract class PromiseRejectionEvent extends Event {
|
|
1720
1719
|
/**
|
|
1721
|
-
* The PromiseRejectionEvent interface's **`promise`** read-only property indicates the JavaScript rejected.
|
|
1720
|
+
* The PromiseRejectionEvent interface's **`promise`** read-only property indicates the JavaScript Promise which was rejected. You can examine the event's PromiseRejectionEvent.reason property to learn why the promise was rejected.
|
|
1722
1721
|
*
|
|
1723
1722
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise)
|
|
1724
1723
|
*/
|
|
1725
1724
|
readonly promise: Promise<any>;
|
|
1726
1725
|
/**
|
|
1727
|
-
* The PromiseRejectionEvent **`reason`** read-only property is any JavaScript value or Object which provides the reason passed into Promise.reject().
|
|
1726
|
+
* The PromiseRejectionEvent **`reason`** read-only property is any JavaScript value or Object which provides the reason passed into Promise.reject(). This in theory provides information about why the promise was rejected.
|
|
1728
1727
|
*
|
|
1729
1728
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason)
|
|
1730
1729
|
*/
|
|
1731
1730
|
readonly reason: any;
|
|
1732
1731
|
}
|
|
1733
1732
|
/**
|
|
1734
|
-
* The **`FormData`** interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using the
|
|
1733
|
+
* The **`FormData`** interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using the fetch(), XMLHttpRequest.send() or navigator.sendBeacon() methods. It uses the same format a form would use if the encoding type were set to "multipart/form-data".
|
|
1735
1734
|
*
|
|
1736
1735
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)
|
|
1737
1736
|
*/
|
|
1738
1737
|
declare class FormData {
|
|
1739
1738
|
constructor();
|
|
1740
1739
|
/**
|
|
1741
|
-
* The **`append()`** method of the FormData interface appends a new value onto an existing key inside a
|
|
1740
|
+
* The **`append()`** method of the FormData interface appends a new value onto an existing key inside a FormData object, or adds the key if it does not already exist.
|
|
1742
1741
|
*
|
|
1743
1742
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append)
|
|
1744
1743
|
*/
|
|
1745
1744
|
append(name: string, value: string | Blob): void;
|
|
1746
1745
|
/**
|
|
1747
|
-
* The **`append()`** method of the FormData interface appends a new value onto an existing key inside a
|
|
1746
|
+
* The **`append()`** method of the FormData interface appends a new value onto an existing key inside a FormData object, or adds the key if it does not already exist.
|
|
1748
1747
|
*
|
|
1749
1748
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append)
|
|
1750
1749
|
*/
|
|
1751
1750
|
append(name: string, value: string): void;
|
|
1752
1751
|
/**
|
|
1753
|
-
* The **`append()`** method of the FormData interface appends a new value onto an existing key inside a
|
|
1752
|
+
* The **`append()`** method of the FormData interface appends a new value onto an existing key inside a FormData object, or adds the key if it does not already exist.
|
|
1754
1753
|
*
|
|
1755
1754
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append)
|
|
1756
1755
|
*/
|
|
1757
1756
|
append(name: string, value: Blob, filename?: string): void;
|
|
1758
1757
|
/**
|
|
1759
|
-
* The **`delete()`** method of the FormData interface deletes a key and its value(s) from a
|
|
1758
|
+
* The **`delete()`** method of the FormData interface deletes a key and its value(s) from a FormData object.
|
|
1760
1759
|
*
|
|
1761
1760
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete)
|
|
1762
1761
|
*/
|
|
1763
1762
|
delete(name: string): void;
|
|
1764
1763
|
/**
|
|
1765
|
-
* The **`get()`** method of the FormData interface returns the first value associated with a given key from within a
|
|
1764
|
+
* The **`get()`** method of the FormData interface returns the first value associated with a given key from within a FormData object. If you expect multiple values and want all of them, use the getAll() method instead.
|
|
1766
1765
|
*
|
|
1767
1766
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get)
|
|
1768
1767
|
*/
|
|
1769
1768
|
get(name: string): (File | string) | null;
|
|
1770
1769
|
/**
|
|
1771
|
-
* The **`getAll()`** method of the FormData interface returns all the values associated with a given key from within a
|
|
1770
|
+
* The **`getAll()`** method of the FormData interface returns all the values associated with a given key from within a FormData object.
|
|
1772
1771
|
*
|
|
1773
1772
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll)
|
|
1774
1773
|
*/
|
|
1775
1774
|
getAll(name: string): (File | string)[];
|
|
1776
1775
|
/**
|
|
1777
|
-
* The **`has()`** method of the FormData interface returns whether a
|
|
1776
|
+
* The **`has()`** method of the FormData interface returns whether a FormData object contains a certain key.
|
|
1778
1777
|
*
|
|
1779
1778
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has)
|
|
1780
1779
|
*/
|
|
1781
1780
|
has(name: string): boolean;
|
|
1782
1781
|
/**
|
|
1783
|
-
* The **`set()`** method of the FormData interface sets a new value for an existing key inside a
|
|
1782
|
+
* The **`set()`** method of the FormData interface sets a new value for an existing key inside a FormData object, or adds the key/value if it does not already exist.
|
|
1784
1783
|
*
|
|
1785
1784
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set)
|
|
1786
1785
|
*/
|
|
1787
1786
|
set(name: string, value: string | Blob): void;
|
|
1788
1787
|
/**
|
|
1789
|
-
* The **`set()`** method of the FormData interface sets a new value for an existing key inside a
|
|
1788
|
+
* The **`set()`** method of the FormData interface sets a new value for an existing key inside a FormData object, or adds the key/value if it does not already exist.
|
|
1790
1789
|
*
|
|
1791
1790
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set)
|
|
1792
1791
|
*/
|
|
1793
1792
|
set(name: string, value: string): void;
|
|
1794
1793
|
/**
|
|
1795
|
-
* The **`set()`** method of the FormData interface sets a new value for an existing key inside a
|
|
1794
|
+
* The **`set()`** method of the FormData interface sets a new value for an existing key inside a FormData object, or adds the key/value if it does not already exist.
|
|
1796
1795
|
*
|
|
1797
1796
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set)
|
|
1798
1797
|
*/
|
|
1799
1798
|
set(name: string, value: Blob, filename?: string): void;
|
|
1800
|
-
/* Returns an array of key, value pairs for every entry in the list. */
|
|
1801
1799
|
entries(): IterableIterator<[key: string, value: File | string]>;
|
|
1802
|
-
/* Returns a list of keys in the list. */
|
|
1803
1800
|
keys(): IterableIterator<string>;
|
|
1804
|
-
/* Returns a list of values in the list. */
|
|
1805
1801
|
values(): IterableIterator<File | string>;
|
|
1806
1802
|
forEach<This = unknown>(
|
|
1807
1803
|
callback: (
|
|
@@ -1921,19 +1917,19 @@ interface DocumentEnd {
|
|
|
1921
1917
|
append(content: string, options?: ContentOptions): DocumentEnd;
|
|
1922
1918
|
}
|
|
1923
1919
|
/**
|
|
1924
|
-
* This is the event type for
|
|
1920
|
+
* This is the event type for fetch events dispatched on the service worker global scope. It contains information about the fetch, including the request and how the receiver will treat the response. It provides the event.respondWith() method, which allows us to provide a response to this fetch.
|
|
1925
1921
|
*
|
|
1926
1922
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent)
|
|
1927
1923
|
*/
|
|
1928
1924
|
declare abstract class FetchEvent extends ExtendableEvent {
|
|
1929
1925
|
/**
|
|
1930
|
-
* The **`request`** read-only property of the the event handler.
|
|
1926
|
+
* The **`request`** read-only property of the FetchEvent interface returns the Request that triggered the event handler.
|
|
1931
1927
|
*
|
|
1932
1928
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request)
|
|
1933
1929
|
*/
|
|
1934
1930
|
readonly request: Request;
|
|
1935
1931
|
/**
|
|
1936
|
-
* The **`respondWith()`** method of allows you to provide a promise for a Response yourself.
|
|
1932
|
+
* The **`respondWith()`** method of FetchEvent prevents the browser's default fetch handling, and allows you to provide a promise for a Response yourself.
|
|
1937
1933
|
*
|
|
1938
1934
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith)
|
|
1939
1935
|
*/
|
|
@@ -1941,49 +1937,47 @@ declare abstract class FetchEvent extends ExtendableEvent {
|
|
|
1941
1937
|
passThroughOnException(): void;
|
|
1942
1938
|
}
|
|
1943
1939
|
type HeadersInit =
|
|
1944
|
-
|
|
|
1945
|
-
| Iterable<Iterable<string>>
|
|
1946
|
-
| Record<string, string>;
|
|
1940
|
+
Headers | Iterable<Iterable<string>> | Record<string, string>;
|
|
1947
1941
|
/**
|
|
1948
|
-
* The **`Headers`** interface of the Fetch API allows you to perform various actions on HTTP request and response headers.
|
|
1942
|
+
* The **`Headers`** interface of the Fetch API allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing headers from the list of the request's headers.
|
|
1949
1943
|
*
|
|
1950
1944
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers)
|
|
1951
1945
|
*/
|
|
1952
1946
|
declare class Headers {
|
|
1953
1947
|
constructor(init?: HeadersInit);
|
|
1954
1948
|
/**
|
|
1955
|
-
* The **`get()`** method of the Headers interface returns a byte string of all the values of a header within a
|
|
1949
|
+
* The **`get()`** method of the Headers interface returns a byte string of all the values of a header within a Headers object with a given name. If the requested header doesn't exist in the Headers object, it returns null.
|
|
1956
1950
|
*
|
|
1957
1951
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get)
|
|
1958
1952
|
*/
|
|
1959
1953
|
get(name: string): string | null;
|
|
1960
1954
|
getAll(name: string): string[];
|
|
1961
1955
|
/**
|
|
1962
|
-
* The **`getSetCookie()`** method of the Headers interface returns an array containing the values of all Set-Cookie headers associated with a response.
|
|
1956
|
+
* The **`getSetCookie()`** method of the Headers interface returns an array containing the values of all Set-Cookie headers associated with a response. This allows Headers objects to handle having multiple Set-Cookie headers, which wasn't possible prior to its implementation.
|
|
1963
1957
|
*
|
|
1964
1958
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie)
|
|
1965
1959
|
*/
|
|
1966
1960
|
getSetCookie(): string[];
|
|
1967
1961
|
/**
|
|
1968
|
-
* The **`has()`** method of the Headers interface returns a boolean stating whether a
|
|
1962
|
+
* The **`has()`** method of the Headers interface returns a boolean stating whether a Headers object contains a certain header.
|
|
1969
1963
|
*
|
|
1970
1964
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has)
|
|
1971
1965
|
*/
|
|
1972
1966
|
has(name: string): boolean;
|
|
1973
1967
|
/**
|
|
1974
|
-
* The **`set()`** method of the Headers interface sets a new value for an existing header inside a
|
|
1968
|
+
* The **`set()`** method of the Headers interface sets a new value for an existing header inside a Headers object, or adds the header if it does not already exist.
|
|
1975
1969
|
*
|
|
1976
1970
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set)
|
|
1977
1971
|
*/
|
|
1978
1972
|
set(name: string, value: string): void;
|
|
1979
1973
|
/**
|
|
1980
|
-
* The **`append()`** method of the Headers interface appends a new value onto an existing header inside a
|
|
1974
|
+
* The **`append()`** method of the Headers interface appends a new value onto an existing header inside a Headers object, or adds the header if it does not already exist.
|
|
1981
1975
|
*
|
|
1982
1976
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append)
|
|
1983
1977
|
*/
|
|
1984
1978
|
append(name: string, value: string): void;
|
|
1985
1979
|
/**
|
|
1986
|
-
* The **`delete()`** method of the Headers interface deletes a header from the current
|
|
1980
|
+
* The **`delete()`** method of the Headers interface deletes a header from the current Headers object.
|
|
1987
1981
|
*
|
|
1988
1982
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete)
|
|
1989
1983
|
*/
|
|
@@ -1992,11 +1986,8 @@ declare class Headers {
|
|
|
1992
1986
|
callback: (this: This, value: string, key: string, parent: Headers) => void,
|
|
1993
1987
|
thisArg?: This,
|
|
1994
1988
|
): void;
|
|
1995
|
-
/* Returns an iterator allowing to go through all key/value pairs contained in this object. */
|
|
1996
1989
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
1997
|
-
/* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
|
|
1998
1990
|
keys(): IterableIterator<string>;
|
|
1999
|
-
/* Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
|
|
2000
1991
|
values(): IterableIterator<string>;
|
|
2001
1992
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
2002
1993
|
}
|
|
@@ -2065,7 +2056,7 @@ interface Response extends Body {
|
|
|
2065
2056
|
*/
|
|
2066
2057
|
statusText: string;
|
|
2067
2058
|
/**
|
|
2068
|
-
* The **`headers`** read-only property of the with the response.
|
|
2059
|
+
* The **`headers`** read-only property of the Response interface contains the Headers object associated with the response.
|
|
2069
2060
|
*
|
|
2070
2061
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers)
|
|
2071
2062
|
*/
|
|
@@ -2083,7 +2074,7 @@ interface Response extends Body {
|
|
|
2083
2074
|
*/
|
|
2084
2075
|
redirected: boolean;
|
|
2085
2076
|
/**
|
|
2086
|
-
* The **`url`** read-only property of the Response interface contains the URL of the response.
|
|
2077
|
+
* The **`url`** read-only property of the Response interface contains the URL of the response. The value of the url property will be the final URL obtained after any redirects.
|
|
2087
2078
|
*
|
|
2088
2079
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url)
|
|
2089
2080
|
*/
|
|
@@ -2091,7 +2082,7 @@ interface Response extends Body {
|
|
|
2091
2082
|
webSocket: WebSocket | null;
|
|
2092
2083
|
cf: any | undefined;
|
|
2093
2084
|
/**
|
|
2094
|
-
* The **`type`** read-only property of the Response interface contains the type of the response.
|
|
2085
|
+
* The **`type`** read-only property of the Response interface contains the type of the response. The type determines whether scripts are able to access the response body and headers.
|
|
2095
2086
|
*
|
|
2096
2087
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/type)
|
|
2097
2088
|
*/
|
|
@@ -2106,8 +2097,7 @@ interface ResponseInit {
|
|
|
2106
2097
|
encodeBody?: "automatic" | "manual";
|
|
2107
2098
|
}
|
|
2108
2099
|
type RequestInfo<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> =
|
|
2109
|
-
|
|
2110
|
-
| string;
|
|
2100
|
+
Request<CfHostMetadata, Cf> | string;
|
|
2111
2101
|
/**
|
|
2112
2102
|
* The **`Request`** interface of the Fetch API represents a resource request.
|
|
2113
2103
|
*
|
|
@@ -2130,13 +2120,13 @@ interface Request<
|
|
|
2130
2120
|
Cf = CfProperties<CfHostMetadata>,
|
|
2131
2121
|
> extends Body {
|
|
2132
2122
|
/**
|
|
2133
|
-
* The **`clone()`** method of the Request interface creates a copy of the current
|
|
2123
|
+
* The **`clone()`** method of the Request interface creates a copy of the current Request object.
|
|
2134
2124
|
*
|
|
2135
2125
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone)
|
|
2136
2126
|
*/
|
|
2137
2127
|
clone(): Request<CfHostMetadata, Cf>;
|
|
2138
2128
|
/**
|
|
2139
|
-
* The **`method`** read-only property of the
|
|
2129
|
+
* The **`method`** read-only property of the Request interface contains the request's method (GET, POST, etc.)
|
|
2140
2130
|
*
|
|
2141
2131
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/method)
|
|
2142
2132
|
*/
|
|
@@ -2148,7 +2138,7 @@ interface Request<
|
|
|
2148
2138
|
*/
|
|
2149
2139
|
url: string;
|
|
2150
2140
|
/**
|
|
2151
|
-
* The **`headers`** read-only property of the with the request.
|
|
2141
|
+
* The **`headers`** read-only property of the Request interface contains the Headers object associated with the request.
|
|
2152
2142
|
*
|
|
2153
2143
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/headers)
|
|
2154
2144
|
*/
|
|
@@ -2174,13 +2164,13 @@ interface Request<
|
|
|
2174
2164
|
*/
|
|
2175
2165
|
integrity: string;
|
|
2176
2166
|
/**
|
|
2177
|
-
* The **`keepalive`** read-only property of the Request interface contains the request's
|
|
2167
|
+
* The **`keepalive`** read-only property of the Request interface contains the request's keepalive setting (true or false), which indicates whether the browser will keep the associated request alive if the page that initiated it is unloaded before the request is complete.
|
|
2178
2168
|
*
|
|
2179
2169
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive)
|
|
2180
2170
|
*/
|
|
2181
2171
|
keepalive: boolean;
|
|
2182
2172
|
/**
|
|
2183
|
-
* The **`cache`** read-only property of the Request interface contains the cache mode of the request.
|
|
2173
|
+
* The **`cache`** read-only property of the Request interface contains the cache mode of the request. It controls how the request will interact with the browser's HTTP cache.
|
|
2184
2174
|
*
|
|
2185
2175
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/cache)
|
|
2186
2176
|
*/
|
|
@@ -2486,12 +2476,7 @@ interface R2Bucket {
|
|
|
2486
2476
|
put(
|
|
2487
2477
|
key: string,
|
|
2488
2478
|
value:
|
|
2489
|
-
|
|
|
2490
|
-
| ArrayBuffer
|
|
2491
|
-
| ArrayBufferView
|
|
2492
|
-
| string
|
|
2493
|
-
| null
|
|
2494
|
-
| Blob,
|
|
2479
|
+
ReadableStream | ArrayBuffer | ArrayBufferView | string | null | Blob,
|
|
2495
2480
|
options?: R2PutOptions & {
|
|
2496
2481
|
onlyIf: R2Conditional | Headers;
|
|
2497
2482
|
},
|
|
@@ -2499,12 +2484,7 @@ interface R2Bucket {
|
|
|
2499
2484
|
put(
|
|
2500
2485
|
key: string,
|
|
2501
2486
|
value:
|
|
2502
|
-
|
|
|
2503
|
-
| ArrayBuffer
|
|
2504
|
-
| ArrayBufferView
|
|
2505
|
-
| string
|
|
2506
|
-
| null
|
|
2507
|
-
| Blob,
|
|
2487
|
+
ReadableStream | ArrayBuffer | ArrayBufferView | string | null | Blob,
|
|
2508
2488
|
options?: R2PutOptions,
|
|
2509
2489
|
): Promise<R2Object>;
|
|
2510
2490
|
createMultipartUpload(
|
|
@@ -2725,7 +2705,7 @@ type ReadableStreamReadResult<R = any> =
|
|
|
2725
2705
|
value?: undefined;
|
|
2726
2706
|
};
|
|
2727
2707
|
/**
|
|
2728
|
-
* The
|
|
2708
|
+
* The **`ReadableStream`** interface of the Streams API represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object.
|
|
2729
2709
|
*
|
|
2730
2710
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2731
2711
|
*/
|
|
@@ -2743,13 +2723,13 @@ interface ReadableStream<R = any> {
|
|
|
2743
2723
|
*/
|
|
2744
2724
|
cancel(reason?: any): Promise<void>;
|
|
2745
2725
|
/**
|
|
2746
|
-
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it.
|
|
2726
|
+
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it. While the stream is locked, no other reader can be acquired until this one is released.
|
|
2747
2727
|
*
|
|
2748
2728
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
|
|
2749
2729
|
*/
|
|
2750
2730
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
2751
2731
|
/**
|
|
2752
|
-
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it.
|
|
2732
|
+
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it. While the stream is locked, no other reader can be acquired until this one is released.
|
|
2753
2733
|
*
|
|
2754
2734
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
|
|
2755
2735
|
*/
|
|
@@ -2764,7 +2744,7 @@ interface ReadableStream<R = any> {
|
|
|
2764
2744
|
options?: StreamPipeOptions,
|
|
2765
2745
|
): ReadableStream<T>;
|
|
2766
2746
|
/**
|
|
2767
|
-
* The **`pipeTo()`** method of the ReadableStream interface pipes the current
|
|
2747
|
+
* The **`pipeTo()`** method of the ReadableStream interface pipes the current ReadableStream to a given WritableStream and returns a Promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
|
|
2768
2748
|
*
|
|
2769
2749
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo)
|
|
2770
2750
|
*/
|
|
@@ -2773,7 +2753,7 @@ interface ReadableStream<R = any> {
|
|
|
2773
2753
|
options?: StreamPipeOptions,
|
|
2774
2754
|
): Promise<void>;
|
|
2775
2755
|
/**
|
|
2776
|
-
* The **`tee()`** method of the two-element array containing the two resulting branches as new ReadableStream instances.
|
|
2756
|
+
* The **`tee()`** method of the ReadableStream interface tees the current readable stream, returning a two-element array containing the two resulting branches as new ReadableStream instances.
|
|
2777
2757
|
*
|
|
2778
2758
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee)
|
|
2779
2759
|
*/
|
|
@@ -2784,7 +2764,7 @@ interface ReadableStream<R = any> {
|
|
|
2784
2764
|
): AsyncIterableIterator<R>;
|
|
2785
2765
|
}
|
|
2786
2766
|
/**
|
|
2787
|
-
* The
|
|
2767
|
+
* The **`ReadableStream`** interface of the Streams API represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object.
|
|
2788
2768
|
*
|
|
2789
2769
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2790
2770
|
*/
|
|
@@ -2822,7 +2802,7 @@ declare class ReadableStreamDefaultReader<R = any> {
|
|
|
2822
2802
|
releaseLock(): void;
|
|
2823
2803
|
}
|
|
2824
2804
|
/**
|
|
2825
|
-
* The
|
|
2805
|
+
* The **`ReadableStreamBYOBReader`** interface of the Streams API defines a reader for a ReadableStream that supports zero-copy reading from an underlying byte source. It is used for efficient copying from underlying sources where the data is delivered as an "anonymous" sequence of bytes, such as files.
|
|
2826
2806
|
*
|
|
2827
2807
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader)
|
|
2828
2808
|
*/
|
|
@@ -2831,7 +2811,7 @@ declare class ReadableStreamBYOBReader {
|
|
|
2831
2811
|
get closed(): Promise<void>;
|
|
2832
2812
|
cancel(reason?: any): Promise<void>;
|
|
2833
2813
|
/**
|
|
2834
|
-
* The **`read()`** method of the ReadableStreamBYOBReader interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream.
|
|
2814
|
+
* The **`read()`** method of the ReadableStreamBYOBReader interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream. A request for data will be satisfied from the stream's internal queues if there is any data present. If the stream queues are empty, the request may be supplied as a zero-copy transfer from the underlying byte source.
|
|
2835
2815
|
*
|
|
2836
2816
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
|
|
2837
2817
|
*/
|
|
@@ -2839,7 +2819,7 @@ declare class ReadableStreamBYOBReader {
|
|
|
2839
2819
|
view: T,
|
|
2840
2820
|
): Promise<ReadableStreamReadResult<T>>;
|
|
2841
2821
|
/**
|
|
2842
|
-
* The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
|
|
2822
|
+
* The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream. After the lock is released, the reader is no longer active.
|
|
2843
2823
|
*
|
|
2844
2824
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock)
|
|
2845
2825
|
*/
|
|
@@ -2861,7 +2841,7 @@ interface ReadableStreamGetReaderOptions {
|
|
|
2861
2841
|
mode: "byob";
|
|
2862
2842
|
}
|
|
2863
2843
|
/**
|
|
2864
|
-
* The **`ReadableStreamBYOBRequest`** interface of the Streams API represents a
|
|
2844
|
+
* The **`ReadableStreamBYOBRequest`** interface of the Streams API represents a "pull request" for data from an underlying source that will made as a zero-copy transfer to a consumer (bypassing the stream's internal queues).
|
|
2865
2845
|
*
|
|
2866
2846
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest)
|
|
2867
2847
|
*/
|
|
@@ -2887,13 +2867,13 @@ declare abstract class ReadableStreamBYOBRequest {
|
|
|
2887
2867
|
get atLeast(): number | null;
|
|
2888
2868
|
}
|
|
2889
2869
|
/**
|
|
2890
|
-
* The **`ReadableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a ReadableStream's state and internal queue.
|
|
2870
|
+
* The **`ReadableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a ReadableStream's state and internal queue. Default controllers are for streams that are not byte streams.
|
|
2891
2871
|
*
|
|
2892
2872
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController)
|
|
2893
2873
|
*/
|
|
2894
2874
|
declare abstract class ReadableStreamDefaultController<R = any> {
|
|
2895
2875
|
/**
|
|
2896
|
-
* The **`desiredSize`** read-only property of the required to fill the stream's internal queue.
|
|
2876
|
+
* The **`desiredSize`** read-only property of the ReadableStreamDefaultController interface returns the desired size required to fill the stream's internal queue.
|
|
2897
2877
|
*
|
|
2898
2878
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize)
|
|
2899
2879
|
*/
|
|
@@ -2905,32 +2885,32 @@ declare abstract class ReadableStreamDefaultController<R = any> {
|
|
|
2905
2885
|
*/
|
|
2906
2886
|
close(): void;
|
|
2907
2887
|
/**
|
|
2908
|
-
* The **`enqueue()`** method of the
|
|
2888
|
+
* The **`enqueue()`** method of the ReadableStreamDefaultController interface enqueues a given chunk in the associated stream.
|
|
2909
2889
|
*
|
|
2910
2890
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)
|
|
2911
2891
|
*/
|
|
2912
2892
|
enqueue(chunk?: R): void;
|
|
2913
2893
|
/**
|
|
2914
|
-
* The **`error()`** method of the with the associated stream to error.
|
|
2894
|
+
* The **`error()`** method of the ReadableStreamDefaultController interface causes any future interactions with the associated stream to error.
|
|
2915
2895
|
*
|
|
2916
2896
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error)
|
|
2917
2897
|
*/
|
|
2918
2898
|
error(reason: any): void;
|
|
2919
2899
|
}
|
|
2920
2900
|
/**
|
|
2921
|
-
* The **`ReadableByteStreamController`** interface of the Streams API represents a controller for a readable byte stream.
|
|
2901
|
+
* The **`ReadableByteStreamController`** interface of the Streams API represents a controller for a readable byte stream. It allows control of the state and internal queue of a ReadableStream with an underlying byte source, and enables efficient zero-copy transfer of data from the underlying source to a consumer when the stream's internal queue is empty.
|
|
2922
2902
|
*
|
|
2923
2903
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController)
|
|
2924
2904
|
*/
|
|
2925
2905
|
declare abstract class ReadableByteStreamController {
|
|
2926
2906
|
/**
|
|
2927
|
-
* The **`byobRequest`** read-only property of the ReadableByteStreamController interface returns the current BYOB request, or
|
|
2907
|
+
* The **`byobRequest`** read-only property of the ReadableByteStreamController interface returns the current BYOB request, or null if there are no pending requests.
|
|
2928
2908
|
*
|
|
2929
2909
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest)
|
|
2930
2910
|
*/
|
|
2931
2911
|
get byobRequest(): ReadableStreamBYOBRequest | null;
|
|
2932
2912
|
/**
|
|
2933
|
-
* The **`desiredSize`** read-only property of the ReadableByteStreamController interface returns the number of bytes required to fill the stream's internal queue to its
|
|
2913
|
+
* The **`desiredSize`** read-only property of the ReadableByteStreamController interface returns the number of bytes required to fill the stream's internal queue to its "desired size".
|
|
2934
2914
|
*
|
|
2935
2915
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize)
|
|
2936
2916
|
*/
|
|
@@ -2942,7 +2922,7 @@ declare abstract class ReadableByteStreamController {
|
|
|
2942
2922
|
*/
|
|
2943
2923
|
close(): void;
|
|
2944
2924
|
/**
|
|
2945
|
-
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is
|
|
2925
|
+
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is transferred into the stream's internal queues).
|
|
2946
2926
|
*
|
|
2947
2927
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue)
|
|
2948
2928
|
*/
|
|
@@ -2955,7 +2935,7 @@ declare abstract class ReadableByteStreamController {
|
|
|
2955
2935
|
error(reason: any): void;
|
|
2956
2936
|
}
|
|
2957
2937
|
/**
|
|
2958
|
-
* The **`WritableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a WritableStream's state.
|
|
2938
|
+
* The **`WritableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate.
|
|
2959
2939
|
*
|
|
2960
2940
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
2961
2941
|
*/
|
|
@@ -2967,7 +2947,7 @@ declare abstract class WritableStreamDefaultController {
|
|
|
2967
2947
|
*/
|
|
2968
2948
|
get signal(): AbortSignal;
|
|
2969
2949
|
/**
|
|
2970
|
-
* The **`error()`** method of the with the associated stream to error.
|
|
2950
|
+
* The **`error()`** method of the WritableStreamDefaultController interface causes any future interactions with the associated stream to error.
|
|
2971
2951
|
*
|
|
2972
2952
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error)
|
|
2973
2953
|
*/
|
|
@@ -2992,7 +2972,7 @@ declare abstract class TransformStreamDefaultController<O = any> {
|
|
|
2992
2972
|
*/
|
|
2993
2973
|
enqueue(chunk?: O): void;
|
|
2994
2974
|
/**
|
|
2995
|
-
* The **`error()`** method of the TransformStreamDefaultController interface errors both sides of the stream.
|
|
2975
|
+
* The **`error()`** method of the TransformStreamDefaultController interface errors both sides of the stream. Any further interactions with it will fail with the given error message, and any chunks in the queue will be discarded.
|
|
2996
2976
|
*
|
|
2997
2977
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error)
|
|
2998
2978
|
*/
|
|
@@ -3014,7 +2994,7 @@ interface ReadableWritablePair<R = any, W = any> {
|
|
|
3014
2994
|
writable: WritableStream<W>;
|
|
3015
2995
|
}
|
|
3016
2996
|
/**
|
|
3017
|
-
* The **`WritableStream`** interface of the Streams API provides a standard abstraction for writing streaming data to a destination, known as a sink.
|
|
2997
|
+
* The **`WritableStream`** interface of the Streams API provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing.
|
|
3018
2998
|
*
|
|
3019
2999
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
|
|
3020
3000
|
*/
|
|
@@ -3024,7 +3004,7 @@ declare class WritableStream<W = any> {
|
|
|
3024
3004
|
queuingStrategy?: QueuingStrategy,
|
|
3025
3005
|
);
|
|
3026
3006
|
/**
|
|
3027
|
-
* The **`locked`** read-only property of the WritableStream interface returns a boolean indicating whether the
|
|
3007
|
+
* The **`locked`** read-only property of the WritableStream interface returns a boolean indicating whether the WritableStream is locked to a writer.
|
|
3028
3008
|
*
|
|
3029
3009
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked)
|
|
3030
3010
|
*/
|
|
@@ -3036,70 +3016,70 @@ declare class WritableStream<W = any> {
|
|
|
3036
3016
|
*/
|
|
3037
3017
|
abort(reason?: any): Promise<void>;
|
|
3038
3018
|
/**
|
|
3039
|
-
* The **`close()`** method of the WritableStream interface closes the associated stream.
|
|
3019
|
+
* The **`close()`** method of the WritableStream interface closes the associated stream. All chunks written before this method is called are sent before the returned promise is fulfilled.
|
|
3040
3020
|
*
|
|
3041
3021
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close)
|
|
3042
3022
|
*/
|
|
3043
3023
|
close(): Promise<void>;
|
|
3044
3024
|
/**
|
|
3045
|
-
* The **`getWriter()`** method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance.
|
|
3025
|
+
* The **`getWriter()`** method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance. While the stream is locked, no other writer can be acquired until this one is released.
|
|
3046
3026
|
*
|
|
3047
3027
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter)
|
|
3048
3028
|
*/
|
|
3049
3029
|
getWriter(): WritableStreamDefaultWriter<W>;
|
|
3050
3030
|
}
|
|
3051
3031
|
/**
|
|
3052
|
-
* The **`WritableStreamDefaultWriter`** interface of the Streams API is the object returned by WritableStream.getWriter() and once created locks the writer to the
|
|
3032
|
+
* The **`WritableStreamDefaultWriter`** interface of the Streams API is the object returned by WritableStream.getWriter() and once created locks the writer to the WritableStream ensuring that no other streams can write to the underlying sink.
|
|
3053
3033
|
*
|
|
3054
3034
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
|
|
3055
3035
|
*/
|
|
3056
3036
|
declare class WritableStreamDefaultWriter<W = any> {
|
|
3057
3037
|
constructor(stream: WritableStream);
|
|
3058
3038
|
/**
|
|
3059
|
-
* The **`closed`** read-only property of the the stream errors or the writer's lock is released.
|
|
3039
|
+
* The **`closed`** read-only property of the WritableStreamDefaultWriter interface returns a Promise that fulfills if the stream becomes closed, or rejects if the stream errors or the writer's lock is released.
|
|
3060
3040
|
*
|
|
3061
3041
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed)
|
|
3062
3042
|
*/
|
|
3063
3043
|
get closed(): Promise<void>;
|
|
3064
3044
|
/**
|
|
3065
|
-
* The **`ready`** read-only property of the that resolves when the desired size of the stream's internal queue transitions from non-positive to positive, signaling that it is no longer applying backpressure.
|
|
3045
|
+
* The **`ready`** read-only property of the WritableStreamDefaultWriter interface returns a Promise that resolves when the desired size of the stream's internal queue transitions from non-positive to positive, signaling that it is no longer applying backpressure.
|
|
3066
3046
|
*
|
|
3067
3047
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready)
|
|
3068
3048
|
*/
|
|
3069
3049
|
get ready(): Promise<void>;
|
|
3070
3050
|
/**
|
|
3071
|
-
* The **`desiredSize`** read-only property of the to fill the stream's internal queue.
|
|
3051
|
+
* The **`desiredSize`** read-only property of the WritableStreamDefaultWriter interface returns the desired size required to fill the stream's internal queue.
|
|
3072
3052
|
*
|
|
3073
3053
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize)
|
|
3074
3054
|
*/
|
|
3075
3055
|
get desiredSize(): number | null;
|
|
3076
3056
|
/**
|
|
3077
|
-
* The **`abort()`** method of the the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
|
|
3057
|
+
* The **`abort()`** method of the WritableStreamDefaultWriter interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
|
|
3078
3058
|
*
|
|
3079
3059
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort)
|
|
3080
3060
|
*/
|
|
3081
3061
|
abort(reason?: any): Promise<void>;
|
|
3082
3062
|
/**
|
|
3083
|
-
* The **`close()`** method of the stream.
|
|
3063
|
+
* The **`close()`** method of the WritableStreamDefaultWriter interface closes the associated writable stream.
|
|
3084
3064
|
*
|
|
3085
3065
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close)
|
|
3086
3066
|
*/
|
|
3087
3067
|
close(): Promise<void>;
|
|
3088
3068
|
/**
|
|
3089
|
-
* The **`write()`** method of the operation.
|
|
3069
|
+
* The **`write()`** method of the WritableStreamDefaultWriter interface writes a passed chunk of data to a WritableStream and its underlying sink, then returns a Promise that resolves to indicate the success or failure of the write operation.
|
|
3090
3070
|
*
|
|
3091
3071
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write)
|
|
3092
3072
|
*/
|
|
3093
3073
|
write(chunk?: W): Promise<void>;
|
|
3094
3074
|
/**
|
|
3095
|
-
* The **`releaseLock()`** method of the corresponding stream.
|
|
3075
|
+
* The **`releaseLock()`** method of the WritableStreamDefaultWriter interface releases the writer's lock on the corresponding stream. After the lock is released, the writer is no longer active. If the associated stream is errored when the lock is released, the writer will appear errored in the same way from now on; otherwise, the writer will appear closed.
|
|
3096
3076
|
*
|
|
3097
3077
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock)
|
|
3098
3078
|
*/
|
|
3099
3079
|
releaseLock(): void;
|
|
3100
3080
|
}
|
|
3101
3081
|
/**
|
|
3102
|
-
* The **`TransformStream`** interface of the Streams API represents a concrete implementation of the pipe chain
|
|
3082
|
+
* The **`TransformStream`** interface of the Streams API represents a concrete implementation of the pipe chain transform stream concept.
|
|
3103
3083
|
*
|
|
3104
3084
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream)
|
|
3105
3085
|
*/
|
|
@@ -3110,13 +3090,13 @@ declare class TransformStream<I = any, O = any> {
|
|
|
3110
3090
|
readableStrategy?: QueuingStrategy<O>,
|
|
3111
3091
|
);
|
|
3112
3092
|
/**
|
|
3113
|
-
* The **`readable`** read-only property of the TransformStream interface returns the ReadableStream instance controlled by this
|
|
3093
|
+
* The **`readable`** read-only property of the TransformStream interface returns the ReadableStream instance controlled by this TransformStream. This stream emits the transformed output data.
|
|
3114
3094
|
*
|
|
3115
3095
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable)
|
|
3116
3096
|
*/
|
|
3117
3097
|
get readable(): ReadableStream<O>;
|
|
3118
3098
|
/**
|
|
3119
|
-
* The **`writable`** read-only property of the TransformStream interface returns the WritableStream instance controlled by this
|
|
3099
|
+
* The **`writable`** read-only property of the TransformStream interface returns the WritableStream instance controlled by this TransformStream. This stream accepts input data that will be transformed and emitted to the readable stream.
|
|
3120
3100
|
*
|
|
3121
3101
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable)
|
|
3122
3102
|
*/
|
|
@@ -3141,7 +3121,7 @@ interface ReadableStreamValuesOptions {
|
|
|
3141
3121
|
preventCancel?: boolean;
|
|
3142
3122
|
}
|
|
3143
3123
|
/**
|
|
3144
|
-
* The **`CompressionStream`** interface of the Compression Streams API
|
|
3124
|
+
* The **`CompressionStream`** interface of the Compression Streams API compresses a stream of data. It implements the same shape as a TransformStream, allowing it to be used in ReadableStream.pipeThrough() and similar methods.
|
|
3145
3125
|
*
|
|
3146
3126
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream)
|
|
3147
3127
|
*/
|
|
@@ -3152,7 +3132,7 @@ declare class CompressionStream extends TransformStream<
|
|
|
3152
3132
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
3153
3133
|
}
|
|
3154
3134
|
/**
|
|
3155
|
-
* The **`DecompressionStream`** interface of the Compression Streams API
|
|
3135
|
+
* The **`DecompressionStream`** interface of the Compression Streams API decompresses a stream of data. It implements the same shape as a TransformStream, allowing it to be used in ReadableStream.pipeThrough() and similar methods.
|
|
3156
3136
|
*
|
|
3157
3137
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream)
|
|
3158
3138
|
*/
|
|
@@ -3163,7 +3143,7 @@ declare class DecompressionStream extends TransformStream<
|
|
|
3163
3143
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
3164
3144
|
}
|
|
3165
3145
|
/**
|
|
3166
|
-
* The **`TextEncoderStream`** interface of the Encoding API converts a stream of strings into bytes in the UTF-8 encoding.
|
|
3146
|
+
* The **`TextEncoderStream`** interface of the Encoding API converts a stream of strings into bytes in the UTF-8 encoding. It is the streaming equivalent of TextEncoder. It implements the same shape as a TransformStream, allowing it to be used in ReadableStream.pipeThrough() and similar methods.
|
|
3167
3147
|
*
|
|
3168
3148
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream)
|
|
3169
3149
|
*/
|
|
@@ -3172,7 +3152,7 @@ declare class TextEncoderStream extends TransformStream<string, Uint8Array> {
|
|
|
3172
3152
|
get encoding(): string;
|
|
3173
3153
|
}
|
|
3174
3154
|
/**
|
|
3175
|
-
* The **`TextDecoderStream`** interface of the Encoding API converts a stream of text in a binary encoding, such as UTF-8 etc., to a stream of strings.
|
|
3155
|
+
* The **`TextDecoderStream`** interface of the Encoding API converts a stream of text in a binary encoding, such as UTF-8 etc., to a stream of strings. It is the streaming equivalent of TextDecoder. It implements the same shape as a TransformStream, allowing it to be used in ReadableStream.pipeThrough() and similar methods.
|
|
3176
3156
|
*
|
|
3177
3157
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream)
|
|
3178
3158
|
*/
|
|
@@ -3364,7 +3344,7 @@ interface UnsafeTraceMetrics {
|
|
|
3364
3344
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
3365
3345
|
}
|
|
3366
3346
|
/**
|
|
3367
|
-
* The **`URL`** interface is used to parse, construct, normalize, and encode URL.
|
|
3347
|
+
* The **`URL`** interface is used to parse, construct, normalize, and encode URLs. It works by providing properties which allow you to easily read and modify the components of a URL.
|
|
3368
3348
|
*
|
|
3369
3349
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
3370
3350
|
*/
|
|
@@ -3389,121 +3369,121 @@ declare class URL {
|
|
|
3389
3369
|
*/
|
|
3390
3370
|
set href(value: string);
|
|
3391
3371
|
/**
|
|
3392
|
-
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final
|
|
3372
|
+
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final ":".
|
|
3393
3373
|
*
|
|
3394
3374
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
3395
3375
|
*/
|
|
3396
3376
|
get protocol(): string;
|
|
3397
3377
|
/**
|
|
3398
|
-
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final
|
|
3378
|
+
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final ":".
|
|
3399
3379
|
*
|
|
3400
3380
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
3401
3381
|
*/
|
|
3402
3382
|
set protocol(value: string);
|
|
3403
3383
|
/**
|
|
3404
|
-
* The **`username`** property of the URL interface is a string containing the username component of the URL.
|
|
3384
|
+
* The **`username`** property of the URL interface is a string containing the username component of the URL. If the URL does not have a username, this property contains an empty string, "".
|
|
3405
3385
|
*
|
|
3406
3386
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
3407
3387
|
*/
|
|
3408
3388
|
get username(): string;
|
|
3409
3389
|
/**
|
|
3410
|
-
* The **`username`** property of the URL interface is a string containing the username component of the URL.
|
|
3390
|
+
* The **`username`** property of the URL interface is a string containing the username component of the URL. If the URL does not have a username, this property contains an empty string, "".
|
|
3411
3391
|
*
|
|
3412
3392
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
3413
3393
|
*/
|
|
3414
3394
|
set username(value: string);
|
|
3415
3395
|
/**
|
|
3416
|
-
* The **`password`** property of the URL interface is a string containing the password component of the URL.
|
|
3396
|
+
* The **`password`** property of the URL interface is a string containing the password component of the URL. If the URL does not have a password, this property contains an empty string, "".
|
|
3417
3397
|
*
|
|
3418
3398
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
3419
3399
|
*/
|
|
3420
3400
|
get password(): string;
|
|
3421
3401
|
/**
|
|
3422
|
-
* The **`password`** property of the URL interface is a string containing the password component of the URL.
|
|
3402
|
+
* The **`password`** property of the URL interface is a string containing the password component of the URL. If the URL does not have a password, this property contains an empty string, "".
|
|
3423
3403
|
*
|
|
3424
3404
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
3425
3405
|
*/
|
|
3426
3406
|
set password(value: string);
|
|
3427
3407
|
/**
|
|
3428
|
-
* The **`host`** property of the URL interface is a string containing the host, which is the
|
|
3408
|
+
* The **`host`** property of the URL interface is a string containing the host, which is the hostname, and then, if the port of the URL is nonempty, a ":", followed by the port of the URL. If the URL does not have a hostname, this property contains an empty string, "".
|
|
3429
3409
|
*
|
|
3430
3410
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
3431
3411
|
*/
|
|
3432
3412
|
get host(): string;
|
|
3433
3413
|
/**
|
|
3434
|
-
* The **`host`** property of the URL interface is a string containing the host, which is the
|
|
3414
|
+
* The **`host`** property of the URL interface is a string containing the host, which is the hostname, and then, if the port of the URL is nonempty, a ":", followed by the port of the URL. If the URL does not have a hostname, this property contains an empty string, "".
|
|
3435
3415
|
*
|
|
3436
3416
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
3437
3417
|
*/
|
|
3438
3418
|
set host(value: string);
|
|
3439
3419
|
/**
|
|
3440
|
-
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL.
|
|
3420
|
+
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL. If the URL does not have a hostname, this property contains an empty string, "". IPv4 and IPv6 addresses are normalized, such as stripping leading zeros, and domain names are converted to IDN.
|
|
3441
3421
|
*
|
|
3442
3422
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
3443
3423
|
*/
|
|
3444
3424
|
get hostname(): string;
|
|
3445
3425
|
/**
|
|
3446
|
-
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL.
|
|
3426
|
+
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL. If the URL does not have a hostname, this property contains an empty string, "". IPv4 and IPv6 addresses are normalized, such as stripping leading zeros, and domain names are converted to IDN.
|
|
3447
3427
|
*
|
|
3448
3428
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
3449
3429
|
*/
|
|
3450
3430
|
set hostname(value: string);
|
|
3451
3431
|
/**
|
|
3452
|
-
* The **`port`** property of the URL interface is a string containing the port number of the URL.
|
|
3432
|
+
* The **`port`** property of the URL interface is a string containing the port number of the URL. If the port is the default for the protocol (80 for ws: and http:, 443 for wss: and https:, and 21 for ftp:), this property contains an empty string, "".
|
|
3453
3433
|
*
|
|
3454
3434
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
3455
3435
|
*/
|
|
3456
3436
|
get port(): string;
|
|
3457
3437
|
/**
|
|
3458
|
-
* The **`port`** property of the URL interface is a string containing the port number of the URL.
|
|
3438
|
+
* The **`port`** property of the URL interface is a string containing the port number of the URL. If the port is the default for the protocol (80 for ws: and http:, 443 for wss: and https:, and 21 for ftp:), this property contains an empty string, "".
|
|
3459
3439
|
*
|
|
3460
3440
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
3461
3441
|
*/
|
|
3462
3442
|
set port(value: string);
|
|
3463
3443
|
/**
|
|
3464
|
-
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure.
|
|
3444
|
+
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a / character.
|
|
3465
3445
|
*
|
|
3466
3446
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
3467
3447
|
*/
|
|
3468
3448
|
get pathname(): string;
|
|
3469
3449
|
/**
|
|
3470
|
-
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure.
|
|
3450
|
+
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a / character.
|
|
3471
3451
|
*
|
|
3472
3452
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
3473
3453
|
*/
|
|
3474
3454
|
set pathname(value: string);
|
|
3475
3455
|
/**
|
|
3476
|
-
* The **`search`** property of the URL interface is a search string, also called a
|
|
3456
|
+
* The **`search`** property of the URL interface is a search string, also called a query string, that is a string containing a "?" followed by the parameters of the URL. If the URL does not have a search query, this property contains an empty string, "".
|
|
3477
3457
|
*
|
|
3478
3458
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
3479
3459
|
*/
|
|
3480
3460
|
get search(): string;
|
|
3481
3461
|
/**
|
|
3482
|
-
* The **`search`** property of the URL interface is a search string, also called a
|
|
3462
|
+
* The **`search`** property of the URL interface is a search string, also called a query string, that is a string containing a "?" followed by the parameters of the URL. If the URL does not have a search query, this property contains an empty string, "".
|
|
3483
3463
|
*
|
|
3484
3464
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
3485
3465
|
*/
|
|
3486
3466
|
set search(value: string);
|
|
3487
3467
|
/**
|
|
3488
|
-
* The **`hash`** property of the URL interface is a string containing a
|
|
3468
|
+
* The **`hash`** property of the URL interface is a string containing a "#" followed by the fragment identifier of the URL. If the URL does not have a fragment identifier, this property contains an empty string, "".
|
|
3489
3469
|
*
|
|
3490
3470
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
3491
3471
|
*/
|
|
3492
3472
|
get hash(): string;
|
|
3493
3473
|
/**
|
|
3494
|
-
* The **`hash`** property of the URL interface is a string containing a
|
|
3474
|
+
* The **`hash`** property of the URL interface is a string containing a "#" followed by the fragment identifier of the URL. If the URL does not have a fragment identifier, this property contains an empty string, "".
|
|
3495
3475
|
*
|
|
3496
3476
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
3497
3477
|
*/
|
|
3498
3478
|
set hash(value: string);
|
|
3499
3479
|
/**
|
|
3500
|
-
* The **`searchParams`** read-only property of the access to the
|
|
3480
|
+
* The **`searchParams`** read-only property of the URL interface returns a URLSearchParams object allowing access to the GET decoded query arguments contained in the URL.
|
|
3501
3481
|
*
|
|
3502
3482
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams)
|
|
3503
3483
|
*/
|
|
3504
3484
|
get searchParams(): URLSearchParams;
|
|
3505
3485
|
/**
|
|
3506
|
-
* The **`toJSON()`** method of the URL interface returns a string containing a serialized version of the URL, although in practice it seems to have the same effect as
|
|
3486
|
+
* The **`toJSON()`** method of the URL interface returns a string containing a serialized version of the URL, although in practice it seems to have the same effect as URL.toString().
|
|
3507
3487
|
*
|
|
3508
3488
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON)
|
|
3509
3489
|
*/
|
|
@@ -3523,13 +3503,13 @@ declare class URL {
|
|
|
3523
3503
|
*/
|
|
3524
3504
|
static parse(url: string, base?: string): URL | null;
|
|
3525
3505
|
/**
|
|
3526
|
-
* The **`createObjectURL()`** static method of the URL interface creates a string containing a URL
|
|
3506
|
+
* The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter.
|
|
3527
3507
|
*
|
|
3528
3508
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static)
|
|
3529
3509
|
*/
|
|
3530
3510
|
static createObjectURL(object: File | Blob): string;
|
|
3531
3511
|
/**
|
|
3532
|
-
* The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling
|
|
3512
|
+
* The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL().
|
|
3533
3513
|
*
|
|
3534
3514
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static)
|
|
3535
3515
|
*/
|
|
@@ -3581,22 +3561,19 @@ declare class URLSearchParams {
|
|
|
3581
3561
|
*/
|
|
3582
3562
|
has(name: string, value?: string): boolean;
|
|
3583
3563
|
/**
|
|
3584
|
-
* The **`set()`** method of the URLSearchParams interface sets the value associated with a given search parameter to the given value.
|
|
3564
|
+
* The **`set()`** method of the URLSearchParams interface sets the value associated with a given search parameter to the given value. If there were several matching values, this method deletes the others. If the search parameter doesn't exist, this method creates it.
|
|
3585
3565
|
*
|
|
3586
3566
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
3587
3567
|
*/
|
|
3588
3568
|
set(name: string, value: string): void;
|
|
3589
3569
|
/**
|
|
3590
|
-
* The **`URLSearchParams.sort()`** method sorts all key/value pairs contained in this object in place and returns
|
|
3570
|
+
* The **`URLSearchParams.sort()`** method sorts all key/value pairs contained in this object in place and returns undefined. Key/value pairs are sorted by the values of the UTF-16 code units of the keys. This method uses a stable sorting algorithm (i.e., the relative order between key/value pairs with equal keys will be preserved).
|
|
3591
3571
|
*
|
|
3592
3572
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort)
|
|
3593
3573
|
*/
|
|
3594
3574
|
sort(): void;
|
|
3595
|
-
/* Returns an array of key, value pairs for every entry in the search params. */
|
|
3596
3575
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
3597
|
-
/* Returns a list of keys in the search params. */
|
|
3598
3576
|
keys(): IterableIterator<string>;
|
|
3599
|
-
/* Returns a list of values in the search params. */
|
|
3600
3577
|
values(): IterableIterator<string>;
|
|
3601
3578
|
forEach<This = unknown>(
|
|
3602
3579
|
callback: (
|
|
@@ -3611,22 +3588,82 @@ declare class URLSearchParams {
|
|
|
3611
3588
|
toString(): string;
|
|
3612
3589
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
3613
3590
|
}
|
|
3591
|
+
/**
|
|
3592
|
+
* The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. The pattern can contain capturing groups that extract parts of the matched URL.
|
|
3593
|
+
*
|
|
3594
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern)
|
|
3595
|
+
*/
|
|
3614
3596
|
declare class URLPattern {
|
|
3615
3597
|
constructor(
|
|
3616
3598
|
input?: string | URLPatternInit,
|
|
3617
3599
|
baseURL?: string | URLPatternOptions,
|
|
3618
3600
|
patternOptions?: URLPatternOptions,
|
|
3619
3601
|
);
|
|
3602
|
+
/**
|
|
3603
|
+
* The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL.
|
|
3604
|
+
*
|
|
3605
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol)
|
|
3606
|
+
*/
|
|
3620
3607
|
get protocol(): string;
|
|
3608
|
+
/**
|
|
3609
|
+
* The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL.
|
|
3610
|
+
*
|
|
3611
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username)
|
|
3612
|
+
*/
|
|
3621
3613
|
get username(): string;
|
|
3614
|
+
/**
|
|
3615
|
+
* The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL.
|
|
3616
|
+
*
|
|
3617
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password)
|
|
3618
|
+
*/
|
|
3622
3619
|
get password(): string;
|
|
3620
|
+
/**
|
|
3621
|
+
* The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL.
|
|
3622
|
+
*
|
|
3623
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname)
|
|
3624
|
+
*/
|
|
3623
3625
|
get hostname(): string;
|
|
3626
|
+
/**
|
|
3627
|
+
* The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL.
|
|
3628
|
+
*
|
|
3629
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port)
|
|
3630
|
+
*/
|
|
3624
3631
|
get port(): string;
|
|
3632
|
+
/**
|
|
3633
|
+
* The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL.
|
|
3634
|
+
*
|
|
3635
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname)
|
|
3636
|
+
*/
|
|
3625
3637
|
get pathname(): string;
|
|
3638
|
+
/**
|
|
3639
|
+
* The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL.
|
|
3640
|
+
*
|
|
3641
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search)
|
|
3642
|
+
*/
|
|
3626
3643
|
get search(): string;
|
|
3644
|
+
/**
|
|
3645
|
+
* The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL.
|
|
3646
|
+
*
|
|
3647
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash)
|
|
3648
|
+
*/
|
|
3627
3649
|
get hash(): string;
|
|
3650
|
+
/**
|
|
3651
|
+
* The **`hasRegExpGroups`** read-only property of the URLPattern interface is a boolean indicating whether or not any of the URLPattern components contain regular expression capturing groups.
|
|
3652
|
+
*
|
|
3653
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hasRegExpGroups)
|
|
3654
|
+
*/
|
|
3628
3655
|
get hasRegExpGroups(): boolean;
|
|
3656
|
+
/**
|
|
3657
|
+
* The **`test()`** method of the URLPattern interface takes a URL string or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
|
|
3658
|
+
*
|
|
3659
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
|
|
3660
|
+
*/
|
|
3629
3661
|
test(input?: string | URLPatternInit, baseURL?: string): boolean;
|
|
3662
|
+
/**
|
|
3663
|
+
* The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or null if the URL does not match the pattern.
|
|
3664
|
+
*
|
|
3665
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec)
|
|
3666
|
+
*/
|
|
3630
3667
|
exec(
|
|
3631
3668
|
input?: string | URLPatternInit,
|
|
3632
3669
|
baseURL?: string,
|
|
@@ -3662,7 +3699,7 @@ interface URLPatternOptions {
|
|
|
3662
3699
|
ignoreCase?: boolean;
|
|
3663
3700
|
}
|
|
3664
3701
|
/**
|
|
3665
|
-
* A
|
|
3702
|
+
* A **`CloseEvent`** is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute.
|
|
3666
3703
|
*
|
|
3667
3704
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
|
|
3668
3705
|
*/
|
|
@@ -3681,7 +3718,7 @@ declare class CloseEvent extends Event {
|
|
|
3681
3718
|
*/
|
|
3682
3719
|
readonly reason: string;
|
|
3683
3720
|
/**
|
|
3684
|
-
* The **`wasClean`** read-only property of the CloseEvent interface returns
|
|
3721
|
+
* The **`wasClean`** read-only property of the CloseEvent interface returns true if the connection closed cleanly.
|
|
3685
3722
|
*
|
|
3686
3723
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/wasClean)
|
|
3687
3724
|
*/
|
|
@@ -3699,7 +3736,7 @@ type WebSocketEventMap = {
|
|
|
3699
3736
|
error: ErrorEvent;
|
|
3700
3737
|
};
|
|
3701
3738
|
/**
|
|
3702
|
-
* The
|
|
3739
|
+
* The **`WebSocket`** object provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
|
|
3703
3740
|
*
|
|
3704
3741
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
3705
3742
|
*/
|
|
@@ -3716,20 +3753,20 @@ declare var WebSocket: {
|
|
|
3716
3753
|
readonly CLOSED: number;
|
|
3717
3754
|
};
|
|
3718
3755
|
/**
|
|
3719
|
-
* The
|
|
3756
|
+
* The **`WebSocket`** object provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
|
|
3720
3757
|
*
|
|
3721
3758
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
3722
3759
|
*/
|
|
3723
3760
|
interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
3724
3761
|
accept(options?: WebSocketAcceptOptions): void;
|
|
3725
3762
|
/**
|
|
3726
|
-
* The **`WebSocket.send()`** method enqueues the specified data to be transmitted to the server over the WebSocket connection, increasing the value of
|
|
3763
|
+
* The **`WebSocket.send()`** method enqueues the specified data to be transmitted to the server over the WebSocket connection, increasing the value of bufferedAmount by the number of bytes needed to contain the data. If the data can't be sent (for example, because it needs to be buffered but the buffer is full), the socket is closed automatically. The browser will throw an exception if you call send() when the connection is in the CONNECTING state. If you call send() when the connection is in the CLOSING or CLOSED states, the browser will silently discard the data.
|
|
3727
3764
|
*
|
|
3728
3765
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/send)
|
|
3729
3766
|
*/
|
|
3730
3767
|
send(message: (ArrayBuffer | ArrayBufferView) | string): void;
|
|
3731
3768
|
/**
|
|
3732
|
-
* The **`WebSocket.close()`** method closes the already
|
|
3769
|
+
* The **`WebSocket.close()`** method closes the WebSocket connection or connection attempt, if any. If the connection is already CLOSED, this method does nothing.
|
|
3733
3770
|
*
|
|
3734
3771
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/close)
|
|
3735
3772
|
*/
|
|
@@ -3749,13 +3786,13 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
3749
3786
|
*/
|
|
3750
3787
|
url: string | null;
|
|
3751
3788
|
/**
|
|
3752
|
-
* The **`WebSocket.protocol`** read-only property returns the name of the sub-protocol the server selected; this will be one of the strings specified in the
|
|
3789
|
+
* The **`WebSocket.protocol`** read-only property returns the name of the sub-protocol the server selected; this will be one of the strings specified in the protocols parameter when creating the WebSocket object, or the empty string if no connection is established.
|
|
3753
3790
|
*
|
|
3754
3791
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/protocol)
|
|
3755
3792
|
*/
|
|
3756
3793
|
protocol: string | null;
|
|
3757
3794
|
/**
|
|
3758
|
-
* The **`WebSocket.extensions`** read-only property returns the extensions selected by the server.
|
|
3795
|
+
* The **`WebSocket.extensions`** read-only property returns the extensions selected by the server. This is currently only the empty string or a list of extensions as negotiated by the connection.
|
|
3759
3796
|
*
|
|
3760
3797
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
3761
3798
|
*/
|
|
@@ -3848,25 +3885,25 @@ interface SocketInfo {
|
|
|
3848
3885
|
declare class EventSource extends EventTarget {
|
|
3849
3886
|
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
3850
3887
|
/**
|
|
3851
|
-
* The **`close()`** method of the EventSource interface closes the connection, if one is made, and sets the
|
|
3888
|
+
* The **`close()`** method of the EventSource interface closes the connection, if one is made, and sets the EventSource.readyState attribute to 2 (closed).
|
|
3852
3889
|
*
|
|
3853
3890
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close)
|
|
3854
3891
|
*/
|
|
3855
3892
|
close(): void;
|
|
3856
3893
|
/**
|
|
3857
|
-
* The **`url`** read-only property of the URL of the source.
|
|
3894
|
+
* The **`url`** read-only property of the EventSource interface returns a string representing the URL of the source.
|
|
3858
3895
|
*
|
|
3859
3896
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url)
|
|
3860
3897
|
*/
|
|
3861
3898
|
get url(): string;
|
|
3862
3899
|
/**
|
|
3863
|
-
* The **`withCredentials`** read-only property of the the
|
|
3900
|
+
* The **`withCredentials`** read-only property of the EventSource interface returns a boolean value indicating whether the EventSource object was instantiated with CORS credentials set.
|
|
3864
3901
|
*
|
|
3865
3902
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials)
|
|
3866
3903
|
*/
|
|
3867
3904
|
get withCredentials(): boolean;
|
|
3868
3905
|
/**
|
|
3869
|
-
* The **`readyState`** read-only property of the connection.
|
|
3906
|
+
* The **`readyState`** read-only property of the EventSource interface returns a number representing the state of the connection.
|
|
3870
3907
|
*
|
|
3871
3908
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
3872
3909
|
*/
|
|
@@ -3983,7 +4020,7 @@ interface ContainerStartResources {
|
|
|
3983
4020
|
*/
|
|
3984
4021
|
declare abstract class MessagePort extends EventTarget {
|
|
3985
4022
|
/**
|
|
3986
|
-
* The **`postMessage()`** method of the transfers ownership of objects to other browsing contexts.
|
|
4023
|
+
* The **`postMessage()`** method of the MessagePort interface sends a message from the port, and optionally, transfers ownership of objects to other browsing contexts.
|
|
3987
4024
|
*
|
|
3988
4025
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/postMessage)
|
|
3989
4026
|
*/
|
|
@@ -3992,13 +4029,13 @@ declare abstract class MessagePort extends EventTarget {
|
|
|
3992
4029
|
options?: any[] | MessagePortPostMessageOptions,
|
|
3993
4030
|
): void;
|
|
3994
4031
|
/**
|
|
3995
|
-
* The **`close()`** method of the MessagePort interface disconnects the port, so it is no longer active.
|
|
4032
|
+
* The **`close()`** method of the MessagePort interface disconnects the port, so it is no longer active. This stops the flow of messages to that port.
|
|
3996
4033
|
*
|
|
3997
4034
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/close)
|
|
3998
4035
|
*/
|
|
3999
4036
|
close(): void;
|
|
4000
4037
|
/**
|
|
4001
|
-
* The **`start()`** method of the MessagePort interface starts the sending of messages queued on the port.
|
|
4038
|
+
* The **`start()`** method of the MessagePort interface starts the sending of messages queued on the port. This method is only needed when using EventTarget.addEventListener; it is implied when using onmessage.
|
|
4002
4039
|
*
|
|
4003
4040
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/start)
|
|
4004
4041
|
*/
|
|
@@ -4014,13 +4051,13 @@ declare abstract class MessagePort extends EventTarget {
|
|
|
4014
4051
|
declare class MessageChannel {
|
|
4015
4052
|
constructor();
|
|
4016
4053
|
/**
|
|
4017
|
-
* The **`port1`** read-only property of the the port attached to the context that originated the channel.
|
|
4054
|
+
* The **`port1`** read-only property of the MessageChannel interface returns the first port of the message channel — the port attached to the context that originated the channel.
|
|
4018
4055
|
*
|
|
4019
4056
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel/port1)
|
|
4020
4057
|
*/
|
|
4021
4058
|
readonly port1: MessagePort;
|
|
4022
4059
|
/**
|
|
4023
|
-
* The **`port2`** read-only property of the the port attached to the context at the other end of the channel, which the message is initially sent to.
|
|
4060
|
+
* The **`port2`** read-only property of the MessageChannel interface returns the second port of the message channel — the port attached to the context at the other end of the channel, which the message is initially sent to.
|
|
4024
4061
|
*
|
|
4025
4062
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel/port2)
|
|
4026
4063
|
*/
|
|
@@ -4140,7 +4177,7 @@ declare abstract class Performance extends EventTarget {
|
|
|
4140
4177
|
*/
|
|
4141
4178
|
clearMeasures(name?: string): void;
|
|
4142
4179
|
/**
|
|
4143
|
-
* The **`clearResourceTimings()`** method removes all performance entries with an
|
|
4180
|
+
* The **`clearResourceTimings()`** method removes all performance entries with an entryType of "resource" from the browser's performance timeline and sets the size of the performance resource data buffer to zero.
|
|
4144
4181
|
*
|
|
4145
4182
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearResourceTimings)
|
|
4146
4183
|
*/
|
|
@@ -4152,13 +4189,13 @@ declare abstract class Performance extends EventTarget {
|
|
|
4152
4189
|
*/
|
|
4153
4190
|
getEntries(): PerformanceEntry[];
|
|
4154
4191
|
/**
|
|
4155
|
-
* The **`getEntriesByName()`** method returns an array of PerformanceEntry objects currently present in the performance timeline with the given
|
|
4192
|
+
* The **`getEntriesByName()`** method returns an array of PerformanceEntry objects currently present in the performance timeline with the given name and type.
|
|
4156
4193
|
*
|
|
4157
4194
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByName)
|
|
4158
4195
|
*/
|
|
4159
4196
|
getEntriesByName(name: string, type?: string): PerformanceEntry[];
|
|
4160
4197
|
/**
|
|
4161
|
-
* The **`getEntriesByType()`** method returns an array of PerformanceEntry objects currently present in the performance timeline for a given
|
|
4198
|
+
* The **`getEntriesByType()`** method returns an array of PerformanceEntry objects currently present in the performance timeline for a given type.
|
|
4162
4199
|
*
|
|
4163
4200
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByType)
|
|
4164
4201
|
*/
|
|
@@ -4180,13 +4217,13 @@ declare abstract class Performance extends EventTarget {
|
|
|
4180
4217
|
maybeEndMark?: string,
|
|
4181
4218
|
): PerformanceMeasure;
|
|
4182
4219
|
/**
|
|
4183
|
-
* The **`setResourceTimingBufferSize()`** method sets the desired size of the browser's resource timing buffer which stores the
|
|
4220
|
+
* The **`setResourceTimingBufferSize()`** method sets the desired size of the browser's resource timing buffer which stores the "resource" performance entries.
|
|
4184
4221
|
*
|
|
4185
4222
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize)
|
|
4186
4223
|
*/
|
|
4187
4224
|
setResourceTimingBufferSize(size: number): void;
|
|
4188
4225
|
/**
|
|
4189
|
-
* The **`toJSON()`** method of the Performance interface is a
|
|
4226
|
+
* The **`toJSON()`** method of the Performance interface is a serializer; it returns a JSON representation of the Performance object.
|
|
4190
4227
|
*
|
|
4191
4228
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
|
|
4192
4229
|
*/
|
|
@@ -4218,14 +4255,14 @@ interface UvMetricsInfo {
|
|
|
4218
4255
|
eventsWaiting: number;
|
|
4219
4256
|
}
|
|
4220
4257
|
/**
|
|
4221
|
-
* **`PerformanceMark`** is an interface for PerformanceEntry objects with an
|
|
4258
|
+
* **`PerformanceMark`** is an interface for PerformanceEntry objects with an entryType of "mark".
|
|
4222
4259
|
*
|
|
4223
4260
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark)
|
|
4224
4261
|
*/
|
|
4225
4262
|
declare class PerformanceMark extends PerformanceEntry {
|
|
4226
4263
|
constructor(name: string, maybeOptions?: PerformanceMarkOptions);
|
|
4227
4264
|
/**
|
|
4228
|
-
* The read-only **`detail`** property returns arbitrary metadata that was included in the mark upon construction (either when using
|
|
4265
|
+
* The read-only **`detail`** property returns arbitrary metadata that was included in the mark upon construction (either when using performance.mark() or the PerformanceMark() constructor).
|
|
4229
4266
|
*
|
|
4230
4267
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail)
|
|
4231
4268
|
*/
|
|
@@ -4233,13 +4270,13 @@ declare class PerformanceMark extends PerformanceEntry {
|
|
|
4233
4270
|
toJSON(): object;
|
|
4234
4271
|
}
|
|
4235
4272
|
/**
|
|
4236
|
-
* **`PerformanceMeasure`** is an
|
|
4273
|
+
* **`PerformanceMeasure`** is an abstract interface for PerformanceEntry objects with an entryType of "measure". Entries of this type are created by calling performance.measure() to add a named DOMHighResTimeStamp (the measure) between two marks to the browser's performance timeline.
|
|
4237
4274
|
*
|
|
4238
4275
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure)
|
|
4239
4276
|
*/
|
|
4240
4277
|
declare abstract class PerformanceMeasure extends PerformanceEntry {
|
|
4241
4278
|
/**
|
|
4242
|
-
* The read-only **`detail`** property returns arbitrary metadata that was included in the mark upon construction (when using
|
|
4279
|
+
* The read-only **`detail`** property returns arbitrary metadata that was included in the mark upon construction (when using performance.measure().
|
|
4243
4280
|
*
|
|
4244
4281
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail)
|
|
4245
4282
|
*/
|
|
@@ -4257,25 +4294,25 @@ interface PerformanceMeasureOptions {
|
|
|
4257
4294
|
end?: number;
|
|
4258
4295
|
}
|
|
4259
4296
|
/**
|
|
4260
|
-
* The **`PerformanceObserverEntryList`** interface is a list of
|
|
4297
|
+
* The **`PerformanceObserverEntryList`** interface is a list of performance events that were explicitly observed via the observe() method.
|
|
4261
4298
|
*
|
|
4262
4299
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList)
|
|
4263
4300
|
*/
|
|
4264
4301
|
declare abstract class PerformanceObserverEntryList {
|
|
4265
4302
|
/**
|
|
4266
|
-
* The **`getEntries()`** method of the PerformanceObserverEntryList interface returns a list of explicitly observed
|
|
4303
|
+
* The **`getEntries()`** method of the PerformanceObserverEntryList interface returns a list of explicitly observed performance entry objects. The list's members are determined by the set of entry types specified in the call to the observe() method. The list is available in the observer's callback function (as the first parameter in the callback).
|
|
4267
4304
|
*
|
|
4268
4305
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntries)
|
|
4269
4306
|
*/
|
|
4270
4307
|
getEntries(): PerformanceEntry[];
|
|
4271
4308
|
/**
|
|
4272
|
-
* The **`getEntriesByType()`** method of the PerformanceObserverEntryList returns a list of explicitly
|
|
4309
|
+
* The **`getEntriesByType()`** method of the PerformanceObserverEntryList returns a list of explicitly observed performance entry objects for a given performance entry type. The list's members are determined by the set of entry types specified in the call to the observe() method. The list is available in the observer's callback function (as the first parameter in the callback).
|
|
4273
4310
|
*
|
|
4274
4311
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntriesByType)
|
|
4275
4312
|
*/
|
|
4276
4313
|
getEntriesByType(type: string): PerformanceEntry[];
|
|
4277
4314
|
/**
|
|
4278
|
-
* The **`getEntriesByName()`** method of the PerformanceObserverEntryList interface returns a list of explicitly observed PerformanceEntry objects for a given
|
|
4315
|
+
* The **`getEntriesByName()`** method of the PerformanceObserverEntryList interface returns a list of explicitly observed PerformanceEntry objects for a given name and entryType. The list's members are determined by the set of entry types specified in the call to the observe() method. The list is available in the observer's callback function (as the first parameter in the callback).
|
|
4279
4316
|
*
|
|
4280
4317
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntriesByName)
|
|
4281
4318
|
*/
|
|
@@ -4288,7 +4325,7 @@ declare abstract class PerformanceObserverEntryList {
|
|
|
4288
4325
|
*/
|
|
4289
4326
|
declare abstract class PerformanceEntry {
|
|
4290
4327
|
/**
|
|
4291
|
-
* The read-only **`name`** property of the PerformanceEntry interface is a string representing the name for a performance entry.
|
|
4328
|
+
* The read-only **`name`** property of the PerformanceEntry interface is a string representing the name for a performance entry. It acts as an identifier, but it does not have to be unique. The value depends on the subclass.
|
|
4292
4329
|
*
|
|
4293
4330
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name)
|
|
4294
4331
|
*/
|
|
@@ -4300,68 +4337,68 @@ declare abstract class PerformanceEntry {
|
|
|
4300
4337
|
*/
|
|
4301
4338
|
get entryType(): string;
|
|
4302
4339
|
/**
|
|
4303
|
-
* The read-only **`startTime`** property returns the first
|
|
4340
|
+
* The read-only **`startTime`** property returns the first timestamp recorded for this PerformanceEntry. The meaning of this property depends on the value of this entry's entryType.
|
|
4304
4341
|
*
|
|
4305
4342
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime)
|
|
4306
4343
|
*/
|
|
4307
4344
|
get startTime(): number;
|
|
4308
4345
|
/**
|
|
4309
|
-
* The read-only **`duration`** property returns a
|
|
4346
|
+
* The read-only **`duration`** property returns a timestamp that is the duration of the performance entry. The meaning of this property depends on the value of this entry's entryType.
|
|
4310
4347
|
*
|
|
4311
4348
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration)
|
|
4312
4349
|
*/
|
|
4313
4350
|
get duration(): number;
|
|
4314
4351
|
/**
|
|
4315
|
-
* The **`toJSON()`** method is a
|
|
4352
|
+
* The **`toJSON()`** method is a serializer; it returns a JSON representation of the PerformanceEntry object.
|
|
4316
4353
|
*
|
|
4317
4354
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON)
|
|
4318
4355
|
*/
|
|
4319
4356
|
toJSON(): object;
|
|
4320
4357
|
}
|
|
4321
4358
|
/**
|
|
4322
|
-
* The **`PerformanceResourceTiming`** interface enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources.
|
|
4359
|
+
* The **`PerformanceResourceTiming`** interface enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources. An application can use the timing metrics to determine, for example, the length of time it takes to fetch a specific resource, such as an XMLHttpRequest, <SVG>, image, or script.
|
|
4323
4360
|
*
|
|
4324
4361
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming)
|
|
4325
4362
|
*/
|
|
4326
4363
|
declare abstract class PerformanceResourceTiming extends PerformanceEntry {
|
|
4327
4364
|
/**
|
|
4328
|
-
* The **`connectEnd`** read-only property returns the
|
|
4365
|
+
* The **`connectEnd`** read-only property returns the timestamp immediately after the browser finishes establishing the connection to the server to retrieve the resource. The timestamp value includes the time interval to establish the transport connection, as well as other time intervals such as TLS handshake and SOCKS authentication.
|
|
4329
4366
|
*
|
|
4330
4367
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectEnd)
|
|
4331
4368
|
*/
|
|
4332
4369
|
get connectEnd(): number;
|
|
4333
4370
|
/**
|
|
4334
|
-
* The **`connectStart`** read-only property returns the
|
|
4371
|
+
* The **`connectStart`** read-only property returns the timestamp immediately before the user agent starts establishing the connection to the server to retrieve the resource.
|
|
4335
4372
|
*
|
|
4336
4373
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectStart)
|
|
4337
4374
|
*/
|
|
4338
4375
|
get connectStart(): number;
|
|
4339
4376
|
/**
|
|
4340
|
-
* The **`decodedBodySize`** read-only property returns the size (in octets) received from the fetch (HTTP or cache) of the message body after removing any applied content encoding (like gzip or Brotli).
|
|
4377
|
+
* The **`decodedBodySize`** read-only property returns the size (in octets) received from the fetch (HTTP or cache) of the message body after removing any applied content encoding (like gzip or Brotli). If the resource is retrieved from an application cache or local resources, it returns the size of the payload after removing any applied content encoding.
|
|
4341
4378
|
*
|
|
4342
4379
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/decodedBodySize)
|
|
4343
4380
|
*/
|
|
4344
4381
|
get decodedBodySize(): number;
|
|
4345
4382
|
/**
|
|
4346
|
-
* The **`domainLookupEnd`** read-only property returns the
|
|
4383
|
+
* The **`domainLookupEnd`** read-only property returns the timestamp immediately after the browser finishes the domain-name lookup for the resource.
|
|
4347
4384
|
*
|
|
4348
4385
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/domainLookupEnd)
|
|
4349
4386
|
*/
|
|
4350
4387
|
get domainLookupEnd(): number;
|
|
4351
4388
|
/**
|
|
4352
|
-
* The **`domainLookupStart`** read-only property returns the
|
|
4389
|
+
* The **`domainLookupStart`** read-only property returns the timestamp immediately before the browser starts the domain name lookup for the resource.
|
|
4353
4390
|
*
|
|
4354
4391
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/domainLookupStart)
|
|
4355
4392
|
*/
|
|
4356
4393
|
get domainLookupStart(): number;
|
|
4357
4394
|
/**
|
|
4358
|
-
* The **`encodedBodySize`** read-only property represents the size (in octets) received from the fetch (HTTP or cache) of the payload body before removing any applied content encodings (like gzip or Brotli).
|
|
4395
|
+
* The **`encodedBodySize`** read-only property represents the size (in octets) received from the fetch (HTTP or cache) of the payload body before removing any applied content encodings (like gzip or Brotli). If the resource is retrieved from an application cache or a local resource, it must return the size of the payload body before removing any applied content encoding.
|
|
4359
4396
|
*
|
|
4360
4397
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/encodedBodySize)
|
|
4361
4398
|
*/
|
|
4362
4399
|
get encodedBodySize(): number;
|
|
4363
4400
|
/**
|
|
4364
|
-
* The **`fetchStart`** read-only property represents a
|
|
4401
|
+
* The **`fetchStart`** read-only property represents a timestamp immediately before the browser starts to fetch the resource.
|
|
4365
4402
|
*
|
|
4366
4403
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/fetchStart)
|
|
4367
4404
|
*/
|
|
@@ -4379,31 +4416,31 @@ declare abstract class PerformanceResourceTiming extends PerformanceEntry {
|
|
|
4379
4416
|
*/
|
|
4380
4417
|
get nextHopProtocol(): string;
|
|
4381
4418
|
/**
|
|
4382
|
-
* The **`redirectEnd`** read-only property returns a
|
|
4419
|
+
* The **`redirectEnd`** read-only property returns a timestamp immediately after receiving the last byte of the response of the last redirect.
|
|
4383
4420
|
*
|
|
4384
4421
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/redirectEnd)
|
|
4385
4422
|
*/
|
|
4386
4423
|
get redirectEnd(): number;
|
|
4387
4424
|
/**
|
|
4388
|
-
* The **`redirectStart`** read-only property returns a
|
|
4425
|
+
* The **`redirectStart`** read-only property returns a timestamp representing the start time of the fetch which that initiates the redirect.
|
|
4389
4426
|
*
|
|
4390
4427
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/redirectStart)
|
|
4391
4428
|
*/
|
|
4392
4429
|
get redirectStart(): number;
|
|
4393
4430
|
/**
|
|
4394
|
-
* The **`requestStart`** read-only property returns a
|
|
4431
|
+
* The **`requestStart`** read-only property returns a timestamp of the time immediately before the browser starts requesting the resource from the server, cache, or local resource. If the transport connection fails and the browser retries the request, the value returned will be the start of the retry request.
|
|
4395
4432
|
*
|
|
4396
4433
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/requestStart)
|
|
4397
4434
|
*/
|
|
4398
4435
|
get requestStart(): number;
|
|
4399
4436
|
/**
|
|
4400
|
-
* The **`responseEnd`** read-only property returns a
|
|
4437
|
+
* The **`responseEnd`** read-only property returns a timestamp immediately after the browser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first.
|
|
4401
4438
|
*
|
|
4402
4439
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseEnd)
|
|
4403
4440
|
*/
|
|
4404
4441
|
get responseEnd(): number;
|
|
4405
4442
|
/**
|
|
4406
|
-
* The **`responseStart`** read-only property returns a
|
|
4443
|
+
* The **`responseStart`** read-only property returns a timestamp immediately after the browser receives the first byte of the response from the server, cache, or local resource.
|
|
4407
4444
|
*
|
|
4408
4445
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStart)
|
|
4409
4446
|
*/
|
|
@@ -4415,39 +4452,39 @@ declare abstract class PerformanceResourceTiming extends PerformanceEntry {
|
|
|
4415
4452
|
*/
|
|
4416
4453
|
get responseStatus(): number;
|
|
4417
4454
|
/**
|
|
4418
|
-
* The **`secureConnectionStart`** read-only property returns a
|
|
4455
|
+
* The **`secureConnectionStart`** read-only property returns a timestamp immediately before the browser starts the handshake process to secure the current connection. If a secure connection is not used, the property returns zero.
|
|
4419
4456
|
*
|
|
4420
4457
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/secureConnectionStart)
|
|
4421
4458
|
*/
|
|
4422
4459
|
get secureConnectionStart(): number | undefined;
|
|
4423
4460
|
/**
|
|
4424
|
-
* The **`transferSize`** read-only property represents the size (in octets) of the fetched resource.
|
|
4461
|
+
* The **`transferSize`** read-only property represents the size (in octets) of the fetched resource. The size includes the response header fields plus the response payload body (as defined by RFC7230).
|
|
4425
4462
|
*
|
|
4426
4463
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize)
|
|
4427
4464
|
*/
|
|
4428
4465
|
get transferSize(): number;
|
|
4429
4466
|
/**
|
|
4430
|
-
* The **`workerStart`** read-only property of the PerformanceResourceTiming interface returns a
|
|
4467
|
+
* The **`workerStart`** read-only property of the PerformanceResourceTiming interface returns a DOMHighResTimeStamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running. If the resource is not intercepted by a Service Worker the property will always return 0.
|
|
4431
4468
|
*
|
|
4432
4469
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/workerStart)
|
|
4433
4470
|
*/
|
|
4434
4471
|
get workerStart(): number;
|
|
4435
4472
|
}
|
|
4436
4473
|
/**
|
|
4437
|
-
* The **`PerformanceObserver`** interface is used to observe performance measurement events and be notified of new
|
|
4474
|
+
* The **`PerformanceObserver`** interface is used to observe performance measurement events and be notified of new performance entries as they are recorded in the browser's performance timeline.
|
|
4438
4475
|
*
|
|
4439
4476
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver)
|
|
4440
4477
|
*/
|
|
4441
4478
|
declare class PerformanceObserver {
|
|
4442
4479
|
constructor(callback: any);
|
|
4443
4480
|
/**
|
|
4444
|
-
* The **`disconnect()`** method of the PerformanceObserver interface is used to stop the performance observer from receiving any
|
|
4481
|
+
* The **`disconnect()`** method of the PerformanceObserver interface is used to stop the performance observer from receiving any performance entry events.
|
|
4445
4482
|
*
|
|
4446
4483
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/disconnect)
|
|
4447
4484
|
*/
|
|
4448
4485
|
disconnect(): void;
|
|
4449
4486
|
/**
|
|
4450
|
-
* The **`observe()`** method of the
|
|
4487
|
+
* The **`observe()`** method of the PerformanceObserver interface is used to specify the set of performance entry types to observe.
|
|
4451
4488
|
*
|
|
4452
4489
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/observe)
|
|
4453
4490
|
*/
|
|
@@ -5034,10 +5071,7 @@ type AiSearchInstanceInfo = {
|
|
|
5034
5071
|
max_num_results?: number;
|
|
5035
5072
|
cache?: boolean;
|
|
5036
5073
|
cache_threshold?:
|
|
5037
|
-
| "
|
|
5038
|
-
| "close_enough"
|
|
5039
|
-
| "flexible_friend"
|
|
5040
|
-
| "anything_goes";
|
|
5074
|
+
"super_strict_match" | "close_enough" | "flexible_friend" | "anything_goes";
|
|
5041
5075
|
custom_metadata?: Array<{
|
|
5042
5076
|
field_name: string;
|
|
5043
5077
|
data_type: "text" | "number" | "boolean" | "datetime";
|
|
@@ -5115,10 +5149,7 @@ type AiSearchConfig = {
|
|
|
5115
5149
|
cache?: boolean;
|
|
5116
5150
|
/** Similarity threshold for cache hits. Stricter = fewer cache hits but higher relevance. */
|
|
5117
5151
|
cache_threshold?:
|
|
5118
|
-
| "
|
|
5119
|
-
| "close_enough"
|
|
5120
|
-
| "flexible_friend"
|
|
5121
|
-
| "anything_goes";
|
|
5152
|
+
"super_strict_match" | "close_enough" | "flexible_friend" | "anything_goes";
|
|
5122
5153
|
custom_metadata?: Array<{
|
|
5123
5154
|
field_name: string;
|
|
5124
5155
|
data_type: "text" | "number" | "boolean" | "datetime";
|
|
@@ -5164,12 +5195,7 @@ type AiSearchListItemsParams = {
|
|
|
5164
5195
|
sort_by?: "status" | "modified_at";
|
|
5165
5196
|
/** Filter items by processing status. */
|
|
5166
5197
|
status?:
|
|
5167
|
-
| "
|
|
5168
|
-
| "running"
|
|
5169
|
-
| "completed"
|
|
5170
|
-
| "error"
|
|
5171
|
-
| "skipped"
|
|
5172
|
-
| "outdated";
|
|
5198
|
+
"queued" | "running" | "completed" | "error" | "skipped" | "outdated";
|
|
5173
5199
|
/** Filter items by source (e.g. "builtin" or "web-crawler:https://example.com"). */
|
|
5174
5200
|
source?: string;
|
|
5175
5201
|
/** JSON-encoded Vectorize filter for metadata filtering. */
|
|
@@ -5714,11 +5740,7 @@ declare abstract class BaseAiTextEmbeddings {
|
|
|
5714
5740
|
}
|
|
5715
5741
|
type RoleScopedChatInput = {
|
|
5716
5742
|
role:
|
|
5717
|
-
| "
|
|
5718
|
-
| "assistant"
|
|
5719
|
-
| "system"
|
|
5720
|
-
| "tool"
|
|
5721
|
-
| (string & NonNullable<unknown>);
|
|
5743
|
+
"user" | "assistant" | "system" | "tool" | (string & NonNullable<unknown>);
|
|
5722
5744
|
content: string;
|
|
5723
5745
|
name?: string;
|
|
5724
5746
|
};
|
|
@@ -5913,8 +5935,7 @@ type ChatCompletionCustomToolTextFormat = {
|
|
|
5913
5935
|
type: "text";
|
|
5914
5936
|
};
|
|
5915
5937
|
type ChatCompletionCustomToolFormat =
|
|
5916
|
-
|
|
|
5917
|
-
| ChatCompletionCustomToolGrammarFormat;
|
|
5938
|
+
ChatCompletionCustomToolTextFormat | ChatCompletionCustomToolGrammarFormat;
|
|
5918
5939
|
type ChatCompletionCustomTool = {
|
|
5919
5940
|
type: "custom";
|
|
5920
5941
|
custom: {
|
|
@@ -5942,8 +5963,7 @@ type ChatCompletionMessageCustomToolCall = {
|
|
|
5942
5963
|
};
|
|
5943
5964
|
};
|
|
5944
5965
|
type ChatCompletionMessageToolCall =
|
|
5945
|
-
|
|
|
5946
|
-
| ChatCompletionMessageCustomToolCall;
|
|
5966
|
+
ChatCompletionMessageFunctionToolCall | ChatCompletionMessageCustomToolCall;
|
|
5947
5967
|
type ChatCompletionToolChoiceFunction = {
|
|
5948
5968
|
type: "function";
|
|
5949
5969
|
function: {
|
|
@@ -6222,11 +6242,7 @@ type ChatCompletionChoice = {
|
|
|
6222
6242
|
index: number;
|
|
6223
6243
|
message: ChatCompletionResponseMessage;
|
|
6224
6244
|
finish_reason:
|
|
6225
|
-
| "
|
|
6226
|
-
| "length"
|
|
6227
|
-
| "tool_calls"
|
|
6228
|
-
| "content_filter"
|
|
6229
|
-
| "function_call";
|
|
6245
|
+
"stop" | "length" | "tool_calls" | "content_filter" | "function_call";
|
|
6230
6246
|
logprobs: ChatCompletionLogprobs | null;
|
|
6231
6247
|
};
|
|
6232
6248
|
type ChatCompletionsMessagesInput = {
|
|
@@ -6421,8 +6437,7 @@ type ResponseFunctionCallArgumentsDoneEvent = {
|
|
|
6421
6437
|
type: "response.function_call_arguments.done";
|
|
6422
6438
|
};
|
|
6423
6439
|
type ResponseFunctionCallOutputItem =
|
|
6424
|
-
|
|
|
6425
|
-
| ResponseInputImageContent;
|
|
6440
|
+
ResponseInputTextContent | ResponseInputImageContent;
|
|
6426
6441
|
type ResponseFunctionCallOutputItemList = Array<ResponseFunctionCallOutputItem>;
|
|
6427
6442
|
type ResponseFunctionToolCall = {
|
|
6428
6443
|
arguments: string;
|
|
@@ -6443,8 +6458,7 @@ type ResponseFunctionToolCallOutputItem = {
|
|
|
6443
6458
|
status?: "in_progress" | "completed" | "incomplete";
|
|
6444
6459
|
};
|
|
6445
6460
|
type ResponseIncludable =
|
|
6446
|
-
|
|
6447
|
-
| "message.output_text.logprobs";
|
|
6461
|
+
"message.input_image.image_url" | "message.output_text.logprobs";
|
|
6448
6462
|
type ResponseIncompleteEvent = {
|
|
6449
6463
|
response: Response;
|
|
6450
6464
|
sequence_number: number;
|
|
@@ -6510,9 +6524,7 @@ type ResponseItem =
|
|
|
6510
6524
|
| ResponseFunctionToolCallItem
|
|
6511
6525
|
| ResponseFunctionToolCallOutputItem;
|
|
6512
6526
|
type ResponseOutputItem =
|
|
6513
|
-
|
|
|
6514
|
-
| ResponseFunctionToolCall
|
|
6515
|
-
| ResponseReasoningItem;
|
|
6527
|
+
ResponseOutputMessage | ResponseFunctionToolCall | ResponseReasoningItem;
|
|
6516
6528
|
type ResponseOutputItemAddedEvent = {
|
|
6517
6529
|
item: ResponseOutputItem;
|
|
6518
6530
|
output_index: number;
|
|
@@ -8146,8 +8158,7 @@ declare abstract class Base_Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct {
|
|
|
8146
8158
|
postProcessedOutputs: Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Output;
|
|
8147
8159
|
}
|
|
8148
8160
|
type Ai_Cf_Qwen_Qwq_32B_Input =
|
|
8149
|
-
|
|
|
8150
|
-
| Ai_Cf_Qwen_Qwq_32B_Messages;
|
|
8161
|
+
Ai_Cf_Qwen_Qwq_32B_Prompt | Ai_Cf_Qwen_Qwq_32B_Messages;
|
|
8151
8162
|
interface Ai_Cf_Qwen_Qwq_32B_Prompt {
|
|
8152
8163
|
/**
|
|
8153
8164
|
* The input text prompt for the model to generate a response.
|
|
@@ -8694,8 +8705,7 @@ declare abstract class Base_Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct {
|
|
|
8694
8705
|
postProcessedOutputs: Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Output;
|
|
8695
8706
|
}
|
|
8696
8707
|
type Ai_Cf_Google_Gemma_3_12B_It_Input =
|
|
8697
|
-
|
|
|
8698
|
-
| Ai_Cf_Google_Gemma_3_12B_It_Messages;
|
|
8708
|
+
Ai_Cf_Google_Gemma_3_12B_It_Prompt | Ai_Cf_Google_Gemma_3_12B_It_Messages;
|
|
8699
8709
|
interface Ai_Cf_Google_Gemma_3_12B_It_Prompt {
|
|
8700
8710
|
/**
|
|
8701
8711
|
* The input text prompt for the model to generate a response.
|
|
@@ -11234,11 +11244,7 @@ interface Ai_Cf_Deepgram_Flux_Output {
|
|
|
11234
11244
|
* The type of event being reported.
|
|
11235
11245
|
*/
|
|
11236
11246
|
event?:
|
|
11237
|
-
| "
|
|
11238
|
-
| "StartOfTurn"
|
|
11239
|
-
| "EagerEndOfTurn"
|
|
11240
|
-
| "TurnResumed"
|
|
11241
|
-
| "EndOfTurn";
|
|
11247
|
+
"Update" | "StartOfTurn" | "EagerEndOfTurn" | "TurnResumed" | "EndOfTurn";
|
|
11242
11248
|
/**
|
|
11243
11249
|
* The index of the current turn
|
|
11244
11250
|
*/
|
|
@@ -11772,8 +11778,7 @@ type AIGatewayProviders =
|
|
|
11772
11778
|
| "adobe-firefly";
|
|
11773
11779
|
type AIGatewayHeaders = {
|
|
11774
11780
|
"cf-aig-metadata":
|
|
11775
|
-
|
|
11776
|
-
| string;
|
|
11781
|
+
Record<string, number | string | boolean | null | bigint> | string;
|
|
11777
11782
|
"cf-aig-custom-cost":
|
|
11778
11783
|
| {
|
|
11779
11784
|
per_token_in?: number;
|
|
@@ -12196,10 +12201,7 @@ declare abstract class AutoRAG {
|
|
|
12196
12201
|
): Promise<AutoRagAiSearchResponse | Response>;
|
|
12197
12202
|
}
|
|
12198
12203
|
type BrowserRunLifecycleEvent =
|
|
12199
|
-
| "
|
|
12200
|
-
| "domcontentloaded"
|
|
12201
|
-
| "networkidle0"
|
|
12202
|
-
| "networkidle2";
|
|
12204
|
+
"load" | "domcontentloaded" | "networkidle0" | "networkidle2";
|
|
12203
12205
|
type BrowserRunResourceType =
|
|
12204
12206
|
| "document"
|
|
12205
12207
|
| "stylesheet"
|
|
@@ -13098,7 +13100,8 @@ interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
|
|
|
13098
13100
|
/**
|
|
13099
13101
|
* How to combine the foreground and backdrop pixels to create the result
|
|
13100
13102
|
*/
|
|
13101
|
-
composite?:
|
|
13103
|
+
composite?:
|
|
13104
|
+
/** Foreground drawn on top of backdrop (default) */
|
|
13102
13105
|
| "over"
|
|
13103
13106
|
/** Foreground shown only where backdrop is opaque */
|
|
13104
13107
|
| "in"
|
|
@@ -13905,8 +13908,7 @@ declare type Iso3166Alpha2Code =
|
|
|
13905
13908
|
/** The 2-letter continent codes Cloudflare uses */
|
|
13906
13909
|
declare type ContinentCode = "AF" | "AN" | "AS" | "EU" | "NA" | "OC" | "SA";
|
|
13907
13910
|
type CfProperties<HostMetadata = unknown> =
|
|
13908
|
-
|
|
13909
|
-
| RequestInitCfProperties;
|
|
13911
|
+
IncomingRequestCfProperties<HostMetadata> | RequestInitCfProperties;
|
|
13910
13912
|
interface D1Meta {
|
|
13911
13913
|
duration: number;
|
|
13912
13914
|
size_after: number;
|
|
@@ -14901,9 +14903,7 @@ declare namespace Rpc {
|
|
|
14901
14903
|
[__WORKFLOW_ENTRYPOINT_BRAND]: never;
|
|
14902
14904
|
}
|
|
14903
14905
|
export type EntrypointBranded =
|
|
14904
|
-
|
|
|
14905
|
-
| DurableObjectBranded
|
|
14906
|
-
| WorkflowEntrypointBranded;
|
|
14906
|
+
WorkerEntrypointBranded | DurableObjectBranded | WorkflowEntrypointBranded;
|
|
14907
14907
|
// Types that can be used through `Stub`s
|
|
14908
14908
|
export type Stubable = RpcTargetBranded | ((...args: any[]) => any);
|
|
14909
14909
|
// Types that can be passed over RPC
|
|
@@ -15145,16 +15145,9 @@ declare namespace CloudflareWorkersModule {
|
|
|
15145
15145
|
webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
|
|
15146
15146
|
}
|
|
15147
15147
|
export type WorkflowDurationLabel =
|
|
15148
|
-
| "
|
|
15149
|
-
| "minute"
|
|
15150
|
-
| "hour"
|
|
15151
|
-
| "day"
|
|
15152
|
-
| "week"
|
|
15153
|
-
| "month"
|
|
15154
|
-
| "year";
|
|
15148
|
+
"second" | "minute" | "hour" | "day" | "week" | "month" | "year";
|
|
15155
15149
|
export type WorkflowSleepDuration =
|
|
15156
|
-
|
|
15157
|
-
| number;
|
|
15150
|
+
`${number} ${WorkflowDurationLabel}${"s" | ""}` | number;
|
|
15158
15151
|
export type WorkflowDelayDuration = WorkflowSleepDuration;
|
|
15159
15152
|
export type WorkflowDynamicDelayContext = {
|
|
15160
15153
|
ctx: WorkflowStepContext<WorkflowDelayFunction>;
|
|
@@ -15961,11 +15954,7 @@ type StreamDownloadGetResponse = {
|
|
|
15961
15954
|
default?: StreamDownload;
|
|
15962
15955
|
};
|
|
15963
15956
|
type StreamWatermarkPosition =
|
|
15964
|
-
| "
|
|
15965
|
-
| "upperLeft"
|
|
15966
|
-
| "lowerLeft"
|
|
15967
|
-
| "lowerRight"
|
|
15968
|
-
| "center";
|
|
15957
|
+
"upperRight" | "upperLeft" | "lowerLeft" | "lowerRight" | "center";
|
|
15969
15958
|
type StreamWatermark = {
|
|
15970
15959
|
/**
|
|
15971
15960
|
* The unique identifier for a watermark profile.
|
|
@@ -16449,8 +16438,7 @@ type VectorizeVectorMetadataValue = string | number | boolean | string[];
|
|
|
16449
16438
|
* Additional information to associate with a vector.
|
|
16450
16439
|
*/
|
|
16451
16440
|
type VectorizeVectorMetadata =
|
|
16452
|
-
| VectorizeVectorMetadataValue
|
|
16453
|
-
| Record<string, VectorizeVectorMetadataValue>;
|
|
16441
|
+
VectorizeVectorMetadataValue | Record<string, VectorizeVectorMetadataValue>;
|
|
16454
16442
|
type VectorFloatArray = Float32Array | Float64Array;
|
|
16455
16443
|
interface VectorizeError {
|
|
16456
16444
|
code?: number;
|
|
@@ -16462,12 +16450,7 @@ interface VectorizeError {
|
|
|
16462
16450
|
* This list is expected to grow as support for more operations are released.
|
|
16463
16451
|
*/
|
|
16464
16452
|
type VectorizeVectorMetadataFilterOp =
|
|
16465
|
-
| "$
|
|
16466
|
-
| "$ne"
|
|
16467
|
-
| "$lt"
|
|
16468
|
-
| "$lte"
|
|
16469
|
-
| "$gt"
|
|
16470
|
-
| "$gte";
|
|
16453
|
+
"$eq" | "$ne" | "$lt" | "$lte" | "$gt" | "$gte";
|
|
16471
16454
|
type VectorizeVectorMetadataFilterCollectionOp = "$in" | "$nin";
|
|
16472
16455
|
/**
|
|
16473
16456
|
* Filter criteria for vector metadata used to limit the retrieved query result set.
|
|
@@ -16905,16 +16888,9 @@ type WorkflowBatchDeleteResult = {
|
|
|
16905
16888
|
}[];
|
|
16906
16889
|
};
|
|
16907
16890
|
type WorkflowDurationLabel =
|
|
16908
|
-
| "
|
|
16909
|
-
| "minute"
|
|
16910
|
-
| "hour"
|
|
16911
|
-
| "day"
|
|
16912
|
-
| "week"
|
|
16913
|
-
| "month"
|
|
16914
|
-
| "year";
|
|
16891
|
+
"second" | "minute" | "hour" | "day" | "week" | "month" | "year";
|
|
16915
16892
|
type WorkflowSleepDuration =
|
|
16916
|
-
|
|
16917
|
-
| number;
|
|
16893
|
+
`${number} ${WorkflowDurationLabel}${"s" | ""}` | number;
|
|
16918
16894
|
type WorkflowRetentionDuration = WorkflowSleepDuration;
|
|
16919
16895
|
interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
16920
16896
|
/**
|