@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-03-21/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
|
*/
|
|
@@ -2233,30 +2563,58 @@ type ReadableStreamReadResult<R = any> =
|
|
|
2233
2563
|
value?: undefined;
|
|
2234
2564
|
};
|
|
2235
2565
|
/**
|
|
2236
|
-
*
|
|
2566
|
+
* The `ReadableStream` interface of the Streams API represents a readable stream of byte data.
|
|
2237
2567
|
*
|
|
2238
2568
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2239
2569
|
*/
|
|
2240
2570
|
interface ReadableStream<R = any> {
|
|
2241
|
-
|
|
2571
|
+
/**
|
|
2572
|
+
* The **`locked`** read-only property of the ReadableStream interface returns whether or not the readable stream is locked to a reader.
|
|
2573
|
+
*
|
|
2574
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked)
|
|
2575
|
+
*/
|
|
2242
2576
|
get locked(): boolean;
|
|
2243
|
-
|
|
2577
|
+
/**
|
|
2578
|
+
* The **`cancel()`** method of the ReadableStream interface returns a Promise that resolves when the stream is canceled.
|
|
2579
|
+
*
|
|
2580
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel)
|
|
2581
|
+
*/
|
|
2244
2582
|
cancel(reason?: any): Promise<void>;
|
|
2245
|
-
|
|
2583
|
+
/**
|
|
2584
|
+
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it.
|
|
2585
|
+
*
|
|
2586
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
|
|
2587
|
+
*/
|
|
2246
2588
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
2247
|
-
|
|
2589
|
+
/**
|
|
2590
|
+
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it.
|
|
2591
|
+
*
|
|
2592
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
|
|
2593
|
+
*/
|
|
2248
2594
|
getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader;
|
|
2249
|
-
|
|
2595
|
+
/**
|
|
2596
|
+
* 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.
|
|
2597
|
+
*
|
|
2598
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough)
|
|
2599
|
+
*/
|
|
2250
2600
|
pipeThrough<T>(
|
|
2251
2601
|
transform: ReadableWritablePair<T, R>,
|
|
2252
2602
|
options?: StreamPipeOptions,
|
|
2253
2603
|
): ReadableStream<T>;
|
|
2254
|
-
|
|
2604
|
+
/**
|
|
2605
|
+
* 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.
|
|
2606
|
+
*
|
|
2607
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo)
|
|
2608
|
+
*/
|
|
2255
2609
|
pipeTo(
|
|
2256
2610
|
destination: WritableStream<R>,
|
|
2257
2611
|
options?: StreamPipeOptions,
|
|
2258
2612
|
): Promise<void>;
|
|
2259
|
-
|
|
2613
|
+
/**
|
|
2614
|
+
* The **`tee()`** method of the two-element array containing the two resulting branches as new ReadableStream instances.
|
|
2615
|
+
*
|
|
2616
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee)
|
|
2617
|
+
*/
|
|
2260
2618
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
2261
2619
|
values(options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
|
|
2262
2620
|
[Symbol.asyncIterator](
|
|
@@ -2264,7 +2622,7 @@ interface ReadableStream<R = any> {
|
|
|
2264
2622
|
): AsyncIterableIterator<R>;
|
|
2265
2623
|
}
|
|
2266
2624
|
/**
|
|
2267
|
-
*
|
|
2625
|
+
* The `ReadableStream` interface of the Streams API represents a readable stream of byte data.
|
|
2268
2626
|
*
|
|
2269
2627
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2270
2628
|
*/
|
|
@@ -2279,26 +2637,50 @@ declare const ReadableStream: {
|
|
|
2279
2637
|
strategy?: QueuingStrategy<R>,
|
|
2280
2638
|
): ReadableStream<R>;
|
|
2281
2639
|
};
|
|
2282
|
-
|
|
2640
|
+
/**
|
|
2641
|
+
* 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).
|
|
2642
|
+
*
|
|
2643
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader)
|
|
2644
|
+
*/
|
|
2283
2645
|
declare class ReadableStreamDefaultReader<R = any> {
|
|
2284
2646
|
constructor(stream: ReadableStream);
|
|
2285
2647
|
get closed(): Promise<void>;
|
|
2286
2648
|
cancel(reason?: any): Promise<void>;
|
|
2287
|
-
|
|
2649
|
+
/**
|
|
2650
|
+
* The **`read()`** method of the ReadableStreamDefaultReader interface returns a Promise providing access to the next chunk in the stream's internal queue.
|
|
2651
|
+
*
|
|
2652
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read)
|
|
2653
|
+
*/
|
|
2288
2654
|
read(): Promise<ReadableStreamReadResult<R>>;
|
|
2289
|
-
|
|
2655
|
+
/**
|
|
2656
|
+
* The **`releaseLock()`** method of the ReadableStreamDefaultReader interface releases the reader's lock on the stream.
|
|
2657
|
+
*
|
|
2658
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock)
|
|
2659
|
+
*/
|
|
2290
2660
|
releaseLock(): void;
|
|
2291
2661
|
}
|
|
2292
|
-
|
|
2662
|
+
/**
|
|
2663
|
+
* The `ReadableStreamBYOBReader` interface of the Streams API defines a reader for a ReadableStream that supports zero-copy reading from an underlying byte source.
|
|
2664
|
+
*
|
|
2665
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader)
|
|
2666
|
+
*/
|
|
2293
2667
|
declare class ReadableStreamBYOBReader {
|
|
2294
2668
|
constructor(stream: ReadableStream);
|
|
2295
2669
|
get closed(): Promise<void>;
|
|
2296
2670
|
cancel(reason?: any): Promise<void>;
|
|
2297
|
-
|
|
2671
|
+
/**
|
|
2672
|
+
* 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.
|
|
2673
|
+
*
|
|
2674
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
|
|
2675
|
+
*/
|
|
2298
2676
|
read<T extends ArrayBufferView>(
|
|
2299
2677
|
view: T,
|
|
2300
2678
|
): Promise<ReadableStreamReadResult<T>>;
|
|
2301
|
-
|
|
2679
|
+
/**
|
|
2680
|
+
* The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
|
|
2681
|
+
*
|
|
2682
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock)
|
|
2683
|
+
*/
|
|
2302
2684
|
releaseLock(): void;
|
|
2303
2685
|
readAtLeast<T extends ArrayBufferView>(
|
|
2304
2686
|
minElements: number,
|
|
@@ -2316,60 +2698,148 @@ interface ReadableStreamGetReaderOptions {
|
|
|
2316
2698
|
*/
|
|
2317
2699
|
mode: "byob";
|
|
2318
2700
|
}
|
|
2319
|
-
|
|
2701
|
+
/**
|
|
2702
|
+
* 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).
|
|
2703
|
+
*
|
|
2704
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest)
|
|
2705
|
+
*/
|
|
2320
2706
|
interface ReadableStreamBYOBRequest {
|
|
2321
|
-
|
|
2707
|
+
/**
|
|
2708
|
+
* The **`view`** getter property of the ReadableStreamBYOBRequest interface returns the current view.
|
|
2709
|
+
*
|
|
2710
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view)
|
|
2711
|
+
*/
|
|
2322
2712
|
get view(): Uint8Array | null;
|
|
2323
|
-
|
|
2713
|
+
/**
|
|
2714
|
+
* 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.
|
|
2715
|
+
*
|
|
2716
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond)
|
|
2717
|
+
*/
|
|
2324
2718
|
respond(bytesWritten: number): void;
|
|
2325
|
-
|
|
2719
|
+
/**
|
|
2720
|
+
* 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.
|
|
2721
|
+
*
|
|
2722
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView)
|
|
2723
|
+
*/
|
|
2326
2724
|
respondWithNewView(view: ArrayBuffer | ArrayBufferView): void;
|
|
2327
2725
|
get atLeast(): number | null;
|
|
2328
2726
|
}
|
|
2329
|
-
|
|
2727
|
+
/**
|
|
2728
|
+
* The **`ReadableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a ReadableStream's state and internal queue.
|
|
2729
|
+
*
|
|
2730
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController)
|
|
2731
|
+
*/
|
|
2330
2732
|
interface ReadableStreamDefaultController<R = any> {
|
|
2331
|
-
|
|
2733
|
+
/**
|
|
2734
|
+
* The **`desiredSize`** read-only property of the required to fill the stream's internal queue.
|
|
2735
|
+
*
|
|
2736
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize)
|
|
2737
|
+
*/
|
|
2332
2738
|
get desiredSize(): number | null;
|
|
2333
|
-
|
|
2739
|
+
/**
|
|
2740
|
+
* The **`close()`** method of the ReadableStreamDefaultController interface closes the associated stream.
|
|
2741
|
+
*
|
|
2742
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close)
|
|
2743
|
+
*/
|
|
2334
2744
|
close(): void;
|
|
2335
|
-
|
|
2745
|
+
/**
|
|
2746
|
+
* The **`enqueue()`** method of the ```js-nolint enqueue(chunk) ``` - `chunk` - : The chunk to enqueue.
|
|
2747
|
+
*
|
|
2748
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)
|
|
2749
|
+
*/
|
|
2336
2750
|
enqueue(chunk?: R): void;
|
|
2337
|
-
|
|
2751
|
+
/**
|
|
2752
|
+
* The **`error()`** method of the with the associated stream to error.
|
|
2753
|
+
*
|
|
2754
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error)
|
|
2755
|
+
*/
|
|
2338
2756
|
error(reason: any): void;
|
|
2339
2757
|
}
|
|
2340
|
-
|
|
2758
|
+
/**
|
|
2759
|
+
* The **`ReadableByteStreamController`** interface of the Streams API represents a controller for a readable byte stream.
|
|
2760
|
+
*
|
|
2761
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController)
|
|
2762
|
+
*/
|
|
2341
2763
|
interface ReadableByteStreamController {
|
|
2342
|
-
|
|
2764
|
+
/**
|
|
2765
|
+
* The **`byobRequest`** read-only property of the ReadableByteStreamController interface returns the current BYOB request, or `null` if there are no pending requests.
|
|
2766
|
+
*
|
|
2767
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest)
|
|
2768
|
+
*/
|
|
2343
2769
|
get byobRequest(): ReadableStreamBYOBRequest | null;
|
|
2344
|
-
|
|
2770
|
+
/**
|
|
2771
|
+
* 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'.
|
|
2772
|
+
*
|
|
2773
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize)
|
|
2774
|
+
*/
|
|
2345
2775
|
get desiredSize(): number | null;
|
|
2346
|
-
|
|
2776
|
+
/**
|
|
2777
|
+
* The **`close()`** method of the ReadableByteStreamController interface closes the associated stream.
|
|
2778
|
+
*
|
|
2779
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close)
|
|
2780
|
+
*/
|
|
2347
2781
|
close(): void;
|
|
2348
|
-
|
|
2782
|
+
/**
|
|
2783
|
+
* 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).
|
|
2784
|
+
*
|
|
2785
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue)
|
|
2786
|
+
*/
|
|
2349
2787
|
enqueue(chunk: ArrayBuffer | ArrayBufferView): void;
|
|
2350
|
-
|
|
2788
|
+
/**
|
|
2789
|
+
* The **`error()`** method of the ReadableByteStreamController interface causes any future interactions with the associated stream to error with the specified reason.
|
|
2790
|
+
*
|
|
2791
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error)
|
|
2792
|
+
*/
|
|
2351
2793
|
error(reason: any): void;
|
|
2352
2794
|
}
|
|
2353
2795
|
/**
|
|
2354
|
-
*
|
|
2796
|
+
* The **`WritableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a WritableStream's state.
|
|
2355
2797
|
*
|
|
2356
2798
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
2357
2799
|
*/
|
|
2358
2800
|
interface WritableStreamDefaultController {
|
|
2359
|
-
|
|
2801
|
+
/**
|
|
2802
|
+
* The read-only **`signal`** property of the WritableStreamDefaultController interface returns the AbortSignal associated with the controller.
|
|
2803
|
+
*
|
|
2804
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal)
|
|
2805
|
+
*/
|
|
2360
2806
|
get signal(): AbortSignal;
|
|
2361
|
-
|
|
2807
|
+
/**
|
|
2808
|
+
* The **`error()`** method of the with the associated stream to error.
|
|
2809
|
+
*
|
|
2810
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error)
|
|
2811
|
+
*/
|
|
2362
2812
|
error(reason?: any): void;
|
|
2363
2813
|
}
|
|
2364
|
-
|
|
2814
|
+
/**
|
|
2815
|
+
* The **`TransformStreamDefaultController`** interface of the Streams API provides methods to manipulate the associated ReadableStream and WritableStream.
|
|
2816
|
+
*
|
|
2817
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController)
|
|
2818
|
+
*/
|
|
2365
2819
|
interface TransformStreamDefaultController<O = any> {
|
|
2366
|
-
|
|
2820
|
+
/**
|
|
2821
|
+
* The **`desiredSize`** read-only property of the TransformStreamDefaultController interface returns the desired size to fill the queue of the associated ReadableStream.
|
|
2822
|
+
*
|
|
2823
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize)
|
|
2824
|
+
*/
|
|
2367
2825
|
get desiredSize(): number | null;
|
|
2368
|
-
|
|
2826
|
+
/**
|
|
2827
|
+
* The **`enqueue()`** method of the TransformStreamDefaultController interface enqueues the given chunk in the readable side of the stream.
|
|
2828
|
+
*
|
|
2829
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue)
|
|
2830
|
+
*/
|
|
2369
2831
|
enqueue(chunk?: O): void;
|
|
2370
|
-
|
|
2832
|
+
/**
|
|
2833
|
+
* The **`error()`** method of the TransformStreamDefaultController interface errors both sides of the stream.
|
|
2834
|
+
*
|
|
2835
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error)
|
|
2836
|
+
*/
|
|
2371
2837
|
error(reason: any): void;
|
|
2372
|
-
|
|
2838
|
+
/**
|
|
2839
|
+
* The **`terminate()`** method of the TransformStreamDefaultController interface closes the readable side and errors the writable side of the stream.
|
|
2840
|
+
*
|
|
2841
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate)
|
|
2842
|
+
*/
|
|
2373
2843
|
terminate(): void;
|
|
2374
2844
|
}
|
|
2375
2845
|
interface ReadableWritablePair<R = any, W = any> {
|
|
@@ -2382,7 +2852,7 @@ interface ReadableWritablePair<R = any, W = any> {
|
|
|
2382
2852
|
readable: ReadableStream<R>;
|
|
2383
2853
|
}
|
|
2384
2854
|
/**
|
|
2385
|
-
*
|
|
2855
|
+
* The **`WritableStream`** interface of the Streams API provides a standard abstraction for writing streaming data to a destination, known as a sink.
|
|
2386
2856
|
*
|
|
2387
2857
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
|
|
2388
2858
|
*/
|
|
@@ -2391,47 +2861,103 @@ declare class WritableStream<W = any> {
|
|
|
2391
2861
|
underlyingSink?: UnderlyingSink,
|
|
2392
2862
|
queuingStrategy?: QueuingStrategy,
|
|
2393
2863
|
);
|
|
2394
|
-
|
|
2864
|
+
/**
|
|
2865
|
+
* The **`locked`** read-only property of the WritableStream interface returns a boolean indicating whether the `WritableStream` is locked to a writer.
|
|
2866
|
+
*
|
|
2867
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked)
|
|
2868
|
+
*/
|
|
2395
2869
|
get locked(): boolean;
|
|
2396
|
-
|
|
2870
|
+
/**
|
|
2871
|
+
* 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.
|
|
2872
|
+
*
|
|
2873
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort)
|
|
2874
|
+
*/
|
|
2397
2875
|
abort(reason?: any): Promise<void>;
|
|
2398
|
-
|
|
2876
|
+
/**
|
|
2877
|
+
* The **`close()`** method of the WritableStream interface closes the associated stream.
|
|
2878
|
+
*
|
|
2879
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close)
|
|
2880
|
+
*/
|
|
2399
2881
|
close(): Promise<void>;
|
|
2400
|
-
|
|
2882
|
+
/**
|
|
2883
|
+
* The **`getWriter()`** method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance.
|
|
2884
|
+
*
|
|
2885
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter)
|
|
2886
|
+
*/
|
|
2401
2887
|
getWriter(): WritableStreamDefaultWriter<W>;
|
|
2402
2888
|
}
|
|
2403
2889
|
/**
|
|
2404
|
-
*
|
|
2890
|
+
* 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.
|
|
2405
2891
|
*
|
|
2406
2892
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
|
|
2407
2893
|
*/
|
|
2408
2894
|
declare class WritableStreamDefaultWriter<W = any> {
|
|
2409
2895
|
constructor(stream: WritableStream);
|
|
2410
|
-
|
|
2896
|
+
/**
|
|
2897
|
+
* The **`closed`** read-only property of the the stream errors or the writer's lock is released.
|
|
2898
|
+
*
|
|
2899
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed)
|
|
2900
|
+
*/
|
|
2411
2901
|
get closed(): Promise<void>;
|
|
2412
|
-
|
|
2902
|
+
/**
|
|
2903
|
+
* 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.
|
|
2904
|
+
*
|
|
2905
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready)
|
|
2906
|
+
*/
|
|
2413
2907
|
get ready(): Promise<void>;
|
|
2414
|
-
|
|
2908
|
+
/**
|
|
2909
|
+
* The **`desiredSize`** read-only property of the to fill the stream's internal queue.
|
|
2910
|
+
*
|
|
2911
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize)
|
|
2912
|
+
*/
|
|
2415
2913
|
get desiredSize(): number | null;
|
|
2416
|
-
|
|
2914
|
+
/**
|
|
2915
|
+
* 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.
|
|
2916
|
+
*
|
|
2917
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort)
|
|
2918
|
+
*/
|
|
2417
2919
|
abort(reason?: any): Promise<void>;
|
|
2418
|
-
|
|
2920
|
+
/**
|
|
2921
|
+
* The **`close()`** method of the stream.
|
|
2922
|
+
*
|
|
2923
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close)
|
|
2924
|
+
*/
|
|
2419
2925
|
close(): Promise<void>;
|
|
2420
|
-
|
|
2926
|
+
/**
|
|
2927
|
+
* The **`write()`** method of the operation.
|
|
2928
|
+
*
|
|
2929
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write)
|
|
2930
|
+
*/
|
|
2421
2931
|
write(chunk?: W): Promise<void>;
|
|
2422
|
-
|
|
2932
|
+
/**
|
|
2933
|
+
* The **`releaseLock()`** method of the corresponding stream.
|
|
2934
|
+
*
|
|
2935
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock)
|
|
2936
|
+
*/
|
|
2423
2937
|
releaseLock(): void;
|
|
2424
2938
|
}
|
|
2425
|
-
|
|
2939
|
+
/**
|
|
2940
|
+
* The **`TransformStream`** interface of the Streams API represents a concrete implementation of the pipe chain _transform stream_ concept.
|
|
2941
|
+
*
|
|
2942
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream)
|
|
2943
|
+
*/
|
|
2426
2944
|
declare class TransformStream<I = any, O = any> {
|
|
2427
2945
|
constructor(
|
|
2428
2946
|
transformer?: Transformer<I, O>,
|
|
2429
2947
|
writableStrategy?: QueuingStrategy<I>,
|
|
2430
2948
|
readableStrategy?: QueuingStrategy<O>,
|
|
2431
2949
|
);
|
|
2432
|
-
|
|
2950
|
+
/**
|
|
2951
|
+
* The **`readable`** read-only property of the TransformStream interface returns the ReadableStream instance controlled by this `TransformStream`.
|
|
2952
|
+
*
|
|
2953
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable)
|
|
2954
|
+
*/
|
|
2433
2955
|
get readable(): ReadableStream<O>;
|
|
2434
|
-
|
|
2956
|
+
/**
|
|
2957
|
+
* The **`writable`** read-only property of the TransformStream interface returns the WritableStream instance controlled by this `TransformStream`.
|
|
2958
|
+
*
|
|
2959
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable)
|
|
2960
|
+
*/
|
|
2435
2961
|
get writable(): WritableStream<I>;
|
|
2436
2962
|
}
|
|
2437
2963
|
declare class FixedLengthStream extends IdentityTransformStream {
|
|
@@ -2452,26 +2978,42 @@ interface IdentityTransformStreamQueuingStrategy {
|
|
|
2452
2978
|
interface ReadableStreamValuesOptions {
|
|
2453
2979
|
preventCancel?: boolean;
|
|
2454
2980
|
}
|
|
2455
|
-
|
|
2981
|
+
/**
|
|
2982
|
+
* The **`CompressionStream`** interface of the Compression Streams API is an API for compressing a stream of data.
|
|
2983
|
+
*
|
|
2984
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream)
|
|
2985
|
+
*/
|
|
2456
2986
|
declare class CompressionStream extends TransformStream<
|
|
2457
2987
|
ArrayBuffer | ArrayBufferView,
|
|
2458
2988
|
Uint8Array
|
|
2459
2989
|
> {
|
|
2460
2990
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2461
2991
|
}
|
|
2462
|
-
|
|
2992
|
+
/**
|
|
2993
|
+
* The **`DecompressionStream`** interface of the Compression Streams API is an API for decompressing a stream of data.
|
|
2994
|
+
*
|
|
2995
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream)
|
|
2996
|
+
*/
|
|
2463
2997
|
declare class DecompressionStream extends TransformStream<
|
|
2464
2998
|
ArrayBuffer | ArrayBufferView,
|
|
2465
2999
|
Uint8Array
|
|
2466
3000
|
> {
|
|
2467
3001
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2468
3002
|
}
|
|
2469
|
-
|
|
3003
|
+
/**
|
|
3004
|
+
* The **`TextEncoderStream`** interface of the Encoding API converts a stream of strings into bytes in the UTF-8 encoding.
|
|
3005
|
+
*
|
|
3006
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream)
|
|
3007
|
+
*/
|
|
2470
3008
|
declare class TextEncoderStream extends TransformStream<string, Uint8Array> {
|
|
2471
3009
|
constructor();
|
|
2472
3010
|
get encoding(): string;
|
|
2473
3011
|
}
|
|
2474
|
-
|
|
3012
|
+
/**
|
|
3013
|
+
* 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.
|
|
3014
|
+
*
|
|
3015
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream)
|
|
3016
|
+
*/
|
|
2475
3017
|
declare class TextDecoderStream extends TransformStream<
|
|
2476
3018
|
ArrayBuffer | ArrayBufferView,
|
|
2477
3019
|
string
|
|
@@ -2486,7 +3028,7 @@ interface TextDecoderStreamTextDecoderStreamInit {
|
|
|
2486
3028
|
ignoreBOM?: boolean;
|
|
2487
3029
|
}
|
|
2488
3030
|
/**
|
|
2489
|
-
*
|
|
3031
|
+
* The **`ByteLengthQueuingStrategy`** interface of the Streams API provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2490
3032
|
*
|
|
2491
3033
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
|
|
2492
3034
|
*/
|
|
@@ -2494,19 +3036,27 @@ declare class ByteLengthQueuingStrategy
|
|
|
2494
3036
|
implements QueuingStrategy<ArrayBufferView>
|
|
2495
3037
|
{
|
|
2496
3038
|
constructor(init: QueuingStrategyInit);
|
|
2497
|
-
|
|
3039
|
+
/**
|
|
3040
|
+
* The read-only **`ByteLengthQueuingStrategy.highWaterMark`** property returns the total number of bytes that can be contained in the internal queue before backpressure is applied.
|
|
3041
|
+
*
|
|
3042
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark)
|
|
3043
|
+
*/
|
|
2498
3044
|
get highWaterMark(): number;
|
|
2499
3045
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
|
|
2500
3046
|
get size(): (chunk?: any) => number;
|
|
2501
3047
|
}
|
|
2502
3048
|
/**
|
|
2503
|
-
*
|
|
3049
|
+
* The **`CountQueuingStrategy`** interface of the Streams API provides a built-in chunk counting queuing strategy that can be used when constructing streams.
|
|
2504
3050
|
*
|
|
2505
3051
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
|
|
2506
3052
|
*/
|
|
2507
3053
|
declare class CountQueuingStrategy implements QueuingStrategy {
|
|
2508
3054
|
constructor(init: QueuingStrategyInit);
|
|
2509
|
-
|
|
3055
|
+
/**
|
|
3056
|
+
* The read-only **`CountQueuingStrategy.highWaterMark`** property returns the total number of chunks that can be contained in the internal queue before backpressure is applied.
|
|
3057
|
+
*
|
|
3058
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark)
|
|
3059
|
+
*/
|
|
2510
3060
|
get highWaterMark(): number;
|
|
2511
3061
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
|
|
2512
3062
|
get size(): (chunk?: any) => number;
|
|
@@ -2639,62 +3189,158 @@ interface UnsafeTraceMetrics {
|
|
|
2639
3189
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
2640
3190
|
}
|
|
2641
3191
|
/**
|
|
2642
|
-
* The URL
|
|
3192
|
+
* The **`URL`** interface is used to parse, construct, normalize, and encode URL.
|
|
2643
3193
|
*
|
|
2644
3194
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
2645
3195
|
*/
|
|
2646
3196
|
declare class URL {
|
|
2647
3197
|
constructor(url: string | URL, base?: string | URL);
|
|
2648
|
-
|
|
3198
|
+
/**
|
|
3199
|
+
* The **`href`** property of the URL interface is a string containing the whole URL.
|
|
3200
|
+
*
|
|
3201
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href)
|
|
3202
|
+
*/
|
|
2649
3203
|
get href(): string;
|
|
2650
|
-
|
|
3204
|
+
/**
|
|
3205
|
+
* The **`href`** property of the URL interface is a string containing the whole URL.
|
|
3206
|
+
*
|
|
3207
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href)
|
|
3208
|
+
*/
|
|
2651
3209
|
set href(value: string);
|
|
2652
|
-
|
|
3210
|
+
/**
|
|
3211
|
+
* The **`origin`** read-only property of the URL interface returns a string containing the Unicode serialization of the origin of the represented URL.
|
|
3212
|
+
*
|
|
3213
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin)
|
|
3214
|
+
*/
|
|
2653
3215
|
get origin(): string;
|
|
2654
|
-
|
|
3216
|
+
/**
|
|
3217
|
+
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final `':'`.
|
|
3218
|
+
*
|
|
3219
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
3220
|
+
*/
|
|
2655
3221
|
get protocol(): string;
|
|
2656
|
-
|
|
3222
|
+
/**
|
|
3223
|
+
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final `':'`.
|
|
3224
|
+
*
|
|
3225
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
3226
|
+
*/
|
|
2657
3227
|
set protocol(value: string);
|
|
2658
|
-
|
|
3228
|
+
/**
|
|
3229
|
+
* The **`username`** property of the URL interface is a string containing the username component of the URL.
|
|
3230
|
+
*
|
|
3231
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
3232
|
+
*/
|
|
2659
3233
|
get username(): string;
|
|
2660
|
-
|
|
3234
|
+
/**
|
|
3235
|
+
* The **`username`** property of the URL interface is a string containing the username component of the URL.
|
|
3236
|
+
*
|
|
3237
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
3238
|
+
*/
|
|
2661
3239
|
set username(value: string);
|
|
2662
|
-
|
|
3240
|
+
/**
|
|
3241
|
+
* The **`password`** property of the URL interface is a string containing the password component of the URL.
|
|
3242
|
+
*
|
|
3243
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
3244
|
+
*/
|
|
2663
3245
|
get password(): string;
|
|
2664
|
-
|
|
3246
|
+
/**
|
|
3247
|
+
* The **`password`** property of the URL interface is a string containing the password component of the URL.
|
|
3248
|
+
*
|
|
3249
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
3250
|
+
*/
|
|
2665
3251
|
set password(value: string);
|
|
2666
|
-
|
|
3252
|
+
/**
|
|
3253
|
+
* 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.
|
|
3254
|
+
*
|
|
3255
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
3256
|
+
*/
|
|
2667
3257
|
get host(): string;
|
|
2668
|
-
|
|
3258
|
+
/**
|
|
3259
|
+
* 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.
|
|
3260
|
+
*
|
|
3261
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
3262
|
+
*/
|
|
2669
3263
|
set host(value: string);
|
|
2670
|
-
|
|
3264
|
+
/**
|
|
3265
|
+
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL.
|
|
3266
|
+
*
|
|
3267
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
3268
|
+
*/
|
|
2671
3269
|
get hostname(): string;
|
|
2672
|
-
|
|
3270
|
+
/**
|
|
3271
|
+
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL.
|
|
3272
|
+
*
|
|
3273
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
3274
|
+
*/
|
|
2673
3275
|
set hostname(value: string);
|
|
2674
|
-
|
|
3276
|
+
/**
|
|
3277
|
+
* The **`port`** property of the URL interface is a string containing the port number of the URL.
|
|
3278
|
+
*
|
|
3279
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
3280
|
+
*/
|
|
2675
3281
|
get port(): string;
|
|
2676
|
-
|
|
3282
|
+
/**
|
|
3283
|
+
* The **`port`** property of the URL interface is a string containing the port number of the URL.
|
|
3284
|
+
*
|
|
3285
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
3286
|
+
*/
|
|
2677
3287
|
set port(value: string);
|
|
2678
|
-
|
|
3288
|
+
/**
|
|
3289
|
+
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure.
|
|
3290
|
+
*
|
|
3291
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
3292
|
+
*/
|
|
2679
3293
|
get pathname(): string;
|
|
2680
|
-
|
|
3294
|
+
/**
|
|
3295
|
+
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure.
|
|
3296
|
+
*
|
|
3297
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
3298
|
+
*/
|
|
2681
3299
|
set pathname(value: string);
|
|
2682
|
-
|
|
3300
|
+
/**
|
|
3301
|
+
* 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.
|
|
3302
|
+
*
|
|
3303
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
3304
|
+
*/
|
|
2683
3305
|
get search(): string;
|
|
2684
|
-
|
|
3306
|
+
/**
|
|
3307
|
+
* 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.
|
|
3308
|
+
*
|
|
3309
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
3310
|
+
*/
|
|
2685
3311
|
set search(value: string);
|
|
2686
|
-
|
|
3312
|
+
/**
|
|
3313
|
+
* The **`searchParams`** read-only property of the access to the [MISSING: httpmethod('GET')] decoded query arguments contained in the URL.
|
|
3314
|
+
*
|
|
3315
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams)
|
|
3316
|
+
*/
|
|
2687
3317
|
get searchParams(): URLSearchParams;
|
|
2688
|
-
|
|
3318
|
+
/**
|
|
3319
|
+
* The **`hash`** property of the URL interface is a string containing a `'#'` followed by the fragment identifier of the URL.
|
|
3320
|
+
*
|
|
3321
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
3322
|
+
*/
|
|
2689
3323
|
get hash(): string;
|
|
2690
|
-
|
|
3324
|
+
/**
|
|
3325
|
+
* The **`hash`** property of the URL interface is a string containing a `'#'` followed by the fragment identifier of the URL.
|
|
3326
|
+
*
|
|
3327
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
3328
|
+
*/
|
|
2691
3329
|
set hash(value: string);
|
|
2692
3330
|
/*function toString() { [native code] }*/
|
|
2693
3331
|
toString(): string;
|
|
2694
|
-
|
|
3332
|
+
/**
|
|
3333
|
+
* 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.
|
|
3334
|
+
*
|
|
3335
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON)
|
|
3336
|
+
*/
|
|
2695
3337
|
toJSON(): string;
|
|
2696
3338
|
}
|
|
2697
|
-
|
|
3339
|
+
/**
|
|
3340
|
+
* The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL.
|
|
3341
|
+
*
|
|
3342
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams)
|
|
3343
|
+
*/
|
|
2698
3344
|
declare class URLSearchParams {
|
|
2699
3345
|
constructor(
|
|
2700
3346
|
init?:
|
|
@@ -2703,45 +3349,53 @@ declare class URLSearchParams {
|
|
|
2703
3349
|
| Record<string, string>
|
|
2704
3350
|
| [key: string, value: string][],
|
|
2705
3351
|
);
|
|
2706
|
-
|
|
3352
|
+
/**
|
|
3353
|
+
* The **`size`** read-only property of the URLSearchParams interface indicates the total number of search parameter entries.
|
|
3354
|
+
*
|
|
3355
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size)
|
|
3356
|
+
*/
|
|
2707
3357
|
get size(): number;
|
|
2708
3358
|
/**
|
|
2709
|
-
*
|
|
3359
|
+
* The **`append()`** method of the URLSearchParams interface appends a specified key/value pair as a new search parameter.
|
|
2710
3360
|
*
|
|
2711
3361
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
|
|
2712
3362
|
*/
|
|
2713
3363
|
append(name: string, value: string): void;
|
|
2714
3364
|
/**
|
|
2715
|
-
*
|
|
3365
|
+
* The **`delete()`** method of the URLSearchParams interface deletes specified parameters and their associated value(s) from the list of all search parameters.
|
|
2716
3366
|
*
|
|
2717
3367
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
2718
3368
|
*/
|
|
2719
3369
|
delete(name: string): void;
|
|
2720
3370
|
/**
|
|
2721
|
-
*
|
|
3371
|
+
* The **`get()`** method of the URLSearchParams interface returns the first value associated to the given search parameter.
|
|
2722
3372
|
*
|
|
2723
3373
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
|
|
2724
3374
|
*/
|
|
2725
3375
|
get(name: string): string | null;
|
|
2726
3376
|
/**
|
|
2727
|
-
*
|
|
3377
|
+
* The **`getAll()`** method of the URLSearchParams interface returns all the values associated with a given search parameter as an array.
|
|
2728
3378
|
*
|
|
2729
3379
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
|
|
2730
3380
|
*/
|
|
2731
3381
|
getAll(name: string): string[];
|
|
2732
3382
|
/**
|
|
2733
|
-
*
|
|
3383
|
+
* The **`has()`** method of the URLSearchParams interface returns a boolean value that indicates whether the specified parameter is in the search parameters.
|
|
2734
3384
|
*
|
|
2735
3385
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
|
|
2736
3386
|
*/
|
|
2737
3387
|
has(name: string): boolean;
|
|
2738
3388
|
/**
|
|
2739
|
-
*
|
|
3389
|
+
* The **`set()`** method of the URLSearchParams interface sets the value associated with a given search parameter to the given value.
|
|
2740
3390
|
*
|
|
2741
3391
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
2742
3392
|
*/
|
|
2743
3393
|
set(name: string, value: string): void;
|
|
2744
|
-
|
|
3394
|
+
/**
|
|
3395
|
+
* The **`URLSearchParams.sort()`** method sorts all key/value pairs contained in this object in place and returns `undefined`.
|
|
3396
|
+
*
|
|
3397
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort)
|
|
3398
|
+
*/
|
|
2745
3399
|
sort(): void;
|
|
2746
3400
|
/* Returns an array of key, value pairs for every entry in the search params. */
|
|
2747
3401
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
@@ -2758,7 +3412,7 @@ declare class URLSearchParams {
|
|
|
2758
3412
|
) => void,
|
|
2759
3413
|
thisArg?: This,
|
|
2760
3414
|
): void;
|
|
2761
|
-
/*function toString() { [native code] }
|
|
3415
|
+
/*function toString() { [native code] }*/
|
|
2762
3416
|
toString(): string;
|
|
2763
3417
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
2764
3418
|
}
|
|
@@ -2812,26 +3466,26 @@ interface URLPatternOptions {
|
|
|
2812
3466
|
ignoreCase?: boolean;
|
|
2813
3467
|
}
|
|
2814
3468
|
/**
|
|
2815
|
-
* A CloseEvent is sent to clients using WebSockets when the connection is closed.
|
|
3469
|
+
* A `CloseEvent` is sent to clients using WebSockets when the connection is closed.
|
|
2816
3470
|
*
|
|
2817
3471
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
|
|
2818
3472
|
*/
|
|
2819
3473
|
declare class CloseEvent extends Event {
|
|
2820
3474
|
constructor(type: string, initializer?: CloseEventInit);
|
|
2821
3475
|
/**
|
|
2822
|
-
*
|
|
3476
|
+
* The **`code`** read-only property of the CloseEvent interface returns a WebSocket connection close code indicating the reason the connection was closed.
|
|
2823
3477
|
*
|
|
2824
3478
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/code)
|
|
2825
3479
|
*/
|
|
2826
3480
|
readonly code: number;
|
|
2827
3481
|
/**
|
|
2828
|
-
*
|
|
3482
|
+
* 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.
|
|
2829
3483
|
*
|
|
2830
3484
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/reason)
|
|
2831
3485
|
*/
|
|
2832
3486
|
readonly reason: string;
|
|
2833
3487
|
/**
|
|
2834
|
-
*
|
|
3488
|
+
* The **`wasClean`** read-only property of the CloseEvent interface returns `true` if the connection closed cleanly.
|
|
2835
3489
|
*
|
|
2836
3490
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/wasClean)
|
|
2837
3491
|
*/
|
|
@@ -2849,7 +3503,7 @@ type WebSocketEventMap = {
|
|
|
2849
3503
|
error: ErrorEvent;
|
|
2850
3504
|
};
|
|
2851
3505
|
/**
|
|
2852
|
-
*
|
|
3506
|
+
* 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.
|
|
2853
3507
|
*
|
|
2854
3508
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2855
3509
|
*/
|
|
@@ -2866,20 +3520,20 @@ declare var WebSocket: {
|
|
|
2866
3520
|
readonly CLOSED: number;
|
|
2867
3521
|
};
|
|
2868
3522
|
/**
|
|
2869
|
-
*
|
|
3523
|
+
* 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.
|
|
2870
3524
|
*
|
|
2871
3525
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2872
3526
|
*/
|
|
2873
3527
|
interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
2874
3528
|
accept(): void;
|
|
2875
3529
|
/**
|
|
2876
|
-
*
|
|
3530
|
+
* 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.
|
|
2877
3531
|
*
|
|
2878
3532
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/send)
|
|
2879
3533
|
*/
|
|
2880
3534
|
send(message: (ArrayBuffer | ArrayBufferView) | string): void;
|
|
2881
3535
|
/**
|
|
2882
|
-
*
|
|
3536
|
+
* The **`WebSocket.close()`** method closes the already `CLOSED`, this method does nothing.
|
|
2883
3537
|
*
|
|
2884
3538
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/close)
|
|
2885
3539
|
*/
|
|
@@ -2887,25 +3541,25 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
2887
3541
|
serializeAttachment(attachment: any): void;
|
|
2888
3542
|
deserializeAttachment(): any | null;
|
|
2889
3543
|
/**
|
|
2890
|
-
*
|
|
3544
|
+
* The **`WebSocket.readyState`** read-only property returns the current state of the WebSocket connection.
|
|
2891
3545
|
*
|
|
2892
3546
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/readyState)
|
|
2893
3547
|
*/
|
|
2894
3548
|
readyState: number;
|
|
2895
3549
|
/**
|
|
2896
|
-
*
|
|
3550
|
+
* The **`WebSocket.url`** read-only property returns the absolute URL of the WebSocket as resolved by the constructor.
|
|
2897
3551
|
*
|
|
2898
3552
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/url)
|
|
2899
3553
|
*/
|
|
2900
3554
|
url: string | null;
|
|
2901
3555
|
/**
|
|
2902
|
-
*
|
|
3556
|
+
* 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.
|
|
2903
3557
|
*
|
|
2904
3558
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/protocol)
|
|
2905
3559
|
*/
|
|
2906
3560
|
protocol: string | null;
|
|
2907
3561
|
/**
|
|
2908
|
-
*
|
|
3562
|
+
* The **`WebSocket.extensions`** read-only property returns the extensions selected by the server.
|
|
2909
3563
|
*
|
|
2910
3564
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
2911
3565
|
*/
|
|
@@ -2974,29 +3628,33 @@ interface SocketInfo {
|
|
|
2974
3628
|
remoteAddress?: string;
|
|
2975
3629
|
localAddress?: string;
|
|
2976
3630
|
}
|
|
2977
|
-
|
|
3631
|
+
/**
|
|
3632
|
+
* The **`EventSource`** interface is web content's interface to server-sent events.
|
|
3633
|
+
*
|
|
3634
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource)
|
|
3635
|
+
*/
|
|
2978
3636
|
declare class EventSource extends EventTarget {
|
|
2979
3637
|
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
2980
3638
|
/**
|
|
2981
|
-
*
|
|
3639
|
+
* The **`close()`** method of the EventSource interface closes the connection, if one is made, and sets the ```js-nolint close() ``` None.
|
|
2982
3640
|
*
|
|
2983
3641
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close)
|
|
2984
3642
|
*/
|
|
2985
3643
|
close(): void;
|
|
2986
3644
|
/**
|
|
2987
|
-
*
|
|
3645
|
+
* The **`url`** read-only property of the URL of the source.
|
|
2988
3646
|
*
|
|
2989
3647
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url)
|
|
2990
3648
|
*/
|
|
2991
3649
|
get url(): string;
|
|
2992
3650
|
/**
|
|
2993
|
-
*
|
|
3651
|
+
* The **`withCredentials`** read-only property of the the `EventSource` object was instantiated with CORS credentials set.
|
|
2994
3652
|
*
|
|
2995
3653
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials)
|
|
2996
3654
|
*/
|
|
2997
3655
|
get withCredentials(): boolean;
|
|
2998
3656
|
/**
|
|
2999
|
-
*
|
|
3657
|
+
* The **`readyState`** read-only property of the connection.
|
|
3000
3658
|
*
|
|
3001
3659
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
3002
3660
|
*/
|
|
@@ -3029,22 +3687,22 @@ interface Container {
|
|
|
3029
3687
|
destroy(error?: any): Promise<void>;
|
|
3030
3688
|
signal(signo: number): void;
|
|
3031
3689
|
getTcpPort(port: number): Fetcher;
|
|
3690
|
+
setInactivityTimeout(durationMs: number | bigint): Promise<void>;
|
|
3032
3691
|
}
|
|
3033
3692
|
interface ContainerStartupOptions {
|
|
3034
3693
|
entrypoint?: string[];
|
|
3035
3694
|
enableInternet: boolean;
|
|
3036
3695
|
env?: Record<string, string>;
|
|
3696
|
+
hardTimeout?: number | bigint;
|
|
3037
3697
|
}
|
|
3038
3698
|
/**
|
|
3039
|
-
*
|
|
3699
|
+
* 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.
|
|
3040
3700
|
*
|
|
3041
3701
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort)
|
|
3042
3702
|
*/
|
|
3043
3703
|
interface MessagePort extends EventTarget {
|
|
3044
3704
|
/**
|
|
3045
|
-
*
|
|
3046
|
-
*
|
|
3047
|
-
* Throws a "DataCloneError" DOMException if transfer contains duplicate objects or port, or if message could not be cloned.
|
|
3705
|
+
* The **`postMessage()`** method of the transfers ownership of objects to other browsing contexts.
|
|
3048
3706
|
*
|
|
3049
3707
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/postMessage)
|
|
3050
3708
|
*/
|
|
@@ -3053,13 +3711,13 @@ interface MessagePort extends EventTarget {
|
|
|
3053
3711
|
options?: any[] | MessagePortPostMessageOptions,
|
|
3054
3712
|
): void;
|
|
3055
3713
|
/**
|
|
3056
|
-
*
|
|
3714
|
+
* The **`close()`** method of the MessagePort interface disconnects the port, so it is no longer active.
|
|
3057
3715
|
*
|
|
3058
3716
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/close)
|
|
3059
3717
|
*/
|
|
3060
3718
|
close(): void;
|
|
3061
3719
|
/**
|
|
3062
|
-
*
|
|
3720
|
+
* The **`start()`** method of the MessagePort interface starts the sending of messages queued on the port.
|
|
3063
3721
|
*
|
|
3064
3722
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/start)
|
|
3065
3723
|
*/
|
|
@@ -3130,6 +3788,7 @@ interface WorkerLoaderModule {
|
|
|
3130
3788
|
data?: ArrayBuffer;
|
|
3131
3789
|
json?: any;
|
|
3132
3790
|
py?: string;
|
|
3791
|
+
wasm?: ArrayBuffer;
|
|
3133
3792
|
}
|
|
3134
3793
|
interface WorkerLoaderWorkerCode {
|
|
3135
3794
|
compatibilityDate: string;
|
|
@@ -6914,6 +7573,10 @@ type AutoRagSearchRequest = {
|
|
|
6914
7573
|
ranker?: string;
|
|
6915
7574
|
score_threshold?: number;
|
|
6916
7575
|
};
|
|
7576
|
+
reranking?: {
|
|
7577
|
+
enabled?: boolean;
|
|
7578
|
+
model?: string;
|
|
7579
|
+
};
|
|
6917
7580
|
rewrite_query?: boolean;
|
|
6918
7581
|
};
|
|
6919
7582
|
type AutoRagAiSearchRequest = AutoRagSearchRequest & {
|
|
@@ -8858,6 +9521,11 @@ declare namespace CloudflareWorkersModule {
|
|
|
8858
9521
|
constructor(ctx: ExecutionContext, env: Env);
|
|
8859
9522
|
fetch?(request: Request): Response | Promise<Response>;
|
|
8860
9523
|
tail?(events: TraceItem[]): void | Promise<void>;
|
|
9524
|
+
tailStream?(
|
|
9525
|
+
event: TailStream.TailEvent<TailStream.Onset>,
|
|
9526
|
+
):
|
|
9527
|
+
| TailStream.TailEventHandlerType
|
|
9528
|
+
| Promise<TailStream.TailEventHandlerType>;
|
|
8861
9529
|
trace?(traces: TraceItem[]): void | Promise<void>;
|
|
8862
9530
|
scheduled?(controller: ScheduledController): void | Promise<void>;
|
|
8863
9531
|
queue?(batch: MessageBatch<unknown>): void | Promise<void>;
|
|
@@ -9246,7 +9914,14 @@ interface VectorizeError {
|
|
|
9246
9914
|
*
|
|
9247
9915
|
* This list is expected to grow as support for more operations are released.
|
|
9248
9916
|
*/
|
|
9249
|
-
type VectorizeVectorMetadataFilterOp =
|
|
9917
|
+
type VectorizeVectorMetadataFilterOp =
|
|
9918
|
+
| "$eq"
|
|
9919
|
+
| "$ne"
|
|
9920
|
+
| "$lt"
|
|
9921
|
+
| "$lte"
|
|
9922
|
+
| "$gt"
|
|
9923
|
+
| "$gte";
|
|
9924
|
+
type VectorizeVectorMetadataFilterCollectionOp = "$in" | "$nin";
|
|
9250
9925
|
/**
|
|
9251
9926
|
* Filter criteria for vector metadata used to limit the retrieved query result set.
|
|
9252
9927
|
*/
|
|
@@ -9259,6 +9934,12 @@ type VectorizeVectorMetadataFilter = {
|
|
|
9259
9934
|
VectorizeVectorMetadataValue,
|
|
9260
9935
|
string[]
|
|
9261
9936
|
> | null;
|
|
9937
|
+
}
|
|
9938
|
+
| {
|
|
9939
|
+
[Op in VectorizeVectorMetadataFilterCollectionOp]?: Exclude<
|
|
9940
|
+
VectorizeVectorMetadataValue,
|
|
9941
|
+
string[]
|
|
9942
|
+
>[];
|
|
9262
9943
|
};
|
|
9263
9944
|
};
|
|
9264
9945
|
/**
|