@cloudflare/workers-types 4.20251014.0 → 4.20251106.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/2021-11-03/index.d.ts +926 -286
- package/2021-11-03/index.ts +926 -286
- package/2022-01-31/index.d.ts +977 -296
- package/2022-01-31/index.ts +977 -296
- package/2022-03-21/index.d.ts +977 -296
- package/2022-03-21/index.ts +977 -296
- package/2022-08-04/index.d.ts +977 -296
- package/2022-08-04/index.ts +977 -296
- package/2022-10-31/index.d.ts +997 -300
- package/2022-10-31/index.ts +997 -300
- package/2022-11-30/index.d.ts +997 -300
- package/2022-11-30/index.ts +997 -300
- package/2023-03-01/index.d.ts +1002 -301
- package/2023-03-01/index.ts +1002 -301
- package/2023-07-01/index.d.ts +1002 -301
- package/2023-07-01/index.ts +1002 -301
- package/experimental/index.d.ts +1291 -366
- package/experimental/index.ts +1291 -366
- package/index.d.ts +926 -286
- package/index.ts +926 -286
- package/latest/index.d.ts +1008 -305
- package/latest/index.ts +1008 -305
- package/oldest/index.d.ts +926 -286
- package/oldest/index.ts +926 -286
- package/package.json +1 -1
package/2022-08-04/index.d.ts
CHANGED
|
@@ -16,17 +16,26 @@ and limitations under the License.
|
|
|
16
16
|
// noinspection JSUnusedGlobalSymbols
|
|
17
17
|
declare var onmessage: never;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
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.
|
|
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.
|
|
27
|
+
*
|
|
28
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message)
|
|
29
|
+
*/
|
|
26
30
|
readonly message: string;
|
|
27
|
-
|
|
31
|
+
/**
|
|
32
|
+
* The **`name`** read-only property of the one of the strings associated with an error name.
|
|
33
|
+
*
|
|
34
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name)
|
|
35
|
+
*/
|
|
28
36
|
readonly name: string;
|
|
29
37
|
/**
|
|
38
|
+
* The **`code`** read-only property of the DOMException interface returns one of the legacy error code constants, or `0` if none match.
|
|
30
39
|
* @deprecated
|
|
31
40
|
*
|
|
32
41
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/code)
|
|
@@ -70,45 +79,121 @@ type WorkerGlobalScopeEventMap = {
|
|
|
70
79
|
declare abstract class WorkerGlobalScope extends EventTarget<WorkerGlobalScopeEventMap> {
|
|
71
80
|
EventTarget: typeof EventTarget;
|
|
72
81
|
}
|
|
73
|
-
/*
|
|
82
|
+
/* The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). *
|
|
83
|
+
* The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox).
|
|
84
|
+
*
|
|
85
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console)
|
|
86
|
+
*/
|
|
74
87
|
interface Console {
|
|
75
88
|
"assert"(condition?: boolean, ...data: any[]): void;
|
|
76
|
-
|
|
89
|
+
/**
|
|
90
|
+
* The **`console.clear()`** static method clears the console if possible.
|
|
91
|
+
*
|
|
92
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static)
|
|
93
|
+
*/
|
|
77
94
|
clear(): void;
|
|
78
|
-
|
|
95
|
+
/**
|
|
96
|
+
* The **`console.count()`** static method logs the number of times that this particular call to `count()` has been called.
|
|
97
|
+
*
|
|
98
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static)
|
|
99
|
+
*/
|
|
79
100
|
count(label?: string): void;
|
|
80
|
-
|
|
101
|
+
/**
|
|
102
|
+
* The **`console.countReset()`** static method resets counter used with console/count_static.
|
|
103
|
+
*
|
|
104
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static)
|
|
105
|
+
*/
|
|
81
106
|
countReset(label?: string): void;
|
|
82
|
-
|
|
107
|
+
/**
|
|
108
|
+
* The **`console.debug()`** static method outputs a message to the console at the 'debug' log level.
|
|
109
|
+
*
|
|
110
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static)
|
|
111
|
+
*/
|
|
83
112
|
debug(...data: any[]): void;
|
|
84
|
-
|
|
113
|
+
/**
|
|
114
|
+
* The **`console.dir()`** static method displays a list of the properties of the specified JavaScript object.
|
|
115
|
+
*
|
|
116
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static)
|
|
117
|
+
*/
|
|
85
118
|
dir(item?: any, options?: any): void;
|
|
86
|
-
|
|
119
|
+
/**
|
|
120
|
+
* The **`console.dirxml()`** static method displays an interactive tree of the descendant elements of the specified XML/HTML element.
|
|
121
|
+
*
|
|
122
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static)
|
|
123
|
+
*/
|
|
87
124
|
dirxml(...data: any[]): void;
|
|
88
|
-
|
|
125
|
+
/**
|
|
126
|
+
* The **`console.error()`** static method outputs a message to the console at the 'error' log level.
|
|
127
|
+
*
|
|
128
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static)
|
|
129
|
+
*/
|
|
89
130
|
error(...data: any[]): void;
|
|
90
|
-
|
|
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/groupEnd_static is called.
|
|
133
|
+
*
|
|
134
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static)
|
|
135
|
+
*/
|
|
91
136
|
group(...data: any[]): void;
|
|
92
|
-
|
|
137
|
+
/**
|
|
138
|
+
* The **`console.groupCollapsed()`** static method creates a new inline group in the console.
|
|
139
|
+
*
|
|
140
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static)
|
|
141
|
+
*/
|
|
93
142
|
groupCollapsed(...data: any[]): void;
|
|
94
|
-
|
|
143
|
+
/**
|
|
144
|
+
* The **`console.groupEnd()`** static method exits the current inline group in the console.
|
|
145
|
+
*
|
|
146
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static)
|
|
147
|
+
*/
|
|
95
148
|
groupEnd(): void;
|
|
96
|
-
|
|
149
|
+
/**
|
|
150
|
+
* The **`console.info()`** static method outputs a message to the console at the 'info' log level.
|
|
151
|
+
*
|
|
152
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static)
|
|
153
|
+
*/
|
|
97
154
|
info(...data: any[]): void;
|
|
98
|
-
|
|
155
|
+
/**
|
|
156
|
+
* The **`console.log()`** static method outputs a message to the console.
|
|
157
|
+
*
|
|
158
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)
|
|
159
|
+
*/
|
|
99
160
|
log(...data: any[]): void;
|
|
100
|
-
|
|
161
|
+
/**
|
|
162
|
+
* The **`console.table()`** static method displays tabular data as a table.
|
|
163
|
+
*
|
|
164
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static)
|
|
165
|
+
*/
|
|
101
166
|
table(tabularData?: any, properties?: string[]): void;
|
|
102
|
-
|
|
167
|
+
/**
|
|
168
|
+
* The **`console.time()`** static method starts a timer you can use to track how long an operation takes.
|
|
169
|
+
*
|
|
170
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static)
|
|
171
|
+
*/
|
|
103
172
|
time(label?: string): void;
|
|
104
|
-
|
|
173
|
+
/**
|
|
174
|
+
* The **`console.timeEnd()`** static method stops a timer that was previously started by calling console/time_static.
|
|
175
|
+
*
|
|
176
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static)
|
|
177
|
+
*/
|
|
105
178
|
timeEnd(label?: string): void;
|
|
106
|
-
|
|
179
|
+
/**
|
|
180
|
+
* The **`console.timeLog()`** static method logs the current value of a timer that was previously started by calling console/time_static.
|
|
181
|
+
*
|
|
182
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static)
|
|
183
|
+
*/
|
|
107
184
|
timeLog(label?: string, ...data: any[]): void;
|
|
108
185
|
timeStamp(label?: string): void;
|
|
109
|
-
|
|
186
|
+
/**
|
|
187
|
+
* The **`console.trace()`** static method outputs a stack trace to the console.
|
|
188
|
+
*
|
|
189
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static)
|
|
190
|
+
*/
|
|
110
191
|
trace(...data: any[]): void;
|
|
111
|
-
|
|
192
|
+
/**
|
|
193
|
+
* The **`console.warn()`** static method outputs a warning message to the console at the 'warning' log level.
|
|
194
|
+
*
|
|
195
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static)
|
|
196
|
+
*/
|
|
112
197
|
warn(...data: any[]): void;
|
|
113
198
|
}
|
|
114
199
|
declare const console: Console;
|
|
@@ -200,7 +285,7 @@ declare namespace WebAssembly {
|
|
|
200
285
|
function validate(bytes: BufferSource): boolean;
|
|
201
286
|
}
|
|
202
287
|
/**
|
|
203
|
-
*
|
|
288
|
+
* The **`ServiceWorkerGlobalScope`** interface of the Service Worker API represents the global execution context of a service worker.
|
|
204
289
|
* Available only in secure contexts.
|
|
205
290
|
*
|
|
206
291
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope)
|
|
@@ -303,7 +388,7 @@ declare function removeEventListener<
|
|
|
303
388
|
options?: EventTargetEventListenerOptions | boolean,
|
|
304
389
|
): void;
|
|
305
390
|
/**
|
|
306
|
-
*
|
|
391
|
+
* The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
|
|
307
392
|
*
|
|
308
393
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
|
|
309
394
|
*/
|
|
@@ -439,13 +524,6 @@ interface ExportedHandler<
|
|
|
439
524
|
interface StructuredSerializeOptions {
|
|
440
525
|
transfer?: any[];
|
|
441
526
|
}
|
|
442
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent) */
|
|
443
|
-
declare abstract class PromiseRejectionEvent extends Event {
|
|
444
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) */
|
|
445
|
-
readonly promise: Promise<any>;
|
|
446
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
|
|
447
|
-
readonly reason: any;
|
|
448
|
-
}
|
|
449
527
|
declare abstract class Navigator {
|
|
450
528
|
sendBeacon(
|
|
451
529
|
url: string,
|
|
@@ -666,116 +744,120 @@ interface AnalyticsEngineDataPoint {
|
|
|
666
744
|
blobs?: ((ArrayBuffer | string) | null)[];
|
|
667
745
|
}
|
|
668
746
|
/**
|
|
669
|
-
*
|
|
747
|
+
* The **`Event`** interface represents an event which takes place on an `EventTarget`.
|
|
670
748
|
*
|
|
671
749
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event)
|
|
672
750
|
*/
|
|
673
751
|
declare class Event {
|
|
674
752
|
constructor(type: string, init?: EventInit);
|
|
675
753
|
/**
|
|
676
|
-
*
|
|
754
|
+
* The **`type`** read-only property of the Event interface returns a string containing the event's type.
|
|
677
755
|
*
|
|
678
756
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)
|
|
679
757
|
*/
|
|
680
758
|
get type(): string;
|
|
681
759
|
/**
|
|
682
|
-
*
|
|
760
|
+
* The **`eventPhase`** read-only property of the being evaluated.
|
|
683
761
|
*
|
|
684
762
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)
|
|
685
763
|
*/
|
|
686
764
|
get eventPhase(): number;
|
|
687
765
|
/**
|
|
688
|
-
*
|
|
766
|
+
* The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.
|
|
689
767
|
*
|
|
690
768
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)
|
|
691
769
|
*/
|
|
692
770
|
get composed(): boolean;
|
|
693
771
|
/**
|
|
694
|
-
*
|
|
772
|
+
* The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.
|
|
695
773
|
*
|
|
696
774
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)
|
|
697
775
|
*/
|
|
698
776
|
get bubbles(): boolean;
|
|
699
777
|
/**
|
|
700
|
-
*
|
|
778
|
+
* The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.
|
|
701
779
|
*
|
|
702
780
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)
|
|
703
781
|
*/
|
|
704
782
|
get cancelable(): boolean;
|
|
705
783
|
/**
|
|
706
|
-
*
|
|
784
|
+
* The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.
|
|
707
785
|
*
|
|
708
786
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)
|
|
709
787
|
*/
|
|
710
788
|
get defaultPrevented(): boolean;
|
|
711
789
|
/**
|
|
790
|
+
* The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.
|
|
712
791
|
* @deprecated
|
|
713
792
|
*
|
|
714
793
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)
|
|
715
794
|
*/
|
|
716
795
|
get returnValue(): boolean;
|
|
717
796
|
/**
|
|
718
|
-
*
|
|
797
|
+
* The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.
|
|
719
798
|
*
|
|
720
799
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)
|
|
721
800
|
*/
|
|
722
801
|
get currentTarget(): EventTarget | undefined;
|
|
723
802
|
/**
|
|
724
|
-
*
|
|
803
|
+
* The read-only **`target`** property of the dispatched.
|
|
725
804
|
*
|
|
726
805
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)
|
|
727
806
|
*/
|
|
728
807
|
get target(): EventTarget | undefined;
|
|
729
808
|
/**
|
|
809
|
+
* The deprecated **`Event.srcElement`** is an alias for the Event.target property.
|
|
730
810
|
* @deprecated
|
|
731
811
|
*
|
|
732
812
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)
|
|
733
813
|
*/
|
|
734
814
|
get srcElement(): EventTarget | undefined;
|
|
735
815
|
/**
|
|
736
|
-
*
|
|
816
|
+
* The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.
|
|
737
817
|
*
|
|
738
818
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)
|
|
739
819
|
*/
|
|
740
820
|
get timeStamp(): number;
|
|
741
821
|
/**
|
|
742
|
-
*
|
|
822
|
+
* 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 `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.
|
|
743
823
|
*
|
|
744
824
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)
|
|
745
825
|
*/
|
|
746
826
|
get isTrusted(): boolean;
|
|
747
827
|
/**
|
|
828
|
+
* The **`cancelBubble`** property of the Event interface is deprecated.
|
|
748
829
|
* @deprecated
|
|
749
830
|
*
|
|
750
831
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)
|
|
751
832
|
*/
|
|
752
833
|
get cancelBubble(): boolean;
|
|
753
834
|
/**
|
|
835
|
+
* The **`cancelBubble`** property of the Event interface is deprecated.
|
|
754
836
|
* @deprecated
|
|
755
837
|
*
|
|
756
838
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)
|
|
757
839
|
*/
|
|
758
840
|
set cancelBubble(value: boolean);
|
|
759
841
|
/**
|
|
760
|
-
*
|
|
842
|
+
* The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.
|
|
761
843
|
*
|
|
762
844
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)
|
|
763
845
|
*/
|
|
764
846
|
stopImmediatePropagation(): void;
|
|
765
847
|
/**
|
|
766
|
-
*
|
|
848
|
+
* The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.
|
|
767
849
|
*
|
|
768
850
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)
|
|
769
851
|
*/
|
|
770
852
|
preventDefault(): void;
|
|
771
853
|
/**
|
|
772
|
-
*
|
|
854
|
+
* The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.
|
|
773
855
|
*
|
|
774
856
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)
|
|
775
857
|
*/
|
|
776
858
|
stopPropagation(): void;
|
|
777
859
|
/**
|
|
778
|
-
*
|
|
860
|
+
* 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.
|
|
779
861
|
*
|
|
780
862
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)
|
|
781
863
|
*/
|
|
@@ -800,7 +882,7 @@ type EventListenerOrEventListenerObject<EventType extends Event = Event> =
|
|
|
800
882
|
| EventListener<EventType>
|
|
801
883
|
| EventListenerObject<EventType>;
|
|
802
884
|
/**
|
|
803
|
-
* EventTarget is
|
|
885
|
+
* The **`EventTarget`** interface is implemented by objects that can receive events and may have listeners for them.
|
|
804
886
|
*
|
|
805
887
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
|
|
806
888
|
*/
|
|
@@ -809,19 +891,7 @@ declare class EventTarget<
|
|
|
809
891
|
> {
|
|
810
892
|
constructor();
|
|
811
893
|
/**
|
|
812
|
-
*
|
|
813
|
-
*
|
|
814
|
-
* The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
|
|
815
|
-
*
|
|
816
|
-
* When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
|
|
817
|
-
*
|
|
818
|
-
* When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
|
|
819
|
-
*
|
|
820
|
-
* When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
|
|
821
|
-
*
|
|
822
|
-
* If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
|
|
823
|
-
*
|
|
824
|
-
* The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
|
|
894
|
+
* The **`addEventListener()`** method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
|
|
825
895
|
*
|
|
826
896
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
|
|
827
897
|
*/
|
|
@@ -831,7 +901,7 @@ declare class EventTarget<
|
|
|
831
901
|
options?: EventTargetAddEventListenerOptions | boolean,
|
|
832
902
|
): void;
|
|
833
903
|
/**
|
|
834
|
-
*
|
|
904
|
+
* The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.
|
|
835
905
|
*
|
|
836
906
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
|
|
837
907
|
*/
|
|
@@ -841,7 +911,7 @@ declare class EventTarget<
|
|
|
841
911
|
options?: EventTargetEventListenerOptions | boolean,
|
|
842
912
|
): void;
|
|
843
913
|
/**
|
|
844
|
-
*
|
|
914
|
+
* The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
|
|
845
915
|
*
|
|
846
916
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
|
|
847
917
|
*/
|
|
@@ -860,50 +930,70 @@ interface EventTargetHandlerObject {
|
|
|
860
930
|
handleEvent: (event: Event) => any | undefined;
|
|
861
931
|
}
|
|
862
932
|
/**
|
|
863
|
-
*
|
|
933
|
+
* The **`AbortController`** interface represents a controller object that allows you to abort one or more Web requests as and when desired.
|
|
864
934
|
*
|
|
865
935
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController)
|
|
866
936
|
*/
|
|
867
937
|
declare class AbortController {
|
|
868
938
|
constructor();
|
|
869
939
|
/**
|
|
870
|
-
*
|
|
940
|
+
* The **`signal`** read-only property of the AbortController interface returns an AbortSignal object instance, which can be used to communicate with/abort an asynchronous operation as desired.
|
|
871
941
|
*
|
|
872
942
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/signal)
|
|
873
943
|
*/
|
|
874
944
|
get signal(): AbortSignal;
|
|
875
945
|
/**
|
|
876
|
-
*
|
|
946
|
+
* The **`abort()`** method of the AbortController interface aborts an asynchronous operation before it has completed.
|
|
877
947
|
*
|
|
878
948
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/abort)
|
|
879
949
|
*/
|
|
880
950
|
abort(reason?: any): void;
|
|
881
951
|
}
|
|
882
952
|
/**
|
|
883
|
-
*
|
|
953
|
+
* The **`AbortSignal`** interface represents a signal object that allows you to communicate with an asynchronous operation (such as a fetch request) and abort it if required via an AbortController object.
|
|
884
954
|
*
|
|
885
955
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal)
|
|
886
956
|
*/
|
|
887
957
|
declare abstract class AbortSignal extends EventTarget {
|
|
888
|
-
|
|
958
|
+
/**
|
|
959
|
+
* The **`AbortSignal.abort()`** static method returns an AbortSignal that is already set as aborted (and which does not trigger an AbortSignal/abort_event event).
|
|
960
|
+
*
|
|
961
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static)
|
|
962
|
+
*/
|
|
889
963
|
static abort(reason?: any): AbortSignal;
|
|
890
|
-
|
|
964
|
+
/**
|
|
965
|
+
* The **`AbortSignal.timeout()`** static method returns an AbortSignal that will automatically abort after a specified time.
|
|
966
|
+
*
|
|
967
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static)
|
|
968
|
+
*/
|
|
891
969
|
static timeout(delay: number): AbortSignal;
|
|
892
|
-
|
|
970
|
+
/**
|
|
971
|
+
* The **`AbortSignal.any()`** static method takes an iterable of abort signals and returns an AbortSignal.
|
|
972
|
+
*
|
|
973
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static)
|
|
974
|
+
*/
|
|
893
975
|
static any(signals: AbortSignal[]): AbortSignal;
|
|
894
976
|
/**
|
|
895
|
-
*
|
|
977
|
+
* 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`).
|
|
896
978
|
*
|
|
897
979
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
|
|
898
980
|
*/
|
|
899
981
|
get aborted(): boolean;
|
|
900
|
-
|
|
982
|
+
/**
|
|
983
|
+
* The **`reason`** read-only property returns a JavaScript value that indicates the abort reason.
|
|
984
|
+
*
|
|
985
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason)
|
|
986
|
+
*/
|
|
901
987
|
get reason(): any;
|
|
902
988
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
903
989
|
get onabort(): any | null;
|
|
904
990
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
905
991
|
set onabort(value: any | null);
|
|
906
|
-
|
|
992
|
+
/**
|
|
993
|
+
* The **`throwIfAborted()`** method throws the signal's abort AbortSignal.reason if the signal has been aborted; otherwise it does nothing.
|
|
994
|
+
*
|
|
995
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted)
|
|
996
|
+
*/
|
|
907
997
|
throwIfAborted(): void;
|
|
908
998
|
}
|
|
909
999
|
interface Scheduler {
|
|
@@ -913,19 +1003,27 @@ interface SchedulerWaitOptions {
|
|
|
913
1003
|
signal?: AbortSignal;
|
|
914
1004
|
}
|
|
915
1005
|
/**
|
|
916
|
-
*
|
|
1006
|
+
* The **`ExtendableEvent`** interface extends the lifetime of the `install` and `activate` events dispatched on the global scope as part of the service worker lifecycle.
|
|
917
1007
|
*
|
|
918
1008
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent)
|
|
919
1009
|
*/
|
|
920
1010
|
declare abstract class ExtendableEvent extends Event {
|
|
921
|
-
|
|
1011
|
+
/**
|
|
1012
|
+
* The **`ExtendableEvent.waitUntil()`** method tells the event dispatcher that work is ongoing.
|
|
1013
|
+
*
|
|
1014
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil)
|
|
1015
|
+
*/
|
|
922
1016
|
waitUntil(promise: Promise<any>): void;
|
|
923
1017
|
}
|
|
924
|
-
|
|
1018
|
+
/**
|
|
1019
|
+
* The **`CustomEvent`** interface represents events initialized by an application for any purpose.
|
|
1020
|
+
*
|
|
1021
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent)
|
|
1022
|
+
*/
|
|
925
1023
|
declare class CustomEvent<T = any> extends Event {
|
|
926
1024
|
constructor(type: string, init?: CustomEventCustomEventInit);
|
|
927
1025
|
/**
|
|
928
|
-
*
|
|
1026
|
+
* The read-only **`detail`** property of the CustomEvent interface returns any data passed when initializing the event.
|
|
929
1027
|
*
|
|
930
1028
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent/detail)
|
|
931
1029
|
*/
|
|
@@ -938,7 +1036,7 @@ interface CustomEventCustomEventInit {
|
|
|
938
1036
|
detail?: any;
|
|
939
1037
|
}
|
|
940
1038
|
/**
|
|
941
|
-
*
|
|
1039
|
+
* The **`Blob`** interface represents a blob, which is a file-like object of immutable, raw data; they can be read as text or binary data, or converted into a ReadableStream so its methods can be used for processing the data.
|
|
942
1040
|
*
|
|
943
1041
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob)
|
|
944
1042
|
*/
|
|
@@ -947,26 +1045,54 @@ declare class Blob {
|
|
|
947
1045
|
type?: ((ArrayBuffer | ArrayBufferView) | string | Blob)[],
|
|
948
1046
|
options?: BlobOptions,
|
|
949
1047
|
);
|
|
950
|
-
|
|
1048
|
+
/**
|
|
1049
|
+
* The **`size`** read-only property of the Blob interface returns the size of the Blob or File in bytes.
|
|
1050
|
+
*
|
|
1051
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size)
|
|
1052
|
+
*/
|
|
951
1053
|
get size(): number;
|
|
952
|
-
|
|
1054
|
+
/**
|
|
1055
|
+
* The **`type`** read-only property of the Blob interface returns the MIME type of the file.
|
|
1056
|
+
*
|
|
1057
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type)
|
|
1058
|
+
*/
|
|
953
1059
|
get type(): string;
|
|
954
|
-
|
|
1060
|
+
/**
|
|
1061
|
+
* 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.
|
|
1062
|
+
*
|
|
1063
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice)
|
|
1064
|
+
*/
|
|
955
1065
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
956
|
-
|
|
1066
|
+
/**
|
|
1067
|
+
* The **`arrayBuffer()`** method of the Blob interface returns a Promise that resolves with the contents of the blob as binary data contained in an ArrayBuffer.
|
|
1068
|
+
*
|
|
1069
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer)
|
|
1070
|
+
*/
|
|
957
1071
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
958
|
-
|
|
1072
|
+
/**
|
|
1073
|
+
* The **`bytes()`** method of the Blob interface returns a Promise that resolves with a Uint8Array containing the contents of the blob as an array of bytes.
|
|
1074
|
+
*
|
|
1075
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/bytes)
|
|
1076
|
+
*/
|
|
959
1077
|
bytes(): Promise<Uint8Array>;
|
|
960
|
-
|
|
1078
|
+
/**
|
|
1079
|
+
* The **`text()`** method of the string containing the contents of the blob, interpreted as UTF-8.
|
|
1080
|
+
*
|
|
1081
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text)
|
|
1082
|
+
*/
|
|
961
1083
|
text(): Promise<string>;
|
|
962
|
-
|
|
1084
|
+
/**
|
|
1085
|
+
* The **`stream()`** method of the Blob interface returns a ReadableStream which upon reading returns the data contained within the `Blob`.
|
|
1086
|
+
*
|
|
1087
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream)
|
|
1088
|
+
*/
|
|
963
1089
|
stream(): ReadableStream;
|
|
964
1090
|
}
|
|
965
1091
|
interface BlobOptions {
|
|
966
1092
|
type?: string;
|
|
967
1093
|
}
|
|
968
1094
|
/**
|
|
969
|
-
*
|
|
1095
|
+
* The **`File`** interface provides information about files and allows JavaScript in a web page to access their content.
|
|
970
1096
|
*
|
|
971
1097
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File)
|
|
972
1098
|
*/
|
|
@@ -976,9 +1102,17 @@ declare class File extends Blob {
|
|
|
976
1102
|
name: string,
|
|
977
1103
|
options?: FileOptions,
|
|
978
1104
|
);
|
|
979
|
-
|
|
1105
|
+
/**
|
|
1106
|
+
* The **`name`** read-only property of the File interface returns the name of the file represented by a File object.
|
|
1107
|
+
*
|
|
1108
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name)
|
|
1109
|
+
*/
|
|
980
1110
|
get name(): string;
|
|
981
|
-
|
|
1111
|
+
/**
|
|
1112
|
+
* 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).
|
|
1113
|
+
*
|
|
1114
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified)
|
|
1115
|
+
*/
|
|
982
1116
|
get lastModified(): number;
|
|
983
1117
|
}
|
|
984
1118
|
interface FileOptions {
|
|
@@ -991,7 +1125,11 @@ interface FileOptions {
|
|
|
991
1125
|
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
992
1126
|
*/
|
|
993
1127
|
declare abstract class CacheStorage {
|
|
994
|
-
|
|
1128
|
+
/**
|
|
1129
|
+
* The **`open()`** method of the the Cache object matching the `cacheName`.
|
|
1130
|
+
*
|
|
1131
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open)
|
|
1132
|
+
*/
|
|
995
1133
|
open(cacheName: string): Promise<Cache>;
|
|
996
1134
|
readonly default: Cache;
|
|
997
1135
|
}
|
|
@@ -1027,12 +1165,17 @@ interface CacheQueryOptions {
|
|
|
1027
1165
|
*/
|
|
1028
1166
|
declare abstract class Crypto {
|
|
1029
1167
|
/**
|
|
1168
|
+
* The **`Crypto.subtle`** read-only property returns a cryptographic operations.
|
|
1030
1169
|
* Available only in secure contexts.
|
|
1031
1170
|
*
|
|
1032
1171
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
|
|
1033
1172
|
*/
|
|
1034
1173
|
get subtle(): SubtleCrypto;
|
|
1035
|
-
|
|
1174
|
+
/**
|
|
1175
|
+
* The **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.
|
|
1176
|
+
*
|
|
1177
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues)
|
|
1178
|
+
*/
|
|
1036
1179
|
getRandomValues<
|
|
1037
1180
|
T extends
|
|
1038
1181
|
| Int8Array
|
|
@@ -1045,6 +1188,7 @@ declare abstract class Crypto {
|
|
|
1045
1188
|
| BigUint64Array,
|
|
1046
1189
|
>(buffer: T): T;
|
|
1047
1190
|
/**
|
|
1191
|
+
* The **`randomUUID()`** method of the Crypto interface is used to generate a v4 UUID using a cryptographically secure random number generator.
|
|
1048
1192
|
* Available only in secure contexts.
|
|
1049
1193
|
*
|
|
1050
1194
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/randomUUID)
|
|
@@ -1053,49 +1197,77 @@ declare abstract class Crypto {
|
|
|
1053
1197
|
DigestStream: typeof DigestStream;
|
|
1054
1198
|
}
|
|
1055
1199
|
/**
|
|
1056
|
-
*
|
|
1200
|
+
* The **`SubtleCrypto`** interface of the Web Crypto API provides a number of low-level cryptographic functions.
|
|
1057
1201
|
* Available only in secure contexts.
|
|
1058
1202
|
*
|
|
1059
1203
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto)
|
|
1060
1204
|
*/
|
|
1061
1205
|
declare abstract class SubtleCrypto {
|
|
1062
|
-
|
|
1206
|
+
/**
|
|
1207
|
+
* The **`encrypt()`** method of the SubtleCrypto interface encrypts data.
|
|
1208
|
+
*
|
|
1209
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt)
|
|
1210
|
+
*/
|
|
1063
1211
|
encrypt(
|
|
1064
1212
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1065
1213
|
key: CryptoKey,
|
|
1066
1214
|
plainText: ArrayBuffer | ArrayBufferView,
|
|
1067
1215
|
): Promise<ArrayBuffer>;
|
|
1068
|
-
|
|
1216
|
+
/**
|
|
1217
|
+
* The **`decrypt()`** method of the SubtleCrypto interface decrypts some encrypted data.
|
|
1218
|
+
*
|
|
1219
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt)
|
|
1220
|
+
*/
|
|
1069
1221
|
decrypt(
|
|
1070
1222
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1071
1223
|
key: CryptoKey,
|
|
1072
1224
|
cipherText: ArrayBuffer | ArrayBufferView,
|
|
1073
1225
|
): Promise<ArrayBuffer>;
|
|
1074
|
-
|
|
1226
|
+
/**
|
|
1227
|
+
* The **`sign()`** method of the SubtleCrypto interface generates a digital signature.
|
|
1228
|
+
*
|
|
1229
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign)
|
|
1230
|
+
*/
|
|
1075
1231
|
sign(
|
|
1076
1232
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
1077
1233
|
key: CryptoKey,
|
|
1078
1234
|
data: ArrayBuffer | ArrayBufferView,
|
|
1079
1235
|
): Promise<ArrayBuffer>;
|
|
1080
|
-
|
|
1236
|
+
/**
|
|
1237
|
+
* The **`verify()`** method of the SubtleCrypto interface verifies a digital signature.
|
|
1238
|
+
*
|
|
1239
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify)
|
|
1240
|
+
*/
|
|
1081
1241
|
verify(
|
|
1082
1242
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
1083
1243
|
key: CryptoKey,
|
|
1084
1244
|
signature: ArrayBuffer | ArrayBufferView,
|
|
1085
1245
|
data: ArrayBuffer | ArrayBufferView,
|
|
1086
1246
|
): Promise<boolean>;
|
|
1087
|
-
|
|
1247
|
+
/**
|
|
1248
|
+
* The **`digest()`** method of the SubtleCrypto interface generates a _digest_ of the given data, using the specified hash function.
|
|
1249
|
+
*
|
|
1250
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest)
|
|
1251
|
+
*/
|
|
1088
1252
|
digest(
|
|
1089
1253
|
algorithm: string | SubtleCryptoHashAlgorithm,
|
|
1090
1254
|
data: ArrayBuffer | ArrayBufferView,
|
|
1091
1255
|
): Promise<ArrayBuffer>;
|
|
1092
|
-
|
|
1256
|
+
/**
|
|
1257
|
+
* The **`generateKey()`** method of the SubtleCrypto interface is used to generate a new key (for symmetric algorithms) or key pair (for public-key algorithms).
|
|
1258
|
+
*
|
|
1259
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey)
|
|
1260
|
+
*/
|
|
1093
1261
|
generateKey(
|
|
1094
1262
|
algorithm: string | SubtleCryptoGenerateKeyAlgorithm,
|
|
1095
1263
|
extractable: boolean,
|
|
1096
1264
|
keyUsages: string[],
|
|
1097
1265
|
): Promise<CryptoKey | CryptoKeyPair>;
|
|
1098
|
-
|
|
1266
|
+
/**
|
|
1267
|
+
* The **`deriveKey()`** method of the SubtleCrypto interface can be used to derive a secret key from a master key.
|
|
1268
|
+
*
|
|
1269
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey)
|
|
1270
|
+
*/
|
|
1099
1271
|
deriveKey(
|
|
1100
1272
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
1101
1273
|
baseKey: CryptoKey,
|
|
@@ -1103,13 +1275,21 @@ declare abstract class SubtleCrypto {
|
|
|
1103
1275
|
extractable: boolean,
|
|
1104
1276
|
keyUsages: string[],
|
|
1105
1277
|
): Promise<CryptoKey>;
|
|
1106
|
-
|
|
1278
|
+
/**
|
|
1279
|
+
* The **`deriveBits()`** method of the key.
|
|
1280
|
+
*
|
|
1281
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits)
|
|
1282
|
+
*/
|
|
1107
1283
|
deriveBits(
|
|
1108
1284
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
1109
1285
|
baseKey: CryptoKey,
|
|
1110
1286
|
length?: number | null,
|
|
1111
1287
|
): Promise<ArrayBuffer>;
|
|
1112
|
-
|
|
1288
|
+
/**
|
|
1289
|
+
* The **`importKey()`** method of the SubtleCrypto interface imports a key: that is, it takes as input a key in an external, portable format and gives you a CryptoKey object that you can use in the Web Crypto API.
|
|
1290
|
+
*
|
|
1291
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey)
|
|
1292
|
+
*/
|
|
1113
1293
|
importKey(
|
|
1114
1294
|
format: string,
|
|
1115
1295
|
keyData: (ArrayBuffer | ArrayBufferView) | JsonWebKey,
|
|
@@ -1117,16 +1297,28 @@ declare abstract class SubtleCrypto {
|
|
|
1117
1297
|
extractable: boolean,
|
|
1118
1298
|
keyUsages: string[],
|
|
1119
1299
|
): Promise<CryptoKey>;
|
|
1120
|
-
|
|
1300
|
+
/**
|
|
1301
|
+
* The **`exportKey()`** method of the SubtleCrypto interface exports a key: that is, it takes as input a CryptoKey object and gives you the key in an external, portable format.
|
|
1302
|
+
*
|
|
1303
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey)
|
|
1304
|
+
*/
|
|
1121
1305
|
exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
1122
|
-
|
|
1306
|
+
/**
|
|
1307
|
+
* The **`wrapKey()`** method of the SubtleCrypto interface 'wraps' a key.
|
|
1308
|
+
*
|
|
1309
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey)
|
|
1310
|
+
*/
|
|
1123
1311
|
wrapKey(
|
|
1124
1312
|
format: string,
|
|
1125
1313
|
key: CryptoKey,
|
|
1126
1314
|
wrappingKey: CryptoKey,
|
|
1127
1315
|
wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1128
1316
|
): Promise<ArrayBuffer>;
|
|
1129
|
-
|
|
1317
|
+
/**
|
|
1318
|
+
* The **`unwrapKey()`** method of the SubtleCrypto interface 'unwraps' a key.
|
|
1319
|
+
*
|
|
1320
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey)
|
|
1321
|
+
*/
|
|
1130
1322
|
unwrapKey(
|
|
1131
1323
|
format: string,
|
|
1132
1324
|
wrappedKey: ArrayBuffer | ArrayBufferView,
|
|
@@ -1142,17 +1334,29 @@ declare abstract class SubtleCrypto {
|
|
|
1142
1334
|
): boolean;
|
|
1143
1335
|
}
|
|
1144
1336
|
/**
|
|
1145
|
-
* The CryptoKey
|
|
1337
|
+
* The **`CryptoKey`** interface of the Web Crypto API represents a cryptographic key obtained from one of the SubtleCrypto methods SubtleCrypto.generateKey, SubtleCrypto.deriveKey, SubtleCrypto.importKey, or SubtleCrypto.unwrapKey.
|
|
1146
1338
|
* Available only in secure contexts.
|
|
1147
1339
|
*
|
|
1148
1340
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)
|
|
1149
1341
|
*/
|
|
1150
1342
|
declare abstract class CryptoKey {
|
|
1151
|
-
|
|
1343
|
+
/**
|
|
1344
|
+
* The read-only **`type`** property of the CryptoKey interface indicates which kind of key is represented by the object.
|
|
1345
|
+
*
|
|
1346
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type)
|
|
1347
|
+
*/
|
|
1152
1348
|
readonly type: string;
|
|
1153
|
-
|
|
1349
|
+
/**
|
|
1350
|
+
* The read-only **`extractable`** property of the CryptoKey interface indicates whether or not the key may be extracted using `SubtleCrypto.exportKey()` or `SubtleCrypto.wrapKey()`.
|
|
1351
|
+
*
|
|
1352
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable)
|
|
1353
|
+
*/
|
|
1154
1354
|
readonly extractable: boolean;
|
|
1155
|
-
|
|
1355
|
+
/**
|
|
1356
|
+
* The read-only **`algorithm`** property of the CryptoKey interface returns an object describing the algorithm for which this key can be used, and any associated extra parameters.
|
|
1357
|
+
*
|
|
1358
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm)
|
|
1359
|
+
*/
|
|
1156
1360
|
readonly algorithm:
|
|
1157
1361
|
| CryptoKeyKeyAlgorithm
|
|
1158
1362
|
| CryptoKeyAesKeyAlgorithm
|
|
@@ -1160,7 +1364,11 @@ declare abstract class CryptoKey {
|
|
|
1160
1364
|
| CryptoKeyRsaKeyAlgorithm
|
|
1161
1365
|
| CryptoKeyEllipticKeyAlgorithm
|
|
1162
1366
|
| CryptoKeyArbitraryKeyAlgorithm;
|
|
1163
|
-
|
|
1367
|
+
/**
|
|
1368
|
+
* The read-only **`usages`** property of the CryptoKey interface indicates what can be done with the key.
|
|
1369
|
+
*
|
|
1370
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages)
|
|
1371
|
+
*/
|
|
1164
1372
|
readonly usages: string[];
|
|
1165
1373
|
}
|
|
1166
1374
|
interface CryptoKeyPair {
|
|
@@ -1269,24 +1477,14 @@ declare class DigestStream extends WritableStream<
|
|
|
1269
1477
|
get bytesWritten(): number | bigint;
|
|
1270
1478
|
}
|
|
1271
1479
|
/**
|
|
1272
|
-
*
|
|
1480
|
+
* The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, `KOI8-R`, `GBK`, etc.
|
|
1273
1481
|
*
|
|
1274
1482
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
|
|
1275
1483
|
*/
|
|
1276
1484
|
declare class TextDecoder {
|
|
1277
1485
|
constructor(label?: string, options?: TextDecoderConstructorOptions);
|
|
1278
1486
|
/**
|
|
1279
|
-
*
|
|
1280
|
-
*
|
|
1281
|
-
* ```
|
|
1282
|
-
* var string = "", decoder = new TextDecoder(encoding), buffer;
|
|
1283
|
-
* while(buffer = next_chunk()) {
|
|
1284
|
-
* string += decoder.decode(buffer, {stream:true});
|
|
1285
|
-
* }
|
|
1286
|
-
* string += decoder.decode(); // end-of-queue
|
|
1287
|
-
* ```
|
|
1288
|
-
*
|
|
1289
|
-
* If the error mode is "fatal" and encoding's decoder returns error, throws a TypeError.
|
|
1487
|
+
* The **`TextDecoder.decode()`** method returns a string containing text decoded from the buffer passed as a parameter.
|
|
1290
1488
|
*
|
|
1291
1489
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder/decode)
|
|
1292
1490
|
*/
|
|
@@ -1299,27 +1497,24 @@ declare class TextDecoder {
|
|
|
1299
1497
|
get ignoreBOM(): boolean;
|
|
1300
1498
|
}
|
|
1301
1499
|
/**
|
|
1302
|
-
* TextEncoder takes a stream of code points as input and emits a stream of
|
|
1500
|
+
* The **`TextEncoder`** interface takes a stream of code points as input and emits a stream of UTF-8 bytes.
|
|
1303
1501
|
*
|
|
1304
1502
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
|
|
1305
1503
|
*/
|
|
1306
1504
|
declare class TextEncoder {
|
|
1307
1505
|
constructor();
|
|
1308
1506
|
/**
|
|
1309
|
-
*
|
|
1507
|
+
* The **`TextEncoder.encode()`** method takes a string as input, and returns a Global_Objects/Uint8Array containing the text given in parameters encoded with the specific method for that TextEncoder object.
|
|
1310
1508
|
*
|
|
1311
1509
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encode)
|
|
1312
1510
|
*/
|
|
1313
1511
|
encode(input?: string): Uint8Array;
|
|
1314
1512
|
/**
|
|
1315
|
-
*
|
|
1513
|
+
* The **`TextEncoder.encodeInto()`** method takes a string to encode and a destination Uint8Array to put resulting UTF-8 encoded text into, and returns a dictionary object indicating the progress of the encoding.
|
|
1316
1514
|
*
|
|
1317
1515
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
|
|
1318
1516
|
*/
|
|
1319
|
-
encodeInto(
|
|
1320
|
-
input: string,
|
|
1321
|
-
buffer: ArrayBuffer | ArrayBufferView,
|
|
1322
|
-
): TextEncoderEncodeIntoResult;
|
|
1517
|
+
encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
|
|
1323
1518
|
get encoding(): string;
|
|
1324
1519
|
}
|
|
1325
1520
|
interface TextDecoderConstructorOptions {
|
|
@@ -1334,21 +1529,41 @@ interface TextEncoderEncodeIntoResult {
|
|
|
1334
1529
|
written: number;
|
|
1335
1530
|
}
|
|
1336
1531
|
/**
|
|
1337
|
-
*
|
|
1532
|
+
* The **`ErrorEvent`** interface represents events providing information related to errors in scripts or in files.
|
|
1338
1533
|
*
|
|
1339
1534
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
|
|
1340
1535
|
*/
|
|
1341
1536
|
declare class ErrorEvent extends Event {
|
|
1342
1537
|
constructor(type: string, init?: ErrorEventErrorEventInit);
|
|
1343
|
-
|
|
1538
|
+
/**
|
|
1539
|
+
* The **`filename`** read-only property of the ErrorEvent interface returns a string containing the name of the script file in which the error occurred.
|
|
1540
|
+
*
|
|
1541
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename)
|
|
1542
|
+
*/
|
|
1344
1543
|
get filename(): string;
|
|
1345
|
-
|
|
1544
|
+
/**
|
|
1545
|
+
* The **`message`** read-only property of the ErrorEvent interface returns a string containing a human-readable error message describing the problem.
|
|
1546
|
+
*
|
|
1547
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message)
|
|
1548
|
+
*/
|
|
1346
1549
|
get message(): string;
|
|
1347
|
-
|
|
1550
|
+
/**
|
|
1551
|
+
* The **`lineno`** read-only property of the ErrorEvent interface returns an integer containing the line number of the script file on which the error occurred.
|
|
1552
|
+
*
|
|
1553
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno)
|
|
1554
|
+
*/
|
|
1348
1555
|
get lineno(): number;
|
|
1349
|
-
|
|
1556
|
+
/**
|
|
1557
|
+
* The **`colno`** read-only property of the ErrorEvent interface returns an integer containing the column number of the script file on which the error occurred.
|
|
1558
|
+
*
|
|
1559
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno)
|
|
1560
|
+
*/
|
|
1350
1561
|
get colno(): number;
|
|
1351
|
-
|
|
1562
|
+
/**
|
|
1563
|
+
* The **`error`** read-only property of the ErrorEvent interface returns a JavaScript value, such as an Error or DOMException, representing the error associated with this event.
|
|
1564
|
+
*
|
|
1565
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error)
|
|
1566
|
+
*/
|
|
1352
1567
|
get error(): any;
|
|
1353
1568
|
}
|
|
1354
1569
|
interface ErrorEventErrorEventInit {
|
|
@@ -1359,38 +1574,38 @@ interface ErrorEventErrorEventInit {
|
|
|
1359
1574
|
error?: any;
|
|
1360
1575
|
}
|
|
1361
1576
|
/**
|
|
1362
|
-
*
|
|
1577
|
+
* The **`MessageEvent`** interface represents a message received by a target object.
|
|
1363
1578
|
*
|
|
1364
1579
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
|
|
1365
1580
|
*/
|
|
1366
1581
|
declare class MessageEvent extends Event {
|
|
1367
1582
|
constructor(type: string, initializer: MessageEventInit);
|
|
1368
1583
|
/**
|
|
1369
|
-
*
|
|
1584
|
+
* The **`data`** read-only property of the The data sent by the message emitter; this can be any data type, depending on what originated this event.
|
|
1370
1585
|
*
|
|
1371
1586
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
|
|
1372
1587
|
*/
|
|
1373
1588
|
readonly data: any;
|
|
1374
1589
|
/**
|
|
1375
|
-
*
|
|
1590
|
+
* The **`origin`** read-only property of the origin of the message emitter.
|
|
1376
1591
|
*
|
|
1377
1592
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/origin)
|
|
1378
1593
|
*/
|
|
1379
1594
|
readonly origin: string | null;
|
|
1380
1595
|
/**
|
|
1381
|
-
*
|
|
1596
|
+
* The **`lastEventId`** read-only property of the unique ID for the event.
|
|
1382
1597
|
*
|
|
1383
1598
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/lastEventId)
|
|
1384
1599
|
*/
|
|
1385
1600
|
readonly lastEventId: string;
|
|
1386
1601
|
/**
|
|
1387
|
-
*
|
|
1602
|
+
* The **`source`** read-only property of the a WindowProxy, MessagePort, or a `MessageEventSource` (which can be a WindowProxy, message emitter.
|
|
1388
1603
|
*
|
|
1389
1604
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/source)
|
|
1390
1605
|
*/
|
|
1391
1606
|
readonly source: MessagePort | null;
|
|
1392
1607
|
/**
|
|
1393
|
-
*
|
|
1608
|
+
* The **`ports`** read-only property of the containing all MessagePort objects sent with the message, in order.
|
|
1394
1609
|
*
|
|
1395
1610
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/ports)
|
|
1396
1611
|
*/
|
|
@@ -1400,27 +1615,78 @@ interface MessageEventInit {
|
|
|
1400
1615
|
data: ArrayBuffer | string;
|
|
1401
1616
|
}
|
|
1402
1617
|
/**
|
|
1403
|
-
*
|
|
1618
|
+
* The **`PromiseRejectionEvent`** interface represents events which are sent to the global script context when JavaScript Promises are rejected.
|
|
1619
|
+
*
|
|
1620
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent)
|
|
1621
|
+
*/
|
|
1622
|
+
declare abstract class PromiseRejectionEvent extends Event {
|
|
1623
|
+
/**
|
|
1624
|
+
* The PromiseRejectionEvent interface's **`promise`** read-only property indicates the JavaScript rejected.
|
|
1625
|
+
*
|
|
1626
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise)
|
|
1627
|
+
*/
|
|
1628
|
+
readonly promise: Promise<any>;
|
|
1629
|
+
/**
|
|
1630
|
+
* The PromiseRejectionEvent **`reason`** read-only property is any JavaScript value or Object which provides the reason passed into Promise.reject().
|
|
1631
|
+
*
|
|
1632
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason)
|
|
1633
|
+
*/
|
|
1634
|
+
readonly reason: any;
|
|
1635
|
+
}
|
|
1636
|
+
/**
|
|
1637
|
+
* 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 Window/fetch, XMLHttpRequest.send() or navigator.sendBeacon() methods.
|
|
1404
1638
|
*
|
|
1405
1639
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)
|
|
1406
1640
|
*/
|
|
1407
1641
|
declare class FormData {
|
|
1408
1642
|
constructor();
|
|
1409
|
-
|
|
1643
|
+
/**
|
|
1644
|
+
* 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.
|
|
1645
|
+
*
|
|
1646
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append)
|
|
1647
|
+
*/
|
|
1410
1648
|
append(name: string, value: string): void;
|
|
1411
|
-
|
|
1649
|
+
/**
|
|
1650
|
+
* 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.
|
|
1651
|
+
*
|
|
1652
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append)
|
|
1653
|
+
*/
|
|
1412
1654
|
append(name: string, value: Blob, filename?: string): void;
|
|
1413
|
-
|
|
1655
|
+
/**
|
|
1656
|
+
* The **`delete()`** method of the FormData interface deletes a key and its value(s) from a `FormData` object.
|
|
1657
|
+
*
|
|
1658
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete)
|
|
1659
|
+
*/
|
|
1414
1660
|
delete(name: string): void;
|
|
1415
|
-
|
|
1661
|
+
/**
|
|
1662
|
+
* The **`get()`** method of the FormData interface returns the first value associated with a given key from within a `FormData` object.
|
|
1663
|
+
*
|
|
1664
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get)
|
|
1665
|
+
*/
|
|
1416
1666
|
get(name: string): (File | string) | null;
|
|
1417
|
-
|
|
1667
|
+
/**
|
|
1668
|
+
* The **`getAll()`** method of the FormData interface returns all the values associated with a given key from within a `FormData` object.
|
|
1669
|
+
*
|
|
1670
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll)
|
|
1671
|
+
*/
|
|
1418
1672
|
getAll(name: string): (File | string)[];
|
|
1419
|
-
|
|
1673
|
+
/**
|
|
1674
|
+
* The **`has()`** method of the FormData interface returns whether a `FormData` object contains a certain key.
|
|
1675
|
+
*
|
|
1676
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has)
|
|
1677
|
+
*/
|
|
1420
1678
|
has(name: string): boolean;
|
|
1421
|
-
|
|
1679
|
+
/**
|
|
1680
|
+
* 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.
|
|
1681
|
+
*
|
|
1682
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set)
|
|
1683
|
+
*/
|
|
1422
1684
|
set(name: string, value: string): void;
|
|
1423
|
-
|
|
1685
|
+
/**
|
|
1686
|
+
* 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.
|
|
1687
|
+
*
|
|
1688
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set)
|
|
1689
|
+
*/
|
|
1424
1690
|
set(name: string, value: Blob, filename?: string): void;
|
|
1425
1691
|
/* Returns an array of key, value pairs for every entry in the list. */
|
|
1426
1692
|
entries(): IterableIterator<[key: string, value: File | string]>;
|
|
@@ -1546,14 +1812,22 @@ interface DocumentEnd {
|
|
|
1546
1812
|
append(content: string, options?: ContentOptions): DocumentEnd;
|
|
1547
1813
|
}
|
|
1548
1814
|
/**
|
|
1549
|
-
* This is the event type for fetch
|
|
1815
|
+
* This is the event type for `fetch` events dispatched on the ServiceWorkerGlobalScope.
|
|
1550
1816
|
*
|
|
1551
1817
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent)
|
|
1552
1818
|
*/
|
|
1553
1819
|
declare abstract class FetchEvent extends ExtendableEvent {
|
|
1554
|
-
|
|
1820
|
+
/**
|
|
1821
|
+
* The **`request`** read-only property of the the event handler.
|
|
1822
|
+
*
|
|
1823
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request)
|
|
1824
|
+
*/
|
|
1555
1825
|
readonly request: Request;
|
|
1556
|
-
|
|
1826
|
+
/**
|
|
1827
|
+
* The **`respondWith()`** method of allows you to provide a promise for a Response yourself.
|
|
1828
|
+
*
|
|
1829
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith)
|
|
1830
|
+
*/
|
|
1557
1831
|
respondWith(promise: Response | Promise<Response>): void;
|
|
1558
1832
|
passThroughOnException(): void;
|
|
1559
1833
|
}
|
|
@@ -1562,22 +1836,42 @@ type HeadersInit =
|
|
|
1562
1836
|
| Iterable<Iterable<string>>
|
|
1563
1837
|
| Record<string, string>;
|
|
1564
1838
|
/**
|
|
1565
|
-
*
|
|
1839
|
+
* The **`Headers`** interface of the Fetch API allows you to perform various actions on HTTP request and response headers.
|
|
1566
1840
|
*
|
|
1567
1841
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers)
|
|
1568
1842
|
*/
|
|
1569
1843
|
declare class Headers {
|
|
1570
1844
|
constructor(init?: HeadersInit);
|
|
1571
|
-
|
|
1845
|
+
/**
|
|
1846
|
+
* 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.
|
|
1847
|
+
*
|
|
1848
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get)
|
|
1849
|
+
*/
|
|
1572
1850
|
get(name: string): string | null;
|
|
1573
1851
|
getAll(name: string): string[];
|
|
1574
|
-
|
|
1852
|
+
/**
|
|
1853
|
+
* The **`has()`** method of the Headers interface returns a boolean stating whether a `Headers` object contains a certain header.
|
|
1854
|
+
*
|
|
1855
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has)
|
|
1856
|
+
*/
|
|
1575
1857
|
has(name: string): boolean;
|
|
1576
|
-
|
|
1858
|
+
/**
|
|
1859
|
+
* 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.
|
|
1860
|
+
*
|
|
1861
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set)
|
|
1862
|
+
*/
|
|
1577
1863
|
set(name: string, value: string): void;
|
|
1578
|
-
|
|
1864
|
+
/**
|
|
1865
|
+
* 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.
|
|
1866
|
+
*
|
|
1867
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append)
|
|
1868
|
+
*/
|
|
1579
1869
|
append(name: string, value: string): void;
|
|
1580
|
-
|
|
1870
|
+
/**
|
|
1871
|
+
* The **`delete()`** method of the Headers interface deletes a header from the current `Headers` object.
|
|
1872
|
+
*
|
|
1873
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete)
|
|
1874
|
+
*/
|
|
1581
1875
|
delete(name: string): void;
|
|
1582
1876
|
forEach<This = unknown>(
|
|
1583
1877
|
callback: (this: This, value: string, key: string, parent: Headers) => void,
|
|
@@ -1618,7 +1912,7 @@ declare abstract class Body {
|
|
|
1618
1912
|
blob(): Promise<Blob>;
|
|
1619
1913
|
}
|
|
1620
1914
|
/**
|
|
1621
|
-
*
|
|
1915
|
+
* The **`Response`** interface of the Fetch API represents the response to a request.
|
|
1622
1916
|
*
|
|
1623
1917
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
|
|
1624
1918
|
*/
|
|
@@ -1630,28 +1924,60 @@ declare var Response: {
|
|
|
1630
1924
|
json(any: any, maybeInit?: ResponseInit | Response): Response;
|
|
1631
1925
|
};
|
|
1632
1926
|
/**
|
|
1633
|
-
*
|
|
1927
|
+
* The **`Response`** interface of the Fetch API represents the response to a request.
|
|
1634
1928
|
*
|
|
1635
1929
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
|
|
1636
1930
|
*/
|
|
1637
1931
|
interface Response extends Body {
|
|
1638
|
-
|
|
1932
|
+
/**
|
|
1933
|
+
* The **`clone()`** method of the Response interface creates a clone of a response object, identical in every way, but stored in a different variable.
|
|
1934
|
+
*
|
|
1935
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone)
|
|
1936
|
+
*/
|
|
1639
1937
|
clone(): Response;
|
|
1640
|
-
|
|
1938
|
+
/**
|
|
1939
|
+
* The **`status`** read-only property of the Response interface contains the HTTP status codes of the response.
|
|
1940
|
+
*
|
|
1941
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status)
|
|
1942
|
+
*/
|
|
1641
1943
|
status: number;
|
|
1642
|
-
|
|
1944
|
+
/**
|
|
1945
|
+
* The **`statusText`** read-only property of the Response interface contains the status message corresponding to the HTTP status code in Response.status.
|
|
1946
|
+
*
|
|
1947
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText)
|
|
1948
|
+
*/
|
|
1643
1949
|
statusText: string;
|
|
1644
|
-
|
|
1950
|
+
/**
|
|
1951
|
+
* The **`headers`** read-only property of the with the response.
|
|
1952
|
+
*
|
|
1953
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers)
|
|
1954
|
+
*/
|
|
1645
1955
|
headers: Headers;
|
|
1646
|
-
|
|
1956
|
+
/**
|
|
1957
|
+
* The **`ok`** read-only property of the Response interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.
|
|
1958
|
+
*
|
|
1959
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok)
|
|
1960
|
+
*/
|
|
1647
1961
|
ok: boolean;
|
|
1648
|
-
|
|
1962
|
+
/**
|
|
1963
|
+
* The **`redirected`** read-only property of the Response interface indicates whether or not the response is the result of a request you made which was redirected.
|
|
1964
|
+
*
|
|
1965
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected)
|
|
1966
|
+
*/
|
|
1649
1967
|
redirected: boolean;
|
|
1650
|
-
|
|
1968
|
+
/**
|
|
1969
|
+
* The **`url`** read-only property of the Response interface contains the URL of the response.
|
|
1970
|
+
*
|
|
1971
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url)
|
|
1972
|
+
*/
|
|
1651
1973
|
url: string;
|
|
1652
1974
|
webSocket: WebSocket | null;
|
|
1653
1975
|
cf: any | undefined;
|
|
1654
|
-
|
|
1976
|
+
/**
|
|
1977
|
+
* The **`type`** read-only property of the Response interface contains the type of the response.
|
|
1978
|
+
*
|
|
1979
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/type)
|
|
1980
|
+
*/
|
|
1655
1981
|
type: "default" | "error";
|
|
1656
1982
|
}
|
|
1657
1983
|
interface ResponseInit {
|
|
@@ -1666,7 +1992,7 @@ type RequestInfo<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> =
|
|
|
1666
1992
|
| Request<CfHostMetadata, Cf>
|
|
1667
1993
|
| string;
|
|
1668
1994
|
/**
|
|
1669
|
-
*
|
|
1995
|
+
* The **`Request`** interface of the Fetch API represents a resource request.
|
|
1670
1996
|
*
|
|
1671
1997
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
|
|
1672
1998
|
*/
|
|
@@ -1678,54 +2004,58 @@ declare var Request: {
|
|
|
1678
2004
|
): Request<CfHostMetadata, Cf>;
|
|
1679
2005
|
};
|
|
1680
2006
|
/**
|
|
1681
|
-
*
|
|
2007
|
+
* The **`Request`** interface of the Fetch API represents a resource request.
|
|
1682
2008
|
*
|
|
1683
2009
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
|
|
1684
2010
|
*/
|
|
1685
2011
|
interface Request<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>>
|
|
1686
2012
|
extends Body {
|
|
1687
|
-
|
|
2013
|
+
/**
|
|
2014
|
+
* The **`clone()`** method of the Request interface creates a copy of the current `Request` object.
|
|
2015
|
+
*
|
|
2016
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone)
|
|
2017
|
+
*/
|
|
1688
2018
|
clone(): Request<CfHostMetadata, Cf>;
|
|
1689
2019
|
/**
|
|
1690
|
-
*
|
|
2020
|
+
* The **`method`** read-only property of the `POST`, etc.) A String indicating the method of the request.
|
|
1691
2021
|
*
|
|
1692
2022
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/method)
|
|
1693
2023
|
*/
|
|
1694
2024
|
method: string;
|
|
1695
2025
|
/**
|
|
1696
|
-
*
|
|
2026
|
+
* The **`url`** read-only property of the Request interface contains the URL of the request.
|
|
1697
2027
|
*
|
|
1698
2028
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/url)
|
|
1699
2029
|
*/
|
|
1700
2030
|
url: string;
|
|
1701
2031
|
/**
|
|
1702
|
-
*
|
|
2032
|
+
* The **`headers`** read-only property of the with the request.
|
|
1703
2033
|
*
|
|
1704
2034
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/headers)
|
|
1705
2035
|
*/
|
|
1706
2036
|
headers: Headers;
|
|
1707
2037
|
/**
|
|
1708
|
-
*
|
|
2038
|
+
* The **`redirect`** read-only property of the Request interface contains the mode for how redirects are handled.
|
|
1709
2039
|
*
|
|
1710
2040
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/redirect)
|
|
1711
2041
|
*/
|
|
1712
2042
|
redirect: string;
|
|
1713
2043
|
fetcher: Fetcher | null;
|
|
1714
2044
|
/**
|
|
1715
|
-
*
|
|
2045
|
+
* The read-only **`signal`** property of the Request interface returns the AbortSignal associated with the request.
|
|
1716
2046
|
*
|
|
1717
2047
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/signal)
|
|
1718
2048
|
*/
|
|
1719
2049
|
signal: AbortSignal;
|
|
1720
2050
|
cf: Cf | undefined;
|
|
1721
2051
|
/**
|
|
1722
|
-
*
|
|
2052
|
+
* The **`integrity`** read-only property of the Request interface contains the subresource integrity value of the request.
|
|
1723
2053
|
*
|
|
1724
2054
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/integrity)
|
|
1725
2055
|
*/
|
|
1726
2056
|
integrity: string;
|
|
1727
2057
|
/**
|
|
1728
|
-
*
|
|
2058
|
+
* 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.
|
|
1729
2059
|
*
|
|
1730
2060
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive)
|
|
1731
2061
|
*/
|
|
@@ -2234,30 +2564,58 @@ type ReadableStreamReadResult<R = any> =
|
|
|
2234
2564
|
value?: undefined;
|
|
2235
2565
|
};
|
|
2236
2566
|
/**
|
|
2237
|
-
*
|
|
2567
|
+
* The `ReadableStream` interface of the Streams API represents a readable stream of byte data.
|
|
2238
2568
|
*
|
|
2239
2569
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2240
2570
|
*/
|
|
2241
2571
|
interface ReadableStream<R = any> {
|
|
2242
|
-
|
|
2572
|
+
/**
|
|
2573
|
+
* The **`locked`** read-only property of the ReadableStream interface returns whether or not the readable stream is locked to a reader.
|
|
2574
|
+
*
|
|
2575
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked)
|
|
2576
|
+
*/
|
|
2243
2577
|
get locked(): boolean;
|
|
2244
|
-
|
|
2578
|
+
/**
|
|
2579
|
+
* The **`cancel()`** method of the ReadableStream interface returns a Promise that resolves when the stream is canceled.
|
|
2580
|
+
*
|
|
2581
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel)
|
|
2582
|
+
*/
|
|
2245
2583
|
cancel(reason?: any): Promise<void>;
|
|
2246
|
-
|
|
2584
|
+
/**
|
|
2585
|
+
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it.
|
|
2586
|
+
*
|
|
2587
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
|
|
2588
|
+
*/
|
|
2247
2589
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
2248
|
-
|
|
2590
|
+
/**
|
|
2591
|
+
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it.
|
|
2592
|
+
*
|
|
2593
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
|
|
2594
|
+
*/
|
|
2249
2595
|
getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader;
|
|
2250
|
-
|
|
2596
|
+
/**
|
|
2597
|
+
* The **`pipeThrough()`** method of the ReadableStream interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.
|
|
2598
|
+
*
|
|
2599
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough)
|
|
2600
|
+
*/
|
|
2251
2601
|
pipeThrough<T>(
|
|
2252
2602
|
transform: ReadableWritablePair<T, R>,
|
|
2253
2603
|
options?: StreamPipeOptions,
|
|
2254
2604
|
): ReadableStream<T>;
|
|
2255
|
-
|
|
2605
|
+
/**
|
|
2606
|
+
* 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.
|
|
2607
|
+
*
|
|
2608
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo)
|
|
2609
|
+
*/
|
|
2256
2610
|
pipeTo(
|
|
2257
2611
|
destination: WritableStream<R>,
|
|
2258
2612
|
options?: StreamPipeOptions,
|
|
2259
2613
|
): Promise<void>;
|
|
2260
|
-
|
|
2614
|
+
/**
|
|
2615
|
+
* The **`tee()`** method of the two-element array containing the two resulting branches as new ReadableStream instances.
|
|
2616
|
+
*
|
|
2617
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee)
|
|
2618
|
+
*/
|
|
2261
2619
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
2262
2620
|
values(options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
|
|
2263
2621
|
[Symbol.asyncIterator](
|
|
@@ -2265,7 +2623,7 @@ interface ReadableStream<R = any> {
|
|
|
2265
2623
|
): AsyncIterableIterator<R>;
|
|
2266
2624
|
}
|
|
2267
2625
|
/**
|
|
2268
|
-
*
|
|
2626
|
+
* The `ReadableStream` interface of the Streams API represents a readable stream of byte data.
|
|
2269
2627
|
*
|
|
2270
2628
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2271
2629
|
*/
|
|
@@ -2280,26 +2638,50 @@ declare const ReadableStream: {
|
|
|
2280
2638
|
strategy?: QueuingStrategy<R>,
|
|
2281
2639
|
): ReadableStream<R>;
|
|
2282
2640
|
};
|
|
2283
|
-
|
|
2641
|
+
/**
|
|
2642
|
+
* The **`ReadableStreamDefaultReader`** interface of the Streams API represents a default reader that can be used to read stream data supplied from a network (such as a fetch request).
|
|
2643
|
+
*
|
|
2644
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader)
|
|
2645
|
+
*/
|
|
2284
2646
|
declare class ReadableStreamDefaultReader<R = any> {
|
|
2285
2647
|
constructor(stream: ReadableStream);
|
|
2286
2648
|
get closed(): Promise<void>;
|
|
2287
2649
|
cancel(reason?: any): Promise<void>;
|
|
2288
|
-
|
|
2650
|
+
/**
|
|
2651
|
+
* The **`read()`** method of the ReadableStreamDefaultReader interface returns a Promise providing access to the next chunk in the stream's internal queue.
|
|
2652
|
+
*
|
|
2653
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read)
|
|
2654
|
+
*/
|
|
2289
2655
|
read(): Promise<ReadableStreamReadResult<R>>;
|
|
2290
|
-
|
|
2656
|
+
/**
|
|
2657
|
+
* The **`releaseLock()`** method of the ReadableStreamDefaultReader interface releases the reader's lock on the stream.
|
|
2658
|
+
*
|
|
2659
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock)
|
|
2660
|
+
*/
|
|
2291
2661
|
releaseLock(): void;
|
|
2292
2662
|
}
|
|
2293
|
-
|
|
2663
|
+
/**
|
|
2664
|
+
* The `ReadableStreamBYOBReader` interface of the Streams API defines a reader for a ReadableStream that supports zero-copy reading from an underlying byte source.
|
|
2665
|
+
*
|
|
2666
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader)
|
|
2667
|
+
*/
|
|
2294
2668
|
declare class ReadableStreamBYOBReader {
|
|
2295
2669
|
constructor(stream: ReadableStream);
|
|
2296
2670
|
get closed(): Promise<void>;
|
|
2297
2671
|
cancel(reason?: any): Promise<void>;
|
|
2298
|
-
|
|
2672
|
+
/**
|
|
2673
|
+
* 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.
|
|
2674
|
+
*
|
|
2675
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
|
|
2676
|
+
*/
|
|
2299
2677
|
read<T extends ArrayBufferView>(
|
|
2300
2678
|
view: T,
|
|
2301
2679
|
): Promise<ReadableStreamReadResult<T>>;
|
|
2302
|
-
|
|
2680
|
+
/**
|
|
2681
|
+
* The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
|
|
2682
|
+
*
|
|
2683
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock)
|
|
2684
|
+
*/
|
|
2303
2685
|
releaseLock(): void;
|
|
2304
2686
|
readAtLeast<T extends ArrayBufferView>(
|
|
2305
2687
|
minElements: number,
|
|
@@ -2317,60 +2699,148 @@ interface ReadableStreamGetReaderOptions {
|
|
|
2317
2699
|
*/
|
|
2318
2700
|
mode: "byob";
|
|
2319
2701
|
}
|
|
2320
|
-
|
|
2702
|
+
/**
|
|
2703
|
+
* 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).
|
|
2704
|
+
*
|
|
2705
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest)
|
|
2706
|
+
*/
|
|
2321
2707
|
interface ReadableStreamBYOBRequest {
|
|
2322
|
-
|
|
2708
|
+
/**
|
|
2709
|
+
* The **`view`** getter property of the ReadableStreamBYOBRequest interface returns the current view.
|
|
2710
|
+
*
|
|
2711
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view)
|
|
2712
|
+
*/
|
|
2323
2713
|
get view(): Uint8Array | null;
|
|
2324
|
-
|
|
2714
|
+
/**
|
|
2715
|
+
* The **`respond()`** method of the ReadableStreamBYOBRequest interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the ReadableStreamBYOBRequest.view.
|
|
2716
|
+
*
|
|
2717
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond)
|
|
2718
|
+
*/
|
|
2325
2719
|
respond(bytesWritten: number): void;
|
|
2326
|
-
|
|
2720
|
+
/**
|
|
2721
|
+
* The **`respondWithNewView()`** method of the ReadableStreamBYOBRequest interface specifies a new view that the consumer of the associated readable byte stream should write to instead of ReadableStreamBYOBRequest.view.
|
|
2722
|
+
*
|
|
2723
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView)
|
|
2724
|
+
*/
|
|
2327
2725
|
respondWithNewView(view: ArrayBuffer | ArrayBufferView): void;
|
|
2328
2726
|
get atLeast(): number | null;
|
|
2329
2727
|
}
|
|
2330
|
-
|
|
2728
|
+
/**
|
|
2729
|
+
* The **`ReadableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a ReadableStream's state and internal queue.
|
|
2730
|
+
*
|
|
2731
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController)
|
|
2732
|
+
*/
|
|
2331
2733
|
interface ReadableStreamDefaultController<R = any> {
|
|
2332
|
-
|
|
2734
|
+
/**
|
|
2735
|
+
* The **`desiredSize`** read-only property of the required to fill the stream's internal queue.
|
|
2736
|
+
*
|
|
2737
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize)
|
|
2738
|
+
*/
|
|
2333
2739
|
get desiredSize(): number | null;
|
|
2334
|
-
|
|
2740
|
+
/**
|
|
2741
|
+
* The **`close()`** method of the ReadableStreamDefaultController interface closes the associated stream.
|
|
2742
|
+
*
|
|
2743
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close)
|
|
2744
|
+
*/
|
|
2335
2745
|
close(): void;
|
|
2336
|
-
|
|
2746
|
+
/**
|
|
2747
|
+
* The **`enqueue()`** method of the ```js-nolint enqueue(chunk) ``` - `chunk` - : The chunk to enqueue.
|
|
2748
|
+
*
|
|
2749
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)
|
|
2750
|
+
*/
|
|
2337
2751
|
enqueue(chunk?: R): void;
|
|
2338
|
-
|
|
2752
|
+
/**
|
|
2753
|
+
* The **`error()`** method of the with the associated stream to error.
|
|
2754
|
+
*
|
|
2755
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error)
|
|
2756
|
+
*/
|
|
2339
2757
|
error(reason: any): void;
|
|
2340
2758
|
}
|
|
2341
|
-
|
|
2759
|
+
/**
|
|
2760
|
+
* The **`ReadableByteStreamController`** interface of the Streams API represents a controller for a readable byte stream.
|
|
2761
|
+
*
|
|
2762
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController)
|
|
2763
|
+
*/
|
|
2342
2764
|
interface ReadableByteStreamController {
|
|
2343
|
-
|
|
2765
|
+
/**
|
|
2766
|
+
* The **`byobRequest`** read-only property of the ReadableByteStreamController interface returns the current BYOB request, or `null` if there are no pending requests.
|
|
2767
|
+
*
|
|
2768
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest)
|
|
2769
|
+
*/
|
|
2344
2770
|
get byobRequest(): ReadableStreamBYOBRequest | null;
|
|
2345
|
-
|
|
2771
|
+
/**
|
|
2772
|
+
* 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'.
|
|
2773
|
+
*
|
|
2774
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize)
|
|
2775
|
+
*/
|
|
2346
2776
|
get desiredSize(): number | null;
|
|
2347
|
-
|
|
2777
|
+
/**
|
|
2778
|
+
* The **`close()`** method of the ReadableByteStreamController interface closes the associated stream.
|
|
2779
|
+
*
|
|
2780
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close)
|
|
2781
|
+
*/
|
|
2348
2782
|
close(): void;
|
|
2349
|
-
|
|
2783
|
+
/**
|
|
2784
|
+
* The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is copied into the stream's internal queues).
|
|
2785
|
+
*
|
|
2786
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue)
|
|
2787
|
+
*/
|
|
2350
2788
|
enqueue(chunk: ArrayBuffer | ArrayBufferView): void;
|
|
2351
|
-
|
|
2789
|
+
/**
|
|
2790
|
+
* The **`error()`** method of the ReadableByteStreamController interface causes any future interactions with the associated stream to error with the specified reason.
|
|
2791
|
+
*
|
|
2792
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error)
|
|
2793
|
+
*/
|
|
2352
2794
|
error(reason: any): void;
|
|
2353
2795
|
}
|
|
2354
2796
|
/**
|
|
2355
|
-
*
|
|
2797
|
+
* The **`WritableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a WritableStream's state.
|
|
2356
2798
|
*
|
|
2357
2799
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
2358
2800
|
*/
|
|
2359
2801
|
interface WritableStreamDefaultController {
|
|
2360
|
-
|
|
2802
|
+
/**
|
|
2803
|
+
* The read-only **`signal`** property of the WritableStreamDefaultController interface returns the AbortSignal associated with the controller.
|
|
2804
|
+
*
|
|
2805
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal)
|
|
2806
|
+
*/
|
|
2361
2807
|
get signal(): AbortSignal;
|
|
2362
|
-
|
|
2808
|
+
/**
|
|
2809
|
+
* The **`error()`** method of the with the associated stream to error.
|
|
2810
|
+
*
|
|
2811
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error)
|
|
2812
|
+
*/
|
|
2363
2813
|
error(reason?: any): void;
|
|
2364
2814
|
}
|
|
2365
|
-
|
|
2815
|
+
/**
|
|
2816
|
+
* The **`TransformStreamDefaultController`** interface of the Streams API provides methods to manipulate the associated ReadableStream and WritableStream.
|
|
2817
|
+
*
|
|
2818
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController)
|
|
2819
|
+
*/
|
|
2366
2820
|
interface TransformStreamDefaultController<O = any> {
|
|
2367
|
-
|
|
2821
|
+
/**
|
|
2822
|
+
* The **`desiredSize`** read-only property of the TransformStreamDefaultController interface returns the desired size to fill the queue of the associated ReadableStream.
|
|
2823
|
+
*
|
|
2824
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize)
|
|
2825
|
+
*/
|
|
2368
2826
|
get desiredSize(): number | null;
|
|
2369
|
-
|
|
2827
|
+
/**
|
|
2828
|
+
* The **`enqueue()`** method of the TransformStreamDefaultController interface enqueues the given chunk in the readable side of the stream.
|
|
2829
|
+
*
|
|
2830
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue)
|
|
2831
|
+
*/
|
|
2370
2832
|
enqueue(chunk?: O): void;
|
|
2371
|
-
|
|
2833
|
+
/**
|
|
2834
|
+
* The **`error()`** method of the TransformStreamDefaultController interface errors both sides of the stream.
|
|
2835
|
+
*
|
|
2836
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error)
|
|
2837
|
+
*/
|
|
2372
2838
|
error(reason: any): void;
|
|
2373
|
-
|
|
2839
|
+
/**
|
|
2840
|
+
* The **`terminate()`** method of the TransformStreamDefaultController interface closes the readable side and errors the writable side of the stream.
|
|
2841
|
+
*
|
|
2842
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate)
|
|
2843
|
+
*/
|
|
2374
2844
|
terminate(): void;
|
|
2375
2845
|
}
|
|
2376
2846
|
interface ReadableWritablePair<R = any, W = any> {
|
|
@@ -2383,7 +2853,7 @@ interface ReadableWritablePair<R = any, W = any> {
|
|
|
2383
2853
|
readable: ReadableStream<R>;
|
|
2384
2854
|
}
|
|
2385
2855
|
/**
|
|
2386
|
-
*
|
|
2856
|
+
* The **`WritableStream`** interface of the Streams API provides a standard abstraction for writing streaming data to a destination, known as a sink.
|
|
2387
2857
|
*
|
|
2388
2858
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
|
|
2389
2859
|
*/
|
|
@@ -2392,47 +2862,103 @@ declare class WritableStream<W = any> {
|
|
|
2392
2862
|
underlyingSink?: UnderlyingSink,
|
|
2393
2863
|
queuingStrategy?: QueuingStrategy,
|
|
2394
2864
|
);
|
|
2395
|
-
|
|
2865
|
+
/**
|
|
2866
|
+
* The **`locked`** read-only property of the WritableStream interface returns a boolean indicating whether the `WritableStream` is locked to a writer.
|
|
2867
|
+
*
|
|
2868
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked)
|
|
2869
|
+
*/
|
|
2396
2870
|
get locked(): boolean;
|
|
2397
|
-
|
|
2871
|
+
/**
|
|
2872
|
+
* The **`abort()`** method of the WritableStream 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.
|
|
2873
|
+
*
|
|
2874
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort)
|
|
2875
|
+
*/
|
|
2398
2876
|
abort(reason?: any): Promise<void>;
|
|
2399
|
-
|
|
2877
|
+
/**
|
|
2878
|
+
* The **`close()`** method of the WritableStream interface closes the associated stream.
|
|
2879
|
+
*
|
|
2880
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close)
|
|
2881
|
+
*/
|
|
2400
2882
|
close(): Promise<void>;
|
|
2401
|
-
|
|
2883
|
+
/**
|
|
2884
|
+
* The **`getWriter()`** method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance.
|
|
2885
|
+
*
|
|
2886
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter)
|
|
2887
|
+
*/
|
|
2402
2888
|
getWriter(): WritableStreamDefaultWriter<W>;
|
|
2403
2889
|
}
|
|
2404
2890
|
/**
|
|
2405
|
-
*
|
|
2891
|
+
* 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.
|
|
2406
2892
|
*
|
|
2407
2893
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
|
|
2408
2894
|
*/
|
|
2409
2895
|
declare class WritableStreamDefaultWriter<W = any> {
|
|
2410
2896
|
constructor(stream: WritableStream);
|
|
2411
|
-
|
|
2897
|
+
/**
|
|
2898
|
+
* The **`closed`** read-only property of the the stream errors or the writer's lock is released.
|
|
2899
|
+
*
|
|
2900
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed)
|
|
2901
|
+
*/
|
|
2412
2902
|
get closed(): Promise<void>;
|
|
2413
|
-
|
|
2903
|
+
/**
|
|
2904
|
+
* 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.
|
|
2905
|
+
*
|
|
2906
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready)
|
|
2907
|
+
*/
|
|
2414
2908
|
get ready(): Promise<void>;
|
|
2415
|
-
|
|
2909
|
+
/**
|
|
2910
|
+
* The **`desiredSize`** read-only property of the to fill the stream's internal queue.
|
|
2911
|
+
*
|
|
2912
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize)
|
|
2913
|
+
*/
|
|
2416
2914
|
get desiredSize(): number | null;
|
|
2417
|
-
|
|
2915
|
+
/**
|
|
2916
|
+
* 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.
|
|
2917
|
+
*
|
|
2918
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort)
|
|
2919
|
+
*/
|
|
2418
2920
|
abort(reason?: any): Promise<void>;
|
|
2419
|
-
|
|
2921
|
+
/**
|
|
2922
|
+
* The **`close()`** method of the stream.
|
|
2923
|
+
*
|
|
2924
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close)
|
|
2925
|
+
*/
|
|
2420
2926
|
close(): Promise<void>;
|
|
2421
|
-
|
|
2927
|
+
/**
|
|
2928
|
+
* The **`write()`** method of the operation.
|
|
2929
|
+
*
|
|
2930
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write)
|
|
2931
|
+
*/
|
|
2422
2932
|
write(chunk?: W): Promise<void>;
|
|
2423
|
-
|
|
2933
|
+
/**
|
|
2934
|
+
* The **`releaseLock()`** method of the corresponding stream.
|
|
2935
|
+
*
|
|
2936
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock)
|
|
2937
|
+
*/
|
|
2424
2938
|
releaseLock(): void;
|
|
2425
2939
|
}
|
|
2426
|
-
|
|
2940
|
+
/**
|
|
2941
|
+
* The **`TransformStream`** interface of the Streams API represents a concrete implementation of the pipe chain _transform stream_ concept.
|
|
2942
|
+
*
|
|
2943
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream)
|
|
2944
|
+
*/
|
|
2427
2945
|
declare class TransformStream<I = any, O = any> {
|
|
2428
2946
|
constructor(
|
|
2429
2947
|
transformer?: Transformer<I, O>,
|
|
2430
2948
|
writableStrategy?: QueuingStrategy<I>,
|
|
2431
2949
|
readableStrategy?: QueuingStrategy<O>,
|
|
2432
2950
|
);
|
|
2433
|
-
|
|
2951
|
+
/**
|
|
2952
|
+
* The **`readable`** read-only property of the TransformStream interface returns the ReadableStream instance controlled by this `TransformStream`.
|
|
2953
|
+
*
|
|
2954
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable)
|
|
2955
|
+
*/
|
|
2434
2956
|
get readable(): ReadableStream<O>;
|
|
2435
|
-
|
|
2957
|
+
/**
|
|
2958
|
+
* The **`writable`** read-only property of the TransformStream interface returns the WritableStream instance controlled by this `TransformStream`.
|
|
2959
|
+
*
|
|
2960
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable)
|
|
2961
|
+
*/
|
|
2436
2962
|
get writable(): WritableStream<I>;
|
|
2437
2963
|
}
|
|
2438
2964
|
declare class FixedLengthStream extends IdentityTransformStream {
|
|
@@ -2453,26 +2979,42 @@ interface IdentityTransformStreamQueuingStrategy {
|
|
|
2453
2979
|
interface ReadableStreamValuesOptions {
|
|
2454
2980
|
preventCancel?: boolean;
|
|
2455
2981
|
}
|
|
2456
|
-
|
|
2982
|
+
/**
|
|
2983
|
+
* The **`CompressionStream`** interface of the Compression Streams API is an API for compressing a stream of data.
|
|
2984
|
+
*
|
|
2985
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream)
|
|
2986
|
+
*/
|
|
2457
2987
|
declare class CompressionStream extends TransformStream<
|
|
2458
2988
|
ArrayBuffer | ArrayBufferView,
|
|
2459
2989
|
Uint8Array
|
|
2460
2990
|
> {
|
|
2461
2991
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2462
2992
|
}
|
|
2463
|
-
|
|
2993
|
+
/**
|
|
2994
|
+
* The **`DecompressionStream`** interface of the Compression Streams API is an API for decompressing a stream of data.
|
|
2995
|
+
*
|
|
2996
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream)
|
|
2997
|
+
*/
|
|
2464
2998
|
declare class DecompressionStream extends TransformStream<
|
|
2465
2999
|
ArrayBuffer | ArrayBufferView,
|
|
2466
3000
|
Uint8Array
|
|
2467
3001
|
> {
|
|
2468
3002
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2469
3003
|
}
|
|
2470
|
-
|
|
3004
|
+
/**
|
|
3005
|
+
* The **`TextEncoderStream`** interface of the Encoding API converts a stream of strings into bytes in the UTF-8 encoding.
|
|
3006
|
+
*
|
|
3007
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream)
|
|
3008
|
+
*/
|
|
2471
3009
|
declare class TextEncoderStream extends TransformStream<string, Uint8Array> {
|
|
2472
3010
|
constructor();
|
|
2473
3011
|
get encoding(): string;
|
|
2474
3012
|
}
|
|
2475
|
-
|
|
3013
|
+
/**
|
|
3014
|
+
* 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.
|
|
3015
|
+
*
|
|
3016
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream)
|
|
3017
|
+
*/
|
|
2476
3018
|
declare class TextDecoderStream extends TransformStream<
|
|
2477
3019
|
ArrayBuffer | ArrayBufferView,
|
|
2478
3020
|
string
|
|
@@ -2487,7 +3029,7 @@ interface TextDecoderStreamTextDecoderStreamInit {
|
|
|
2487
3029
|
ignoreBOM?: boolean;
|
|
2488
3030
|
}
|
|
2489
3031
|
/**
|
|
2490
|
-
*
|
|
3032
|
+
* The **`ByteLengthQueuingStrategy`** interface of the Streams API provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2491
3033
|
*
|
|
2492
3034
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
|
|
2493
3035
|
*/
|
|
@@ -2495,19 +3037,27 @@ declare class ByteLengthQueuingStrategy
|
|
|
2495
3037
|
implements QueuingStrategy<ArrayBufferView>
|
|
2496
3038
|
{
|
|
2497
3039
|
constructor(init: QueuingStrategyInit);
|
|
2498
|
-
|
|
3040
|
+
/**
|
|
3041
|
+
* The read-only **`ByteLengthQueuingStrategy.highWaterMark`** property returns the total number of bytes that can be contained in the internal queue before backpressure is applied.
|
|
3042
|
+
*
|
|
3043
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark)
|
|
3044
|
+
*/
|
|
2499
3045
|
get highWaterMark(): number;
|
|
2500
3046
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
|
|
2501
3047
|
get size(): (chunk?: any) => number;
|
|
2502
3048
|
}
|
|
2503
3049
|
/**
|
|
2504
|
-
*
|
|
3050
|
+
* The **`CountQueuingStrategy`** interface of the Streams API provides a built-in chunk counting queuing strategy that can be used when constructing streams.
|
|
2505
3051
|
*
|
|
2506
3052
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
|
|
2507
3053
|
*/
|
|
2508
3054
|
declare class CountQueuingStrategy implements QueuingStrategy {
|
|
2509
3055
|
constructor(init: QueuingStrategyInit);
|
|
2510
|
-
|
|
3056
|
+
/**
|
|
3057
|
+
* The read-only **`CountQueuingStrategy.highWaterMark`** property returns the total number of chunks that can be contained in the internal queue before backpressure is applied.
|
|
3058
|
+
*
|
|
3059
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark)
|
|
3060
|
+
*/
|
|
2511
3061
|
get highWaterMark(): number;
|
|
2512
3062
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
|
|
2513
3063
|
get size(): (chunk?: any) => number;
|
|
@@ -2640,62 +3190,158 @@ interface UnsafeTraceMetrics {
|
|
|
2640
3190
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
2641
3191
|
}
|
|
2642
3192
|
/**
|
|
2643
|
-
* The URL
|
|
3193
|
+
* The **`URL`** interface is used to parse, construct, normalize, and encode URL.
|
|
2644
3194
|
*
|
|
2645
3195
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
2646
3196
|
*/
|
|
2647
3197
|
declare class URL {
|
|
2648
3198
|
constructor(url: string | URL, base?: string | URL);
|
|
2649
|
-
|
|
3199
|
+
/**
|
|
3200
|
+
* The **`href`** property of the URL interface is a string containing the whole URL.
|
|
3201
|
+
*
|
|
3202
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href)
|
|
3203
|
+
*/
|
|
2650
3204
|
get href(): string;
|
|
2651
|
-
|
|
3205
|
+
/**
|
|
3206
|
+
* The **`href`** property of the URL interface is a string containing the whole URL.
|
|
3207
|
+
*
|
|
3208
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href)
|
|
3209
|
+
*/
|
|
2652
3210
|
set href(value: string);
|
|
2653
|
-
|
|
3211
|
+
/**
|
|
3212
|
+
* The **`origin`** read-only property of the URL interface returns a string containing the Unicode serialization of the origin of the represented URL.
|
|
3213
|
+
*
|
|
3214
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin)
|
|
3215
|
+
*/
|
|
2654
3216
|
get origin(): string;
|
|
2655
|
-
|
|
3217
|
+
/**
|
|
3218
|
+
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final `':'`.
|
|
3219
|
+
*
|
|
3220
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
3221
|
+
*/
|
|
2656
3222
|
get protocol(): string;
|
|
2657
|
-
|
|
3223
|
+
/**
|
|
3224
|
+
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final `':'`.
|
|
3225
|
+
*
|
|
3226
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
3227
|
+
*/
|
|
2658
3228
|
set protocol(value: string);
|
|
2659
|
-
|
|
3229
|
+
/**
|
|
3230
|
+
* The **`username`** property of the URL interface is a string containing the username component of the URL.
|
|
3231
|
+
*
|
|
3232
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
3233
|
+
*/
|
|
2660
3234
|
get username(): string;
|
|
2661
|
-
|
|
3235
|
+
/**
|
|
3236
|
+
* The **`username`** property of the URL interface is a string containing the username component of the URL.
|
|
3237
|
+
*
|
|
3238
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
3239
|
+
*/
|
|
2662
3240
|
set username(value: string);
|
|
2663
|
-
|
|
3241
|
+
/**
|
|
3242
|
+
* The **`password`** property of the URL interface is a string containing the password component of the URL.
|
|
3243
|
+
*
|
|
3244
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
3245
|
+
*/
|
|
2664
3246
|
get password(): string;
|
|
2665
|
-
|
|
3247
|
+
/**
|
|
3248
|
+
* The **`password`** property of the URL interface is a string containing the password component of the URL.
|
|
3249
|
+
*
|
|
3250
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
3251
|
+
*/
|
|
2666
3252
|
set password(value: string);
|
|
2667
|
-
|
|
3253
|
+
/**
|
|
3254
|
+
* The **`host`** property of the URL interface is a string containing the host, which is the URL.hostname, and then, if the port of the URL is nonempty, a `':'`, followed by the URL.port of the URL.
|
|
3255
|
+
*
|
|
3256
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
3257
|
+
*/
|
|
2668
3258
|
get host(): string;
|
|
2669
|
-
|
|
3259
|
+
/**
|
|
3260
|
+
* The **`host`** property of the URL interface is a string containing the host, which is the URL.hostname, and then, if the port of the URL is nonempty, a `':'`, followed by the URL.port of the URL.
|
|
3261
|
+
*
|
|
3262
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
3263
|
+
*/
|
|
2670
3264
|
set host(value: string);
|
|
2671
|
-
|
|
3265
|
+
/**
|
|
3266
|
+
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL.
|
|
3267
|
+
*
|
|
3268
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
3269
|
+
*/
|
|
2672
3270
|
get hostname(): string;
|
|
2673
|
-
|
|
3271
|
+
/**
|
|
3272
|
+
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL.
|
|
3273
|
+
*
|
|
3274
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
3275
|
+
*/
|
|
2674
3276
|
set hostname(value: string);
|
|
2675
|
-
|
|
3277
|
+
/**
|
|
3278
|
+
* The **`port`** property of the URL interface is a string containing the port number of the URL.
|
|
3279
|
+
*
|
|
3280
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
3281
|
+
*/
|
|
2676
3282
|
get port(): string;
|
|
2677
|
-
|
|
3283
|
+
/**
|
|
3284
|
+
* The **`port`** property of the URL interface is a string containing the port number of the URL.
|
|
3285
|
+
*
|
|
3286
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
3287
|
+
*/
|
|
2678
3288
|
set port(value: string);
|
|
2679
|
-
|
|
3289
|
+
/**
|
|
3290
|
+
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure.
|
|
3291
|
+
*
|
|
3292
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
3293
|
+
*/
|
|
2680
3294
|
get pathname(): string;
|
|
2681
|
-
|
|
3295
|
+
/**
|
|
3296
|
+
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure.
|
|
3297
|
+
*
|
|
3298
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
3299
|
+
*/
|
|
2682
3300
|
set pathname(value: string);
|
|
2683
|
-
|
|
3301
|
+
/**
|
|
3302
|
+
* 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.
|
|
3303
|
+
*
|
|
3304
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
3305
|
+
*/
|
|
2684
3306
|
get search(): string;
|
|
2685
|
-
|
|
3307
|
+
/**
|
|
3308
|
+
* 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.
|
|
3309
|
+
*
|
|
3310
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
3311
|
+
*/
|
|
2686
3312
|
set search(value: string);
|
|
2687
|
-
|
|
3313
|
+
/**
|
|
3314
|
+
* The **`searchParams`** read-only property of the access to the [MISSING: httpmethod('GET')] decoded query arguments contained in the URL.
|
|
3315
|
+
*
|
|
3316
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams)
|
|
3317
|
+
*/
|
|
2688
3318
|
get searchParams(): URLSearchParams;
|
|
2689
|
-
|
|
3319
|
+
/**
|
|
3320
|
+
* The **`hash`** property of the URL interface is a string containing a `'#'` followed by the fragment identifier of the URL.
|
|
3321
|
+
*
|
|
3322
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
3323
|
+
*/
|
|
2690
3324
|
get hash(): string;
|
|
2691
|
-
|
|
3325
|
+
/**
|
|
3326
|
+
* The **`hash`** property of the URL interface is a string containing a `'#'` followed by the fragment identifier of the URL.
|
|
3327
|
+
*
|
|
3328
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
3329
|
+
*/
|
|
2692
3330
|
set hash(value: string);
|
|
2693
3331
|
/*function toString() { [native code] }*/
|
|
2694
3332
|
toString(): string;
|
|
2695
|
-
|
|
3333
|
+
/**
|
|
3334
|
+
* 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 ```js-nolint toJSON() ``` None.
|
|
3335
|
+
*
|
|
3336
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON)
|
|
3337
|
+
*/
|
|
2696
3338
|
toJSON(): string;
|
|
2697
3339
|
}
|
|
2698
|
-
|
|
3340
|
+
/**
|
|
3341
|
+
* The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL.
|
|
3342
|
+
*
|
|
3343
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams)
|
|
3344
|
+
*/
|
|
2699
3345
|
declare class URLSearchParams {
|
|
2700
3346
|
constructor(
|
|
2701
3347
|
init?:
|
|
@@ -2704,45 +3350,53 @@ declare class URLSearchParams {
|
|
|
2704
3350
|
| Record<string, string>
|
|
2705
3351
|
| [key: string, value: string][],
|
|
2706
3352
|
);
|
|
2707
|
-
|
|
3353
|
+
/**
|
|
3354
|
+
* The **`size`** read-only property of the URLSearchParams interface indicates the total number of search parameter entries.
|
|
3355
|
+
*
|
|
3356
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size)
|
|
3357
|
+
*/
|
|
2708
3358
|
get size(): number;
|
|
2709
3359
|
/**
|
|
2710
|
-
*
|
|
3360
|
+
* The **`append()`** method of the URLSearchParams interface appends a specified key/value pair as a new search parameter.
|
|
2711
3361
|
*
|
|
2712
3362
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
|
|
2713
3363
|
*/
|
|
2714
3364
|
append(name: string, value: string): void;
|
|
2715
3365
|
/**
|
|
2716
|
-
*
|
|
3366
|
+
* The **`delete()`** method of the URLSearchParams interface deletes specified parameters and their associated value(s) from the list of all search parameters.
|
|
2717
3367
|
*
|
|
2718
3368
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
2719
3369
|
*/
|
|
2720
3370
|
delete(name: string): void;
|
|
2721
3371
|
/**
|
|
2722
|
-
*
|
|
3372
|
+
* The **`get()`** method of the URLSearchParams interface returns the first value associated to the given search parameter.
|
|
2723
3373
|
*
|
|
2724
3374
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
|
|
2725
3375
|
*/
|
|
2726
3376
|
get(name: string): string | null;
|
|
2727
3377
|
/**
|
|
2728
|
-
*
|
|
3378
|
+
* The **`getAll()`** method of the URLSearchParams interface returns all the values associated with a given search parameter as an array.
|
|
2729
3379
|
*
|
|
2730
3380
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
|
|
2731
3381
|
*/
|
|
2732
3382
|
getAll(name: string): string[];
|
|
2733
3383
|
/**
|
|
2734
|
-
*
|
|
3384
|
+
* The **`has()`** method of the URLSearchParams interface returns a boolean value that indicates whether the specified parameter is in the search parameters.
|
|
2735
3385
|
*
|
|
2736
3386
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
|
|
2737
3387
|
*/
|
|
2738
3388
|
has(name: string): boolean;
|
|
2739
3389
|
/**
|
|
2740
|
-
*
|
|
3390
|
+
* The **`set()`** method of the URLSearchParams interface sets the value associated with a given search parameter to the given value.
|
|
2741
3391
|
*
|
|
2742
3392
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
2743
3393
|
*/
|
|
2744
3394
|
set(name: string, value: string): void;
|
|
2745
|
-
|
|
3395
|
+
/**
|
|
3396
|
+
* The **`URLSearchParams.sort()`** method sorts all key/value pairs contained in this object in place and returns `undefined`.
|
|
3397
|
+
*
|
|
3398
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort)
|
|
3399
|
+
*/
|
|
2746
3400
|
sort(): void;
|
|
2747
3401
|
/* Returns an array of key, value pairs for every entry in the search params. */
|
|
2748
3402
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
@@ -2759,7 +3413,7 @@ declare class URLSearchParams {
|
|
|
2759
3413
|
) => void,
|
|
2760
3414
|
thisArg?: This,
|
|
2761
3415
|
): void;
|
|
2762
|
-
/*function toString() { [native code] }
|
|
3416
|
+
/*function toString() { [native code] }*/
|
|
2763
3417
|
toString(): string;
|
|
2764
3418
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
2765
3419
|
}
|
|
@@ -2813,26 +3467,26 @@ interface URLPatternOptions {
|
|
|
2813
3467
|
ignoreCase?: boolean;
|
|
2814
3468
|
}
|
|
2815
3469
|
/**
|
|
2816
|
-
* A CloseEvent is sent to clients using WebSockets when the connection is closed.
|
|
3470
|
+
* A `CloseEvent` is sent to clients using WebSockets when the connection is closed.
|
|
2817
3471
|
*
|
|
2818
3472
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
|
|
2819
3473
|
*/
|
|
2820
3474
|
declare class CloseEvent extends Event {
|
|
2821
3475
|
constructor(type: string, initializer?: CloseEventInit);
|
|
2822
3476
|
/**
|
|
2823
|
-
*
|
|
3477
|
+
* The **`code`** read-only property of the CloseEvent interface returns a WebSocket connection close code indicating the reason the connection was closed.
|
|
2824
3478
|
*
|
|
2825
3479
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/code)
|
|
2826
3480
|
*/
|
|
2827
3481
|
readonly code: number;
|
|
2828
3482
|
/**
|
|
2829
|
-
*
|
|
3483
|
+
* The **`reason`** read-only property of the CloseEvent interface returns the WebSocket connection close reason the server gave for closing the connection; that is, a concise human-readable prose explanation for the closure.
|
|
2830
3484
|
*
|
|
2831
3485
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/reason)
|
|
2832
3486
|
*/
|
|
2833
3487
|
readonly reason: string;
|
|
2834
3488
|
/**
|
|
2835
|
-
*
|
|
3489
|
+
* The **`wasClean`** read-only property of the CloseEvent interface returns `true` if the connection closed cleanly.
|
|
2836
3490
|
*
|
|
2837
3491
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/wasClean)
|
|
2838
3492
|
*/
|
|
@@ -2850,7 +3504,7 @@ type WebSocketEventMap = {
|
|
|
2850
3504
|
error: ErrorEvent;
|
|
2851
3505
|
};
|
|
2852
3506
|
/**
|
|
2853
|
-
*
|
|
3507
|
+
* 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.
|
|
2854
3508
|
*
|
|
2855
3509
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2856
3510
|
*/
|
|
@@ -2867,20 +3521,20 @@ declare var WebSocket: {
|
|
|
2867
3521
|
readonly CLOSED: number;
|
|
2868
3522
|
};
|
|
2869
3523
|
/**
|
|
2870
|
-
*
|
|
3524
|
+
* 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.
|
|
2871
3525
|
*
|
|
2872
3526
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2873
3527
|
*/
|
|
2874
3528
|
interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
2875
3529
|
accept(): void;
|
|
2876
3530
|
/**
|
|
2877
|
-
*
|
|
3531
|
+
* 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.
|
|
2878
3532
|
*
|
|
2879
3533
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/send)
|
|
2880
3534
|
*/
|
|
2881
3535
|
send(message: (ArrayBuffer | ArrayBufferView) | string): void;
|
|
2882
3536
|
/**
|
|
2883
|
-
*
|
|
3537
|
+
* The **`WebSocket.close()`** method closes the already `CLOSED`, this method does nothing.
|
|
2884
3538
|
*
|
|
2885
3539
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/close)
|
|
2886
3540
|
*/
|
|
@@ -2888,25 +3542,25 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
2888
3542
|
serializeAttachment(attachment: any): void;
|
|
2889
3543
|
deserializeAttachment(): any | null;
|
|
2890
3544
|
/**
|
|
2891
|
-
*
|
|
3545
|
+
* The **`WebSocket.readyState`** read-only property returns the current state of the WebSocket connection.
|
|
2892
3546
|
*
|
|
2893
3547
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/readyState)
|
|
2894
3548
|
*/
|
|
2895
3549
|
readyState: number;
|
|
2896
3550
|
/**
|
|
2897
|
-
*
|
|
3551
|
+
* The **`WebSocket.url`** read-only property returns the absolute URL of the WebSocket as resolved by the constructor.
|
|
2898
3552
|
*
|
|
2899
3553
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/url)
|
|
2900
3554
|
*/
|
|
2901
3555
|
url: string | null;
|
|
2902
3556
|
/**
|
|
2903
|
-
*
|
|
3557
|
+
* 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.
|
|
2904
3558
|
*
|
|
2905
3559
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/protocol)
|
|
2906
3560
|
*/
|
|
2907
3561
|
protocol: string | null;
|
|
2908
3562
|
/**
|
|
2909
|
-
*
|
|
3563
|
+
* The **`WebSocket.extensions`** read-only property returns the extensions selected by the server.
|
|
2910
3564
|
*
|
|
2911
3565
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
2912
3566
|
*/
|
|
@@ -2975,29 +3629,33 @@ interface SocketInfo {
|
|
|
2975
3629
|
remoteAddress?: string;
|
|
2976
3630
|
localAddress?: string;
|
|
2977
3631
|
}
|
|
2978
|
-
|
|
3632
|
+
/**
|
|
3633
|
+
* The **`EventSource`** interface is web content's interface to server-sent events.
|
|
3634
|
+
*
|
|
3635
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource)
|
|
3636
|
+
*/
|
|
2979
3637
|
declare class EventSource extends EventTarget {
|
|
2980
3638
|
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
2981
3639
|
/**
|
|
2982
|
-
*
|
|
3640
|
+
* The **`close()`** method of the EventSource interface closes the connection, if one is made, and sets the ```js-nolint close() ``` None.
|
|
2983
3641
|
*
|
|
2984
3642
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close)
|
|
2985
3643
|
*/
|
|
2986
3644
|
close(): void;
|
|
2987
3645
|
/**
|
|
2988
|
-
*
|
|
3646
|
+
* The **`url`** read-only property of the URL of the source.
|
|
2989
3647
|
*
|
|
2990
3648
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url)
|
|
2991
3649
|
*/
|
|
2992
3650
|
get url(): string;
|
|
2993
3651
|
/**
|
|
2994
|
-
*
|
|
3652
|
+
* The **`withCredentials`** read-only property of the the `EventSource` object was instantiated with CORS credentials set.
|
|
2995
3653
|
*
|
|
2996
3654
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials)
|
|
2997
3655
|
*/
|
|
2998
3656
|
get withCredentials(): boolean;
|
|
2999
3657
|
/**
|
|
3000
|
-
*
|
|
3658
|
+
* The **`readyState`** read-only property of the connection.
|
|
3001
3659
|
*
|
|
3002
3660
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
3003
3661
|
*/
|
|
@@ -3030,22 +3688,22 @@ interface Container {
|
|
|
3030
3688
|
destroy(error?: any): Promise<void>;
|
|
3031
3689
|
signal(signo: number): void;
|
|
3032
3690
|
getTcpPort(port: number): Fetcher;
|
|
3691
|
+
setInactivityTimeout(durationMs: number | bigint): Promise<void>;
|
|
3033
3692
|
}
|
|
3034
3693
|
interface ContainerStartupOptions {
|
|
3035
3694
|
entrypoint?: string[];
|
|
3036
3695
|
enableInternet: boolean;
|
|
3037
3696
|
env?: Record<string, string>;
|
|
3697
|
+
hardTimeout?: number | bigint;
|
|
3038
3698
|
}
|
|
3039
3699
|
/**
|
|
3040
|
-
*
|
|
3700
|
+
* The **`MessagePort`** interface of the Channel Messaging API represents one of the two ports of a MessageChannel, allowing messages to be sent from one port and listening out for them arriving at the other.
|
|
3041
3701
|
*
|
|
3042
3702
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort)
|
|
3043
3703
|
*/
|
|
3044
3704
|
interface MessagePort extends EventTarget {
|
|
3045
3705
|
/**
|
|
3046
|
-
*
|
|
3047
|
-
*
|
|
3048
|
-
* Throws a "DataCloneError" DOMException if transfer contains duplicate objects or port, or if message could not be cloned.
|
|
3706
|
+
* The **`postMessage()`** method of the transfers ownership of objects to other browsing contexts.
|
|
3049
3707
|
*
|
|
3050
3708
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/postMessage)
|
|
3051
3709
|
*/
|
|
@@ -3054,13 +3712,13 @@ interface MessagePort extends EventTarget {
|
|
|
3054
3712
|
options?: any[] | MessagePortPostMessageOptions,
|
|
3055
3713
|
): void;
|
|
3056
3714
|
/**
|
|
3057
|
-
*
|
|
3715
|
+
* The **`close()`** method of the MessagePort interface disconnects the port, so it is no longer active.
|
|
3058
3716
|
*
|
|
3059
3717
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/close)
|
|
3060
3718
|
*/
|
|
3061
3719
|
close(): void;
|
|
3062
3720
|
/**
|
|
3063
|
-
*
|
|
3721
|
+
* The **`start()`** method of the MessagePort interface starts the sending of messages queued on the port.
|
|
3064
3722
|
*
|
|
3065
3723
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/start)
|
|
3066
3724
|
*/
|
|
@@ -3131,6 +3789,7 @@ interface WorkerLoaderModule {
|
|
|
3131
3789
|
data?: ArrayBuffer;
|
|
3132
3790
|
json?: any;
|
|
3133
3791
|
py?: string;
|
|
3792
|
+
wasm?: ArrayBuffer;
|
|
3134
3793
|
}
|
|
3135
3794
|
interface WorkerLoaderWorkerCode {
|
|
3136
3795
|
compatibilityDate: string;
|
|
@@ -6915,6 +7574,10 @@ type AutoRagSearchRequest = {
|
|
|
6915
7574
|
ranker?: string;
|
|
6916
7575
|
score_threshold?: number;
|
|
6917
7576
|
};
|
|
7577
|
+
reranking?: {
|
|
7578
|
+
enabled?: boolean;
|
|
7579
|
+
model?: string;
|
|
7580
|
+
};
|
|
6918
7581
|
rewrite_query?: boolean;
|
|
6919
7582
|
};
|
|
6920
7583
|
type AutoRagAiSearchRequest = AutoRagSearchRequest & {
|
|
@@ -8859,6 +9522,11 @@ declare namespace CloudflareWorkersModule {
|
|
|
8859
9522
|
constructor(ctx: ExecutionContext, env: Env);
|
|
8860
9523
|
fetch?(request: Request): Response | Promise<Response>;
|
|
8861
9524
|
tail?(events: TraceItem[]): void | Promise<void>;
|
|
9525
|
+
tailStream?(
|
|
9526
|
+
event: TailStream.TailEvent<TailStream.Onset>,
|
|
9527
|
+
):
|
|
9528
|
+
| TailStream.TailEventHandlerType
|
|
9529
|
+
| Promise<TailStream.TailEventHandlerType>;
|
|
8862
9530
|
trace?(traces: TraceItem[]): void | Promise<void>;
|
|
8863
9531
|
scheduled?(controller: ScheduledController): void | Promise<void>;
|
|
8864
9532
|
queue?(batch: MessageBatch<unknown>): void | Promise<void>;
|
|
@@ -9247,7 +9915,14 @@ interface VectorizeError {
|
|
|
9247
9915
|
*
|
|
9248
9916
|
* This list is expected to grow as support for more operations are released.
|
|
9249
9917
|
*/
|
|
9250
|
-
type VectorizeVectorMetadataFilterOp =
|
|
9918
|
+
type VectorizeVectorMetadataFilterOp =
|
|
9919
|
+
| "$eq"
|
|
9920
|
+
| "$ne"
|
|
9921
|
+
| "$lt"
|
|
9922
|
+
| "$lte"
|
|
9923
|
+
| "$gt"
|
|
9924
|
+
| "$gte";
|
|
9925
|
+
type VectorizeVectorMetadataFilterCollectionOp = "$in" | "$nin";
|
|
9251
9926
|
/**
|
|
9252
9927
|
* Filter criteria for vector metadata used to limit the retrieved query result set.
|
|
9253
9928
|
*/
|
|
@@ -9260,6 +9935,12 @@ type VectorizeVectorMetadataFilter = {
|
|
|
9260
9935
|
VectorizeVectorMetadataValue,
|
|
9261
9936
|
string[]
|
|
9262
9937
|
> | null;
|
|
9938
|
+
}
|
|
9939
|
+
| {
|
|
9940
|
+
[Op in VectorizeVectorMetadataFilterCollectionOp]?: Exclude<
|
|
9941
|
+
VectorizeVectorMetadataValue,
|
|
9942
|
+
string[]
|
|
9943
|
+
>[];
|
|
9263
9944
|
};
|
|
9264
9945
|
};
|
|
9265
9946
|
/**
|