@workers-community/workers-types 4.20251011.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/index.d.ts +1002 -301
- package/index.ts +1002 -301
- package/package.json +1 -1
package/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)
|
|
@@ -308,7 +393,7 @@ declare function removeEventListener<
|
|
|
308
393
|
options?: EventTargetEventListenerOptions | boolean,
|
|
309
394
|
): void;
|
|
310
395
|
/**
|
|
311
|
-
*
|
|
396
|
+
* The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
|
|
312
397
|
*
|
|
313
398
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
|
|
314
399
|
*/
|
|
@@ -444,13 +529,6 @@ interface ExportedHandler<
|
|
|
444
529
|
interface StructuredSerializeOptions {
|
|
445
530
|
transfer?: any[];
|
|
446
531
|
}
|
|
447
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent) */
|
|
448
|
-
declare abstract class PromiseRejectionEvent extends Event {
|
|
449
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) */
|
|
450
|
-
readonly promise: Promise<any>;
|
|
451
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
|
|
452
|
-
readonly reason: any;
|
|
453
|
-
}
|
|
454
532
|
declare abstract class Navigator {
|
|
455
533
|
sendBeacon(
|
|
456
534
|
url: string,
|
|
@@ -671,116 +749,120 @@ interface AnalyticsEngineDataPoint {
|
|
|
671
749
|
blobs?: ((ArrayBuffer | string) | null)[];
|
|
672
750
|
}
|
|
673
751
|
/**
|
|
674
|
-
*
|
|
752
|
+
* The **`Event`** interface represents an event which takes place on an `EventTarget`.
|
|
675
753
|
*
|
|
676
754
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event)
|
|
677
755
|
*/
|
|
678
756
|
declare class Event {
|
|
679
757
|
constructor(type: string, init?: EventInit);
|
|
680
758
|
/**
|
|
681
|
-
*
|
|
759
|
+
* The **`type`** read-only property of the Event interface returns a string containing the event's type.
|
|
682
760
|
*
|
|
683
761
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)
|
|
684
762
|
*/
|
|
685
763
|
get type(): string;
|
|
686
764
|
/**
|
|
687
|
-
*
|
|
765
|
+
* The **`eventPhase`** read-only property of the being evaluated.
|
|
688
766
|
*
|
|
689
767
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)
|
|
690
768
|
*/
|
|
691
769
|
get eventPhase(): number;
|
|
692
770
|
/**
|
|
693
|
-
*
|
|
771
|
+
* The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.
|
|
694
772
|
*
|
|
695
773
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)
|
|
696
774
|
*/
|
|
697
775
|
get composed(): boolean;
|
|
698
776
|
/**
|
|
699
|
-
*
|
|
777
|
+
* The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.
|
|
700
778
|
*
|
|
701
779
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)
|
|
702
780
|
*/
|
|
703
781
|
get bubbles(): boolean;
|
|
704
782
|
/**
|
|
705
|
-
*
|
|
783
|
+
* 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.
|
|
706
784
|
*
|
|
707
785
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)
|
|
708
786
|
*/
|
|
709
787
|
get cancelable(): boolean;
|
|
710
788
|
/**
|
|
711
|
-
*
|
|
789
|
+
* 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.
|
|
712
790
|
*
|
|
713
791
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)
|
|
714
792
|
*/
|
|
715
793
|
get defaultPrevented(): boolean;
|
|
716
794
|
/**
|
|
795
|
+
* The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.
|
|
717
796
|
* @deprecated
|
|
718
797
|
*
|
|
719
798
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)
|
|
720
799
|
*/
|
|
721
800
|
get returnValue(): boolean;
|
|
722
801
|
/**
|
|
723
|
-
*
|
|
802
|
+
* The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.
|
|
724
803
|
*
|
|
725
804
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)
|
|
726
805
|
*/
|
|
727
806
|
get currentTarget(): EventTarget | undefined;
|
|
728
807
|
/**
|
|
729
|
-
*
|
|
808
|
+
* The read-only **`target`** property of the dispatched.
|
|
730
809
|
*
|
|
731
810
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)
|
|
732
811
|
*/
|
|
733
812
|
get target(): EventTarget | undefined;
|
|
734
813
|
/**
|
|
814
|
+
* The deprecated **`Event.srcElement`** is an alias for the Event.target property.
|
|
735
815
|
* @deprecated
|
|
736
816
|
*
|
|
737
817
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)
|
|
738
818
|
*/
|
|
739
819
|
get srcElement(): EventTarget | undefined;
|
|
740
820
|
/**
|
|
741
|
-
*
|
|
821
|
+
* The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.
|
|
742
822
|
*
|
|
743
823
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)
|
|
744
824
|
*/
|
|
745
825
|
get timeStamp(): number;
|
|
746
826
|
/**
|
|
747
|
-
*
|
|
827
|
+
* 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.
|
|
748
828
|
*
|
|
749
829
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)
|
|
750
830
|
*/
|
|
751
831
|
get isTrusted(): boolean;
|
|
752
832
|
/**
|
|
833
|
+
* The **`cancelBubble`** property of the Event interface is deprecated.
|
|
753
834
|
* @deprecated
|
|
754
835
|
*
|
|
755
836
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)
|
|
756
837
|
*/
|
|
757
838
|
get cancelBubble(): boolean;
|
|
758
839
|
/**
|
|
840
|
+
* The **`cancelBubble`** property of the Event interface is deprecated.
|
|
759
841
|
* @deprecated
|
|
760
842
|
*
|
|
761
843
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)
|
|
762
844
|
*/
|
|
763
845
|
set cancelBubble(value: boolean);
|
|
764
846
|
/**
|
|
765
|
-
*
|
|
847
|
+
* 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.
|
|
766
848
|
*
|
|
767
849
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)
|
|
768
850
|
*/
|
|
769
851
|
stopImmediatePropagation(): void;
|
|
770
852
|
/**
|
|
771
|
-
*
|
|
853
|
+
* 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.
|
|
772
854
|
*
|
|
773
855
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)
|
|
774
856
|
*/
|
|
775
857
|
preventDefault(): void;
|
|
776
858
|
/**
|
|
777
|
-
*
|
|
859
|
+
* The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.
|
|
778
860
|
*
|
|
779
861
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)
|
|
780
862
|
*/
|
|
781
863
|
stopPropagation(): void;
|
|
782
864
|
/**
|
|
783
|
-
*
|
|
865
|
+
* 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.
|
|
784
866
|
*
|
|
785
867
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)
|
|
786
868
|
*/
|
|
@@ -805,7 +887,7 @@ type EventListenerOrEventListenerObject<EventType extends Event = Event> =
|
|
|
805
887
|
| EventListener<EventType>
|
|
806
888
|
| EventListenerObject<EventType>;
|
|
807
889
|
/**
|
|
808
|
-
* EventTarget is
|
|
890
|
+
* The **`EventTarget`** interface is implemented by objects that can receive events and may have listeners for them.
|
|
809
891
|
*
|
|
810
892
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
|
|
811
893
|
*/
|
|
@@ -814,19 +896,7 @@ declare class EventTarget<
|
|
|
814
896
|
> {
|
|
815
897
|
constructor();
|
|
816
898
|
/**
|
|
817
|
-
*
|
|
818
|
-
*
|
|
819
|
-
* 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.
|
|
820
|
-
*
|
|
821
|
-
* 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.
|
|
822
|
-
*
|
|
823
|
-
* 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.
|
|
824
|
-
*
|
|
825
|
-
* When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
|
|
826
|
-
*
|
|
827
|
-
* If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
|
|
828
|
-
*
|
|
829
|
-
* The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
|
|
899
|
+
* The **`addEventListener()`** method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
|
|
830
900
|
*
|
|
831
901
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
|
|
832
902
|
*/
|
|
@@ -836,7 +906,7 @@ declare class EventTarget<
|
|
|
836
906
|
options?: EventTargetAddEventListenerOptions | boolean,
|
|
837
907
|
): void;
|
|
838
908
|
/**
|
|
839
|
-
*
|
|
909
|
+
* The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.
|
|
840
910
|
*
|
|
841
911
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
|
|
842
912
|
*/
|
|
@@ -846,7 +916,7 @@ declare class EventTarget<
|
|
|
846
916
|
options?: EventTargetEventListenerOptions | boolean,
|
|
847
917
|
): void;
|
|
848
918
|
/**
|
|
849
|
-
*
|
|
919
|
+
* The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
|
|
850
920
|
*
|
|
851
921
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
|
|
852
922
|
*/
|
|
@@ -865,50 +935,70 @@ interface EventTargetHandlerObject {
|
|
|
865
935
|
handleEvent: (event: Event) => any | undefined;
|
|
866
936
|
}
|
|
867
937
|
/**
|
|
868
|
-
*
|
|
938
|
+
* The **`AbortController`** interface represents a controller object that allows you to abort one or more Web requests as and when desired.
|
|
869
939
|
*
|
|
870
940
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController)
|
|
871
941
|
*/
|
|
872
942
|
declare class AbortController {
|
|
873
943
|
constructor();
|
|
874
944
|
/**
|
|
875
|
-
*
|
|
945
|
+
* 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.
|
|
876
946
|
*
|
|
877
947
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/signal)
|
|
878
948
|
*/
|
|
879
949
|
get signal(): AbortSignal;
|
|
880
950
|
/**
|
|
881
|
-
*
|
|
951
|
+
* The **`abort()`** method of the AbortController interface aborts an asynchronous operation before it has completed.
|
|
882
952
|
*
|
|
883
953
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/abort)
|
|
884
954
|
*/
|
|
885
955
|
abort(reason?: any): void;
|
|
886
956
|
}
|
|
887
957
|
/**
|
|
888
|
-
*
|
|
958
|
+
* 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.
|
|
889
959
|
*
|
|
890
960
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal)
|
|
891
961
|
*/
|
|
892
962
|
declare abstract class AbortSignal extends EventTarget {
|
|
893
|
-
|
|
963
|
+
/**
|
|
964
|
+
* The **`AbortSignal.abort()`** static method returns an AbortSignal that is already set as aborted (and which does not trigger an AbortSignal/abort_event event).
|
|
965
|
+
*
|
|
966
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static)
|
|
967
|
+
*/
|
|
894
968
|
static abort(reason?: any): AbortSignal;
|
|
895
|
-
|
|
969
|
+
/**
|
|
970
|
+
* The **`AbortSignal.timeout()`** static method returns an AbortSignal that will automatically abort after a specified time.
|
|
971
|
+
*
|
|
972
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static)
|
|
973
|
+
*/
|
|
896
974
|
static timeout(delay: number): AbortSignal;
|
|
897
|
-
|
|
975
|
+
/**
|
|
976
|
+
* The **`AbortSignal.any()`** static method takes an iterable of abort signals and returns an AbortSignal.
|
|
977
|
+
*
|
|
978
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static)
|
|
979
|
+
*/
|
|
898
980
|
static any(signals: AbortSignal[]): AbortSignal;
|
|
899
981
|
/**
|
|
900
|
-
*
|
|
982
|
+
* 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`).
|
|
901
983
|
*
|
|
902
984
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
|
|
903
985
|
*/
|
|
904
986
|
get aborted(): boolean;
|
|
905
|
-
|
|
987
|
+
/**
|
|
988
|
+
* The **`reason`** read-only property returns a JavaScript value that indicates the abort reason.
|
|
989
|
+
*
|
|
990
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason)
|
|
991
|
+
*/
|
|
906
992
|
get reason(): any;
|
|
907
993
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
908
994
|
get onabort(): any | null;
|
|
909
995
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
910
996
|
set onabort(value: any | null);
|
|
911
|
-
|
|
997
|
+
/**
|
|
998
|
+
* The **`throwIfAborted()`** method throws the signal's abort AbortSignal.reason if the signal has been aborted; otherwise it does nothing.
|
|
999
|
+
*
|
|
1000
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted)
|
|
1001
|
+
*/
|
|
912
1002
|
throwIfAborted(): void;
|
|
913
1003
|
}
|
|
914
1004
|
interface Scheduler {
|
|
@@ -918,19 +1008,27 @@ interface SchedulerWaitOptions {
|
|
|
918
1008
|
signal?: AbortSignal;
|
|
919
1009
|
}
|
|
920
1010
|
/**
|
|
921
|
-
*
|
|
1011
|
+
* The **`ExtendableEvent`** interface extends the lifetime of the `install` and `activate` events dispatched on the global scope as part of the service worker lifecycle.
|
|
922
1012
|
*
|
|
923
1013
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent)
|
|
924
1014
|
*/
|
|
925
1015
|
declare abstract class ExtendableEvent extends Event {
|
|
926
|
-
|
|
1016
|
+
/**
|
|
1017
|
+
* The **`ExtendableEvent.waitUntil()`** method tells the event dispatcher that work is ongoing.
|
|
1018
|
+
*
|
|
1019
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil)
|
|
1020
|
+
*/
|
|
927
1021
|
waitUntil(promise: Promise<any>): void;
|
|
928
1022
|
}
|
|
929
|
-
|
|
1023
|
+
/**
|
|
1024
|
+
* The **`CustomEvent`** interface represents events initialized by an application for any purpose.
|
|
1025
|
+
*
|
|
1026
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent)
|
|
1027
|
+
*/
|
|
930
1028
|
declare class CustomEvent<T = any> extends Event {
|
|
931
1029
|
constructor(type: string, init?: CustomEventCustomEventInit);
|
|
932
1030
|
/**
|
|
933
|
-
*
|
|
1031
|
+
* The read-only **`detail`** property of the CustomEvent interface returns any data passed when initializing the event.
|
|
934
1032
|
*
|
|
935
1033
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent/detail)
|
|
936
1034
|
*/
|
|
@@ -943,7 +1041,7 @@ interface CustomEventCustomEventInit {
|
|
|
943
1041
|
detail?: any;
|
|
944
1042
|
}
|
|
945
1043
|
/**
|
|
946
|
-
*
|
|
1044
|
+
* 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.
|
|
947
1045
|
*
|
|
948
1046
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob)
|
|
949
1047
|
*/
|
|
@@ -952,26 +1050,54 @@ declare class Blob {
|
|
|
952
1050
|
type?: ((ArrayBuffer | ArrayBufferView) | string | Blob)[],
|
|
953
1051
|
options?: BlobOptions,
|
|
954
1052
|
);
|
|
955
|
-
|
|
1053
|
+
/**
|
|
1054
|
+
* The **`size`** read-only property of the Blob interface returns the size of the Blob or File in bytes.
|
|
1055
|
+
*
|
|
1056
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size)
|
|
1057
|
+
*/
|
|
956
1058
|
get size(): number;
|
|
957
|
-
|
|
1059
|
+
/**
|
|
1060
|
+
* The **`type`** read-only property of the Blob interface returns the MIME type of the file.
|
|
1061
|
+
*
|
|
1062
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type)
|
|
1063
|
+
*/
|
|
958
1064
|
get type(): string;
|
|
959
|
-
|
|
1065
|
+
/**
|
|
1066
|
+
* 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.
|
|
1067
|
+
*
|
|
1068
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice)
|
|
1069
|
+
*/
|
|
960
1070
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
961
|
-
|
|
1071
|
+
/**
|
|
1072
|
+
* 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.
|
|
1073
|
+
*
|
|
1074
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer)
|
|
1075
|
+
*/
|
|
962
1076
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
963
|
-
|
|
1077
|
+
/**
|
|
1078
|
+
* 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.
|
|
1079
|
+
*
|
|
1080
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/bytes)
|
|
1081
|
+
*/
|
|
964
1082
|
bytes(): Promise<Uint8Array>;
|
|
965
|
-
|
|
1083
|
+
/**
|
|
1084
|
+
* The **`text()`** method of the string containing the contents of the blob, interpreted as UTF-8.
|
|
1085
|
+
*
|
|
1086
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text)
|
|
1087
|
+
*/
|
|
966
1088
|
text(): Promise<string>;
|
|
967
|
-
|
|
1089
|
+
/**
|
|
1090
|
+
* The **`stream()`** method of the Blob interface returns a ReadableStream which upon reading returns the data contained within the `Blob`.
|
|
1091
|
+
*
|
|
1092
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream)
|
|
1093
|
+
*/
|
|
968
1094
|
stream(): ReadableStream;
|
|
969
1095
|
}
|
|
970
1096
|
interface BlobOptions {
|
|
971
1097
|
type?: string;
|
|
972
1098
|
}
|
|
973
1099
|
/**
|
|
974
|
-
*
|
|
1100
|
+
* The **`File`** interface provides information about files and allows JavaScript in a web page to access their content.
|
|
975
1101
|
*
|
|
976
1102
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File)
|
|
977
1103
|
*/
|
|
@@ -981,9 +1107,17 @@ declare class File extends Blob {
|
|
|
981
1107
|
name: string,
|
|
982
1108
|
options?: FileOptions,
|
|
983
1109
|
);
|
|
984
|
-
|
|
1110
|
+
/**
|
|
1111
|
+
* The **`name`** read-only property of the File interface returns the name of the file represented by a File object.
|
|
1112
|
+
*
|
|
1113
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name)
|
|
1114
|
+
*/
|
|
985
1115
|
get name(): string;
|
|
986
|
-
|
|
1116
|
+
/**
|
|
1117
|
+
* 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).
|
|
1118
|
+
*
|
|
1119
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified)
|
|
1120
|
+
*/
|
|
987
1121
|
get lastModified(): number;
|
|
988
1122
|
}
|
|
989
1123
|
interface FileOptions {
|
|
@@ -996,7 +1130,11 @@ interface FileOptions {
|
|
|
996
1130
|
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
997
1131
|
*/
|
|
998
1132
|
declare abstract class CacheStorage {
|
|
999
|
-
|
|
1133
|
+
/**
|
|
1134
|
+
* The **`open()`** method of the the Cache object matching the `cacheName`.
|
|
1135
|
+
*
|
|
1136
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open)
|
|
1137
|
+
*/
|
|
1000
1138
|
open(cacheName: string): Promise<Cache>;
|
|
1001
1139
|
readonly default: Cache;
|
|
1002
1140
|
}
|
|
@@ -1032,12 +1170,17 @@ interface CacheQueryOptions {
|
|
|
1032
1170
|
*/
|
|
1033
1171
|
declare abstract class Crypto {
|
|
1034
1172
|
/**
|
|
1173
|
+
* The **`Crypto.subtle`** read-only property returns a cryptographic operations.
|
|
1035
1174
|
* Available only in secure contexts.
|
|
1036
1175
|
*
|
|
1037
1176
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
|
|
1038
1177
|
*/
|
|
1039
1178
|
get subtle(): SubtleCrypto;
|
|
1040
|
-
|
|
1179
|
+
/**
|
|
1180
|
+
* The **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.
|
|
1181
|
+
*
|
|
1182
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues)
|
|
1183
|
+
*/
|
|
1041
1184
|
getRandomValues<
|
|
1042
1185
|
T extends
|
|
1043
1186
|
| Int8Array
|
|
@@ -1050,6 +1193,7 @@ declare abstract class Crypto {
|
|
|
1050
1193
|
| BigUint64Array,
|
|
1051
1194
|
>(buffer: T): T;
|
|
1052
1195
|
/**
|
|
1196
|
+
* The **`randomUUID()`** method of the Crypto interface is used to generate a v4 UUID using a cryptographically secure random number generator.
|
|
1053
1197
|
* Available only in secure contexts.
|
|
1054
1198
|
*
|
|
1055
1199
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/randomUUID)
|
|
@@ -1058,49 +1202,77 @@ declare abstract class Crypto {
|
|
|
1058
1202
|
DigestStream: typeof DigestStream;
|
|
1059
1203
|
}
|
|
1060
1204
|
/**
|
|
1061
|
-
*
|
|
1205
|
+
* The **`SubtleCrypto`** interface of the Web Crypto API provides a number of low-level cryptographic functions.
|
|
1062
1206
|
* Available only in secure contexts.
|
|
1063
1207
|
*
|
|
1064
1208
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto)
|
|
1065
1209
|
*/
|
|
1066
1210
|
declare abstract class SubtleCrypto {
|
|
1067
|
-
|
|
1211
|
+
/**
|
|
1212
|
+
* The **`encrypt()`** method of the SubtleCrypto interface encrypts data.
|
|
1213
|
+
*
|
|
1214
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt)
|
|
1215
|
+
*/
|
|
1068
1216
|
encrypt(
|
|
1069
1217
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1070
1218
|
key: CryptoKey,
|
|
1071
1219
|
plainText: ArrayBuffer | ArrayBufferView,
|
|
1072
1220
|
): Promise<ArrayBuffer>;
|
|
1073
|
-
|
|
1221
|
+
/**
|
|
1222
|
+
* The **`decrypt()`** method of the SubtleCrypto interface decrypts some encrypted data.
|
|
1223
|
+
*
|
|
1224
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt)
|
|
1225
|
+
*/
|
|
1074
1226
|
decrypt(
|
|
1075
1227
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1076
1228
|
key: CryptoKey,
|
|
1077
1229
|
cipherText: ArrayBuffer | ArrayBufferView,
|
|
1078
1230
|
): Promise<ArrayBuffer>;
|
|
1079
|
-
|
|
1231
|
+
/**
|
|
1232
|
+
* The **`sign()`** method of the SubtleCrypto interface generates a digital signature.
|
|
1233
|
+
*
|
|
1234
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign)
|
|
1235
|
+
*/
|
|
1080
1236
|
sign(
|
|
1081
1237
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
1082
1238
|
key: CryptoKey,
|
|
1083
1239
|
data: ArrayBuffer | ArrayBufferView,
|
|
1084
1240
|
): Promise<ArrayBuffer>;
|
|
1085
|
-
|
|
1241
|
+
/**
|
|
1242
|
+
* The **`verify()`** method of the SubtleCrypto interface verifies a digital signature.
|
|
1243
|
+
*
|
|
1244
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify)
|
|
1245
|
+
*/
|
|
1086
1246
|
verify(
|
|
1087
1247
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
1088
1248
|
key: CryptoKey,
|
|
1089
1249
|
signature: ArrayBuffer | ArrayBufferView,
|
|
1090
1250
|
data: ArrayBuffer | ArrayBufferView,
|
|
1091
1251
|
): Promise<boolean>;
|
|
1092
|
-
|
|
1252
|
+
/**
|
|
1253
|
+
* The **`digest()`** method of the SubtleCrypto interface generates a _digest_ of the given data, using the specified hash function.
|
|
1254
|
+
*
|
|
1255
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest)
|
|
1256
|
+
*/
|
|
1093
1257
|
digest(
|
|
1094
1258
|
algorithm: string | SubtleCryptoHashAlgorithm,
|
|
1095
1259
|
data: ArrayBuffer | ArrayBufferView,
|
|
1096
1260
|
): Promise<ArrayBuffer>;
|
|
1097
|
-
|
|
1261
|
+
/**
|
|
1262
|
+
* The **`generateKey()`** method of the SubtleCrypto interface is used to generate a new key (for symmetric algorithms) or key pair (for public-key algorithms).
|
|
1263
|
+
*
|
|
1264
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey)
|
|
1265
|
+
*/
|
|
1098
1266
|
generateKey(
|
|
1099
1267
|
algorithm: string | SubtleCryptoGenerateKeyAlgorithm,
|
|
1100
1268
|
extractable: boolean,
|
|
1101
1269
|
keyUsages: string[],
|
|
1102
1270
|
): Promise<CryptoKey | CryptoKeyPair>;
|
|
1103
|
-
|
|
1271
|
+
/**
|
|
1272
|
+
* The **`deriveKey()`** method of the SubtleCrypto interface can be used to derive a secret key from a master key.
|
|
1273
|
+
*
|
|
1274
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey)
|
|
1275
|
+
*/
|
|
1104
1276
|
deriveKey(
|
|
1105
1277
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
1106
1278
|
baseKey: CryptoKey,
|
|
@@ -1108,13 +1280,21 @@ declare abstract class SubtleCrypto {
|
|
|
1108
1280
|
extractable: boolean,
|
|
1109
1281
|
keyUsages: string[],
|
|
1110
1282
|
): Promise<CryptoKey>;
|
|
1111
|
-
|
|
1283
|
+
/**
|
|
1284
|
+
* The **`deriveBits()`** method of the key.
|
|
1285
|
+
*
|
|
1286
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits)
|
|
1287
|
+
*/
|
|
1112
1288
|
deriveBits(
|
|
1113
1289
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
1114
1290
|
baseKey: CryptoKey,
|
|
1115
1291
|
length?: number | null,
|
|
1116
1292
|
): Promise<ArrayBuffer>;
|
|
1117
|
-
|
|
1293
|
+
/**
|
|
1294
|
+
* 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.
|
|
1295
|
+
*
|
|
1296
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey)
|
|
1297
|
+
*/
|
|
1118
1298
|
importKey(
|
|
1119
1299
|
format: string,
|
|
1120
1300
|
keyData: (ArrayBuffer | ArrayBufferView) | JsonWebKey,
|
|
@@ -1122,16 +1302,28 @@ declare abstract class SubtleCrypto {
|
|
|
1122
1302
|
extractable: boolean,
|
|
1123
1303
|
keyUsages: string[],
|
|
1124
1304
|
): Promise<CryptoKey>;
|
|
1125
|
-
|
|
1305
|
+
/**
|
|
1306
|
+
* 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.
|
|
1307
|
+
*
|
|
1308
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey)
|
|
1309
|
+
*/
|
|
1126
1310
|
exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
1127
|
-
|
|
1311
|
+
/**
|
|
1312
|
+
* The **`wrapKey()`** method of the SubtleCrypto interface 'wraps' a key.
|
|
1313
|
+
*
|
|
1314
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey)
|
|
1315
|
+
*/
|
|
1128
1316
|
wrapKey(
|
|
1129
1317
|
format: string,
|
|
1130
1318
|
key: CryptoKey,
|
|
1131
1319
|
wrappingKey: CryptoKey,
|
|
1132
1320
|
wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1133
1321
|
): Promise<ArrayBuffer>;
|
|
1134
|
-
|
|
1322
|
+
/**
|
|
1323
|
+
* The **`unwrapKey()`** method of the SubtleCrypto interface 'unwraps' a key.
|
|
1324
|
+
*
|
|
1325
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey)
|
|
1326
|
+
*/
|
|
1135
1327
|
unwrapKey(
|
|
1136
1328
|
format: string,
|
|
1137
1329
|
wrappedKey: ArrayBuffer | ArrayBufferView,
|
|
@@ -1147,17 +1339,29 @@ declare abstract class SubtleCrypto {
|
|
|
1147
1339
|
): boolean;
|
|
1148
1340
|
}
|
|
1149
1341
|
/**
|
|
1150
|
-
* The CryptoKey
|
|
1342
|
+
* 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.
|
|
1151
1343
|
* Available only in secure contexts.
|
|
1152
1344
|
*
|
|
1153
1345
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)
|
|
1154
1346
|
*/
|
|
1155
1347
|
declare abstract class CryptoKey {
|
|
1156
|
-
|
|
1348
|
+
/**
|
|
1349
|
+
* The read-only **`type`** property of the CryptoKey interface indicates which kind of key is represented by the object.
|
|
1350
|
+
*
|
|
1351
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type)
|
|
1352
|
+
*/
|
|
1157
1353
|
readonly type: string;
|
|
1158
|
-
|
|
1354
|
+
/**
|
|
1355
|
+
* The read-only **`extractable`** property of the CryptoKey interface indicates whether or not the key may be extracted using `SubtleCrypto.exportKey()` or `SubtleCrypto.wrapKey()`.
|
|
1356
|
+
*
|
|
1357
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable)
|
|
1358
|
+
*/
|
|
1159
1359
|
readonly extractable: boolean;
|
|
1160
|
-
|
|
1360
|
+
/**
|
|
1361
|
+
* 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.
|
|
1362
|
+
*
|
|
1363
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm)
|
|
1364
|
+
*/
|
|
1161
1365
|
readonly algorithm:
|
|
1162
1366
|
| CryptoKeyKeyAlgorithm
|
|
1163
1367
|
| CryptoKeyAesKeyAlgorithm
|
|
@@ -1165,7 +1369,11 @@ declare abstract class CryptoKey {
|
|
|
1165
1369
|
| CryptoKeyRsaKeyAlgorithm
|
|
1166
1370
|
| CryptoKeyEllipticKeyAlgorithm
|
|
1167
1371
|
| CryptoKeyArbitraryKeyAlgorithm;
|
|
1168
|
-
|
|
1372
|
+
/**
|
|
1373
|
+
* The read-only **`usages`** property of the CryptoKey interface indicates what can be done with the key.
|
|
1374
|
+
*
|
|
1375
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages)
|
|
1376
|
+
*/
|
|
1169
1377
|
readonly usages: string[];
|
|
1170
1378
|
}
|
|
1171
1379
|
interface CryptoKeyPair {
|
|
@@ -1274,24 +1482,14 @@ declare class DigestStream extends WritableStream<
|
|
|
1274
1482
|
get bytesWritten(): number | bigint;
|
|
1275
1483
|
}
|
|
1276
1484
|
/**
|
|
1277
|
-
*
|
|
1485
|
+
* The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, `KOI8-R`, `GBK`, etc.
|
|
1278
1486
|
*
|
|
1279
1487
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
|
|
1280
1488
|
*/
|
|
1281
1489
|
declare class TextDecoder {
|
|
1282
1490
|
constructor(label?: string, options?: TextDecoderConstructorOptions);
|
|
1283
1491
|
/**
|
|
1284
|
-
*
|
|
1285
|
-
*
|
|
1286
|
-
* ```
|
|
1287
|
-
* var string = "", decoder = new TextDecoder(encoding), buffer;
|
|
1288
|
-
* while(buffer = next_chunk()) {
|
|
1289
|
-
* string += decoder.decode(buffer, {stream:true});
|
|
1290
|
-
* }
|
|
1291
|
-
* string += decoder.decode(); // end-of-queue
|
|
1292
|
-
* ```
|
|
1293
|
-
*
|
|
1294
|
-
* If the error mode is "fatal" and encoding's decoder returns error, throws a TypeError.
|
|
1492
|
+
* The **`TextDecoder.decode()`** method returns a string containing text decoded from the buffer passed as a parameter.
|
|
1295
1493
|
*
|
|
1296
1494
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder/decode)
|
|
1297
1495
|
*/
|
|
@@ -1304,27 +1502,24 @@ declare class TextDecoder {
|
|
|
1304
1502
|
get ignoreBOM(): boolean;
|
|
1305
1503
|
}
|
|
1306
1504
|
/**
|
|
1307
|
-
* TextEncoder takes a stream of code points as input and emits a stream of
|
|
1505
|
+
* The **`TextEncoder`** interface takes a stream of code points as input and emits a stream of UTF-8 bytes.
|
|
1308
1506
|
*
|
|
1309
1507
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
|
|
1310
1508
|
*/
|
|
1311
1509
|
declare class TextEncoder {
|
|
1312
1510
|
constructor();
|
|
1313
1511
|
/**
|
|
1314
|
-
*
|
|
1512
|
+
* 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.
|
|
1315
1513
|
*
|
|
1316
1514
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encode)
|
|
1317
1515
|
*/
|
|
1318
1516
|
encode(input?: string): Uint8Array;
|
|
1319
1517
|
/**
|
|
1320
|
-
*
|
|
1518
|
+
* 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.
|
|
1321
1519
|
*
|
|
1322
1520
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
|
|
1323
1521
|
*/
|
|
1324
|
-
encodeInto(
|
|
1325
|
-
input: string,
|
|
1326
|
-
buffer: ArrayBuffer | ArrayBufferView,
|
|
1327
|
-
): TextEncoderEncodeIntoResult;
|
|
1522
|
+
encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
|
|
1328
1523
|
get encoding(): string;
|
|
1329
1524
|
}
|
|
1330
1525
|
interface TextDecoderConstructorOptions {
|
|
@@ -1339,21 +1534,41 @@ interface TextEncoderEncodeIntoResult {
|
|
|
1339
1534
|
written: number;
|
|
1340
1535
|
}
|
|
1341
1536
|
/**
|
|
1342
|
-
*
|
|
1537
|
+
* The **`ErrorEvent`** interface represents events providing information related to errors in scripts or in files.
|
|
1343
1538
|
*
|
|
1344
1539
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
|
|
1345
1540
|
*/
|
|
1346
1541
|
declare class ErrorEvent extends Event {
|
|
1347
1542
|
constructor(type: string, init?: ErrorEventErrorEventInit);
|
|
1348
|
-
|
|
1543
|
+
/**
|
|
1544
|
+
* The **`filename`** read-only property of the ErrorEvent interface returns a string containing the name of the script file in which the error occurred.
|
|
1545
|
+
*
|
|
1546
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename)
|
|
1547
|
+
*/
|
|
1349
1548
|
get filename(): string;
|
|
1350
|
-
|
|
1549
|
+
/**
|
|
1550
|
+
* The **`message`** read-only property of the ErrorEvent interface returns a string containing a human-readable error message describing the problem.
|
|
1551
|
+
*
|
|
1552
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message)
|
|
1553
|
+
*/
|
|
1351
1554
|
get message(): string;
|
|
1352
|
-
|
|
1555
|
+
/**
|
|
1556
|
+
* 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.
|
|
1557
|
+
*
|
|
1558
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno)
|
|
1559
|
+
*/
|
|
1353
1560
|
get lineno(): number;
|
|
1354
|
-
|
|
1561
|
+
/**
|
|
1562
|
+
* 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.
|
|
1563
|
+
*
|
|
1564
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno)
|
|
1565
|
+
*/
|
|
1355
1566
|
get colno(): number;
|
|
1356
|
-
|
|
1567
|
+
/**
|
|
1568
|
+
* 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.
|
|
1569
|
+
*
|
|
1570
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error)
|
|
1571
|
+
*/
|
|
1357
1572
|
get error(): any;
|
|
1358
1573
|
}
|
|
1359
1574
|
interface ErrorEventErrorEventInit {
|
|
@@ -1364,38 +1579,38 @@ interface ErrorEventErrorEventInit {
|
|
|
1364
1579
|
error?: any;
|
|
1365
1580
|
}
|
|
1366
1581
|
/**
|
|
1367
|
-
*
|
|
1582
|
+
* The **`MessageEvent`** interface represents a message received by a target object.
|
|
1368
1583
|
*
|
|
1369
1584
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
|
|
1370
1585
|
*/
|
|
1371
1586
|
declare class MessageEvent extends Event {
|
|
1372
1587
|
constructor(type: string, initializer: MessageEventInit);
|
|
1373
1588
|
/**
|
|
1374
|
-
*
|
|
1589
|
+
* 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.
|
|
1375
1590
|
*
|
|
1376
1591
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
|
|
1377
1592
|
*/
|
|
1378
1593
|
readonly data: any;
|
|
1379
1594
|
/**
|
|
1380
|
-
*
|
|
1595
|
+
* The **`origin`** read-only property of the origin of the message emitter.
|
|
1381
1596
|
*
|
|
1382
1597
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/origin)
|
|
1383
1598
|
*/
|
|
1384
1599
|
readonly origin: string | null;
|
|
1385
1600
|
/**
|
|
1386
|
-
*
|
|
1601
|
+
* The **`lastEventId`** read-only property of the unique ID for the event.
|
|
1387
1602
|
*
|
|
1388
1603
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/lastEventId)
|
|
1389
1604
|
*/
|
|
1390
1605
|
readonly lastEventId: string;
|
|
1391
1606
|
/**
|
|
1392
|
-
*
|
|
1607
|
+
* The **`source`** read-only property of the a WindowProxy, MessagePort, or a `MessageEventSource` (which can be a WindowProxy, message emitter.
|
|
1393
1608
|
*
|
|
1394
1609
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/source)
|
|
1395
1610
|
*/
|
|
1396
1611
|
readonly source: MessagePort | null;
|
|
1397
1612
|
/**
|
|
1398
|
-
*
|
|
1613
|
+
* The **`ports`** read-only property of the containing all MessagePort objects sent with the message, in order.
|
|
1399
1614
|
*
|
|
1400
1615
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/ports)
|
|
1401
1616
|
*/
|
|
@@ -1405,27 +1620,78 @@ interface MessageEventInit {
|
|
|
1405
1620
|
data: ArrayBuffer | string;
|
|
1406
1621
|
}
|
|
1407
1622
|
/**
|
|
1408
|
-
*
|
|
1623
|
+
* The **`PromiseRejectionEvent`** interface represents events which are sent to the global script context when JavaScript Promises are rejected.
|
|
1624
|
+
*
|
|
1625
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent)
|
|
1626
|
+
*/
|
|
1627
|
+
declare abstract class PromiseRejectionEvent extends Event {
|
|
1628
|
+
/**
|
|
1629
|
+
* The PromiseRejectionEvent interface's **`promise`** read-only property indicates the JavaScript rejected.
|
|
1630
|
+
*
|
|
1631
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise)
|
|
1632
|
+
*/
|
|
1633
|
+
readonly promise: Promise<any>;
|
|
1634
|
+
/**
|
|
1635
|
+
* The PromiseRejectionEvent **`reason`** read-only property is any JavaScript value or Object which provides the reason passed into Promise.reject().
|
|
1636
|
+
*
|
|
1637
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason)
|
|
1638
|
+
*/
|
|
1639
|
+
readonly reason: any;
|
|
1640
|
+
}
|
|
1641
|
+
/**
|
|
1642
|
+
* 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.
|
|
1409
1643
|
*
|
|
1410
1644
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)
|
|
1411
1645
|
*/
|
|
1412
1646
|
declare class FormData {
|
|
1413
1647
|
constructor();
|
|
1414
|
-
|
|
1648
|
+
/**
|
|
1649
|
+
* 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.
|
|
1650
|
+
*
|
|
1651
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append)
|
|
1652
|
+
*/
|
|
1415
1653
|
append(name: string, value: string): void;
|
|
1416
|
-
|
|
1654
|
+
/**
|
|
1655
|
+
* 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.
|
|
1656
|
+
*
|
|
1657
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append)
|
|
1658
|
+
*/
|
|
1417
1659
|
append(name: string, value: Blob, filename?: string): void;
|
|
1418
|
-
|
|
1660
|
+
/**
|
|
1661
|
+
* The **`delete()`** method of the FormData interface deletes a key and its value(s) from a `FormData` object.
|
|
1662
|
+
*
|
|
1663
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete)
|
|
1664
|
+
*/
|
|
1419
1665
|
delete(name: string): void;
|
|
1420
|
-
|
|
1666
|
+
/**
|
|
1667
|
+
* The **`get()`** method of the FormData interface returns the first value associated with a given key from within a `FormData` object.
|
|
1668
|
+
*
|
|
1669
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get)
|
|
1670
|
+
*/
|
|
1421
1671
|
get(name: string): (File | string) | null;
|
|
1422
|
-
|
|
1672
|
+
/**
|
|
1673
|
+
* The **`getAll()`** method of the FormData interface returns all the values associated with a given key from within a `FormData` object.
|
|
1674
|
+
*
|
|
1675
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll)
|
|
1676
|
+
*/
|
|
1423
1677
|
getAll(name: string): (File | string)[];
|
|
1424
|
-
|
|
1678
|
+
/**
|
|
1679
|
+
* The **`has()`** method of the FormData interface returns whether a `FormData` object contains a certain key.
|
|
1680
|
+
*
|
|
1681
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has)
|
|
1682
|
+
*/
|
|
1425
1683
|
has(name: string): boolean;
|
|
1426
|
-
|
|
1684
|
+
/**
|
|
1685
|
+
* 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.
|
|
1686
|
+
*
|
|
1687
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set)
|
|
1688
|
+
*/
|
|
1427
1689
|
set(name: string, value: string): void;
|
|
1428
|
-
|
|
1690
|
+
/**
|
|
1691
|
+
* 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.
|
|
1692
|
+
*
|
|
1693
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set)
|
|
1694
|
+
*/
|
|
1429
1695
|
set(name: string, value: Blob, filename?: string): void;
|
|
1430
1696
|
/* Returns an array of key, value pairs for every entry in the list. */
|
|
1431
1697
|
entries(): IterableIterator<[key: string, value: File | string]>;
|
|
@@ -1551,14 +1817,22 @@ interface DocumentEnd {
|
|
|
1551
1817
|
append(content: string, options?: ContentOptions): DocumentEnd;
|
|
1552
1818
|
}
|
|
1553
1819
|
/**
|
|
1554
|
-
* This is the event type for fetch
|
|
1820
|
+
* This is the event type for `fetch` events dispatched on the ServiceWorkerGlobalScope.
|
|
1555
1821
|
*
|
|
1556
1822
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent)
|
|
1557
1823
|
*/
|
|
1558
1824
|
declare abstract class FetchEvent extends ExtendableEvent {
|
|
1559
|
-
|
|
1825
|
+
/**
|
|
1826
|
+
* The **`request`** read-only property of the the event handler.
|
|
1827
|
+
*
|
|
1828
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request)
|
|
1829
|
+
*/
|
|
1560
1830
|
readonly request: Request;
|
|
1561
|
-
|
|
1831
|
+
/**
|
|
1832
|
+
* The **`respondWith()`** method of allows you to provide a promise for a Response yourself.
|
|
1833
|
+
*
|
|
1834
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith)
|
|
1835
|
+
*/
|
|
1562
1836
|
respondWith(promise: Response | Promise<Response>): void;
|
|
1563
1837
|
passThroughOnException(): void;
|
|
1564
1838
|
}
|
|
@@ -1567,24 +1841,48 @@ type HeadersInit =
|
|
|
1567
1841
|
| Iterable<Iterable<string>>
|
|
1568
1842
|
| Record<string, string>;
|
|
1569
1843
|
/**
|
|
1570
|
-
*
|
|
1844
|
+
* The **`Headers`** interface of the Fetch API allows you to perform various actions on HTTP request and response headers.
|
|
1571
1845
|
*
|
|
1572
1846
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers)
|
|
1573
1847
|
*/
|
|
1574
1848
|
declare class Headers {
|
|
1575
1849
|
constructor(init?: HeadersInit);
|
|
1576
|
-
|
|
1850
|
+
/**
|
|
1851
|
+
* 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.
|
|
1852
|
+
*
|
|
1853
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get)
|
|
1854
|
+
*/
|
|
1577
1855
|
get(name: string): string | null;
|
|
1578
1856
|
getAll(name: string): string[];
|
|
1579
|
-
|
|
1857
|
+
/**
|
|
1858
|
+
* The **`getSetCookie()`** method of the Headers interface returns an array containing the values of all Set-Cookie headers associated with a response.
|
|
1859
|
+
*
|
|
1860
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie)
|
|
1861
|
+
*/
|
|
1580
1862
|
getSetCookie(): string[];
|
|
1581
|
-
|
|
1863
|
+
/**
|
|
1864
|
+
* The **`has()`** method of the Headers interface returns a boolean stating whether a `Headers` object contains a certain header.
|
|
1865
|
+
*
|
|
1866
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has)
|
|
1867
|
+
*/
|
|
1582
1868
|
has(name: string): boolean;
|
|
1583
|
-
|
|
1869
|
+
/**
|
|
1870
|
+
* 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.
|
|
1871
|
+
*
|
|
1872
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set)
|
|
1873
|
+
*/
|
|
1584
1874
|
set(name: string, value: string): void;
|
|
1585
|
-
|
|
1875
|
+
/**
|
|
1876
|
+
* 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.
|
|
1877
|
+
*
|
|
1878
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append)
|
|
1879
|
+
*/
|
|
1586
1880
|
append(name: string, value: string): void;
|
|
1587
|
-
|
|
1881
|
+
/**
|
|
1882
|
+
* The **`delete()`** method of the Headers interface deletes a header from the current `Headers` object.
|
|
1883
|
+
*
|
|
1884
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete)
|
|
1885
|
+
*/
|
|
1588
1886
|
delete(name: string): void;
|
|
1589
1887
|
forEach<This = unknown>(
|
|
1590
1888
|
callback: (this: This, value: string, key: string, parent: Headers) => void,
|
|
@@ -1625,7 +1923,7 @@ declare abstract class Body {
|
|
|
1625
1923
|
blob(): Promise<Blob>;
|
|
1626
1924
|
}
|
|
1627
1925
|
/**
|
|
1628
|
-
*
|
|
1926
|
+
* The **`Response`** interface of the Fetch API represents the response to a request.
|
|
1629
1927
|
*
|
|
1630
1928
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
|
|
1631
1929
|
*/
|
|
@@ -1637,28 +1935,60 @@ declare var Response: {
|
|
|
1637
1935
|
json(any: any, maybeInit?: ResponseInit | Response): Response;
|
|
1638
1936
|
};
|
|
1639
1937
|
/**
|
|
1640
|
-
*
|
|
1938
|
+
* The **`Response`** interface of the Fetch API represents the response to a request.
|
|
1641
1939
|
*
|
|
1642
1940
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
|
|
1643
1941
|
*/
|
|
1644
1942
|
interface Response extends Body {
|
|
1645
|
-
|
|
1943
|
+
/**
|
|
1944
|
+
* The **`clone()`** method of the Response interface creates a clone of a response object, identical in every way, but stored in a different variable.
|
|
1945
|
+
*
|
|
1946
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone)
|
|
1947
|
+
*/
|
|
1646
1948
|
clone(): Response;
|
|
1647
|
-
|
|
1949
|
+
/**
|
|
1950
|
+
* The **`status`** read-only property of the Response interface contains the HTTP status codes of the response.
|
|
1951
|
+
*
|
|
1952
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status)
|
|
1953
|
+
*/
|
|
1648
1954
|
status: number;
|
|
1649
|
-
|
|
1955
|
+
/**
|
|
1956
|
+
* The **`statusText`** read-only property of the Response interface contains the status message corresponding to the HTTP status code in Response.status.
|
|
1957
|
+
*
|
|
1958
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText)
|
|
1959
|
+
*/
|
|
1650
1960
|
statusText: string;
|
|
1651
|
-
|
|
1961
|
+
/**
|
|
1962
|
+
* The **`headers`** read-only property of the with the response.
|
|
1963
|
+
*
|
|
1964
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers)
|
|
1965
|
+
*/
|
|
1652
1966
|
headers: Headers;
|
|
1653
|
-
|
|
1967
|
+
/**
|
|
1968
|
+
* 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.
|
|
1969
|
+
*
|
|
1970
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok)
|
|
1971
|
+
*/
|
|
1654
1972
|
ok: boolean;
|
|
1655
|
-
|
|
1973
|
+
/**
|
|
1974
|
+
* 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.
|
|
1975
|
+
*
|
|
1976
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected)
|
|
1977
|
+
*/
|
|
1656
1978
|
redirected: boolean;
|
|
1657
|
-
|
|
1979
|
+
/**
|
|
1980
|
+
* The **`url`** read-only property of the Response interface contains the URL of the response.
|
|
1981
|
+
*
|
|
1982
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url)
|
|
1983
|
+
*/
|
|
1658
1984
|
url: string;
|
|
1659
1985
|
webSocket: WebSocket | null;
|
|
1660
1986
|
cf: any | undefined;
|
|
1661
|
-
|
|
1987
|
+
/**
|
|
1988
|
+
* The **`type`** read-only property of the Response interface contains the type of the response.
|
|
1989
|
+
*
|
|
1990
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/type)
|
|
1991
|
+
*/
|
|
1662
1992
|
type: "default" | "error";
|
|
1663
1993
|
}
|
|
1664
1994
|
interface ResponseInit {
|
|
@@ -1673,7 +2003,7 @@ type RequestInfo<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> =
|
|
|
1673
2003
|
| Request<CfHostMetadata, Cf>
|
|
1674
2004
|
| string;
|
|
1675
2005
|
/**
|
|
1676
|
-
*
|
|
2006
|
+
* The **`Request`** interface of the Fetch API represents a resource request.
|
|
1677
2007
|
*
|
|
1678
2008
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
|
|
1679
2009
|
*/
|
|
@@ -1685,54 +2015,58 @@ declare var Request: {
|
|
|
1685
2015
|
): Request<CfHostMetadata, Cf>;
|
|
1686
2016
|
};
|
|
1687
2017
|
/**
|
|
1688
|
-
*
|
|
2018
|
+
* The **`Request`** interface of the Fetch API represents a resource request.
|
|
1689
2019
|
*
|
|
1690
2020
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
|
|
1691
2021
|
*/
|
|
1692
2022
|
interface Request<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>>
|
|
1693
2023
|
extends Body {
|
|
1694
|
-
|
|
2024
|
+
/**
|
|
2025
|
+
* The **`clone()`** method of the Request interface creates a copy of the current `Request` object.
|
|
2026
|
+
*
|
|
2027
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone)
|
|
2028
|
+
*/
|
|
1695
2029
|
clone(): Request<CfHostMetadata, Cf>;
|
|
1696
2030
|
/**
|
|
1697
|
-
*
|
|
2031
|
+
* The **`method`** read-only property of the `POST`, etc.) A String indicating the method of the request.
|
|
1698
2032
|
*
|
|
1699
2033
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/method)
|
|
1700
2034
|
*/
|
|
1701
2035
|
method: string;
|
|
1702
2036
|
/**
|
|
1703
|
-
*
|
|
2037
|
+
* The **`url`** read-only property of the Request interface contains the URL of the request.
|
|
1704
2038
|
*
|
|
1705
2039
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/url)
|
|
1706
2040
|
*/
|
|
1707
2041
|
url: string;
|
|
1708
2042
|
/**
|
|
1709
|
-
*
|
|
2043
|
+
* The **`headers`** read-only property of the with the request.
|
|
1710
2044
|
*
|
|
1711
2045
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/headers)
|
|
1712
2046
|
*/
|
|
1713
2047
|
headers: Headers;
|
|
1714
2048
|
/**
|
|
1715
|
-
*
|
|
2049
|
+
* The **`redirect`** read-only property of the Request interface contains the mode for how redirects are handled.
|
|
1716
2050
|
*
|
|
1717
2051
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/redirect)
|
|
1718
2052
|
*/
|
|
1719
2053
|
redirect: string;
|
|
1720
2054
|
fetcher: Fetcher | null;
|
|
1721
2055
|
/**
|
|
1722
|
-
*
|
|
2056
|
+
* The read-only **`signal`** property of the Request interface returns the AbortSignal associated with the request.
|
|
1723
2057
|
*
|
|
1724
2058
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/signal)
|
|
1725
2059
|
*/
|
|
1726
2060
|
signal: AbortSignal;
|
|
1727
2061
|
cf: Cf | undefined;
|
|
1728
2062
|
/**
|
|
1729
|
-
*
|
|
2063
|
+
* The **`integrity`** read-only property of the Request interface contains the subresource integrity value of the request.
|
|
1730
2064
|
*
|
|
1731
2065
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/integrity)
|
|
1732
2066
|
*/
|
|
1733
2067
|
integrity: string;
|
|
1734
2068
|
/**
|
|
1735
|
-
*
|
|
2069
|
+
* 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.
|
|
1736
2070
|
*
|
|
1737
2071
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive)
|
|
1738
2072
|
*/
|
|
@@ -2241,30 +2575,58 @@ type ReadableStreamReadResult<R = any> =
|
|
|
2241
2575
|
value?: undefined;
|
|
2242
2576
|
};
|
|
2243
2577
|
/**
|
|
2244
|
-
*
|
|
2578
|
+
* The `ReadableStream` interface of the Streams API represents a readable stream of byte data.
|
|
2245
2579
|
*
|
|
2246
2580
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2247
2581
|
*/
|
|
2248
2582
|
interface ReadableStream<R = any> {
|
|
2249
|
-
|
|
2583
|
+
/**
|
|
2584
|
+
* The **`locked`** read-only property of the ReadableStream interface returns whether or not the readable stream is locked to a reader.
|
|
2585
|
+
*
|
|
2586
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked)
|
|
2587
|
+
*/
|
|
2250
2588
|
get locked(): boolean;
|
|
2251
|
-
|
|
2589
|
+
/**
|
|
2590
|
+
* The **`cancel()`** method of the ReadableStream interface returns a Promise that resolves when the stream is canceled.
|
|
2591
|
+
*
|
|
2592
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel)
|
|
2593
|
+
*/
|
|
2252
2594
|
cancel(reason?: any): Promise<void>;
|
|
2253
|
-
|
|
2595
|
+
/**
|
|
2596
|
+
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it.
|
|
2597
|
+
*
|
|
2598
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
|
|
2599
|
+
*/
|
|
2254
2600
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
2255
|
-
|
|
2601
|
+
/**
|
|
2602
|
+
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it.
|
|
2603
|
+
*
|
|
2604
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
|
|
2605
|
+
*/
|
|
2256
2606
|
getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader;
|
|
2257
|
-
|
|
2607
|
+
/**
|
|
2608
|
+
* 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.
|
|
2609
|
+
*
|
|
2610
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough)
|
|
2611
|
+
*/
|
|
2258
2612
|
pipeThrough<T>(
|
|
2259
2613
|
transform: ReadableWritablePair<T, R>,
|
|
2260
2614
|
options?: StreamPipeOptions,
|
|
2261
2615
|
): ReadableStream<T>;
|
|
2262
|
-
|
|
2616
|
+
/**
|
|
2617
|
+
* 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.
|
|
2618
|
+
*
|
|
2619
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo)
|
|
2620
|
+
*/
|
|
2263
2621
|
pipeTo(
|
|
2264
2622
|
destination: WritableStream<R>,
|
|
2265
2623
|
options?: StreamPipeOptions,
|
|
2266
2624
|
): Promise<void>;
|
|
2267
|
-
|
|
2625
|
+
/**
|
|
2626
|
+
* The **`tee()`** method of the two-element array containing the two resulting branches as new ReadableStream instances.
|
|
2627
|
+
*
|
|
2628
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee)
|
|
2629
|
+
*/
|
|
2268
2630
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
2269
2631
|
values(options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
|
|
2270
2632
|
[Symbol.asyncIterator](
|
|
@@ -2272,7 +2634,7 @@ interface ReadableStream<R = any> {
|
|
|
2272
2634
|
): AsyncIterableIterator<R>;
|
|
2273
2635
|
}
|
|
2274
2636
|
/**
|
|
2275
|
-
*
|
|
2637
|
+
* The `ReadableStream` interface of the Streams API represents a readable stream of byte data.
|
|
2276
2638
|
*
|
|
2277
2639
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2278
2640
|
*/
|
|
@@ -2287,26 +2649,50 @@ declare const ReadableStream: {
|
|
|
2287
2649
|
strategy?: QueuingStrategy<R>,
|
|
2288
2650
|
): ReadableStream<R>;
|
|
2289
2651
|
};
|
|
2290
|
-
|
|
2652
|
+
/**
|
|
2653
|
+
* 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).
|
|
2654
|
+
*
|
|
2655
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader)
|
|
2656
|
+
*/
|
|
2291
2657
|
declare class ReadableStreamDefaultReader<R = any> {
|
|
2292
2658
|
constructor(stream: ReadableStream);
|
|
2293
2659
|
get closed(): Promise<void>;
|
|
2294
2660
|
cancel(reason?: any): Promise<void>;
|
|
2295
|
-
|
|
2661
|
+
/**
|
|
2662
|
+
* The **`read()`** method of the ReadableStreamDefaultReader interface returns a Promise providing access to the next chunk in the stream's internal queue.
|
|
2663
|
+
*
|
|
2664
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read)
|
|
2665
|
+
*/
|
|
2296
2666
|
read(): Promise<ReadableStreamReadResult<R>>;
|
|
2297
|
-
|
|
2667
|
+
/**
|
|
2668
|
+
* The **`releaseLock()`** method of the ReadableStreamDefaultReader interface releases the reader's lock on the stream.
|
|
2669
|
+
*
|
|
2670
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock)
|
|
2671
|
+
*/
|
|
2298
2672
|
releaseLock(): void;
|
|
2299
2673
|
}
|
|
2300
|
-
|
|
2674
|
+
/**
|
|
2675
|
+
* The `ReadableStreamBYOBReader` interface of the Streams API defines a reader for a ReadableStream that supports zero-copy reading from an underlying byte source.
|
|
2676
|
+
*
|
|
2677
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader)
|
|
2678
|
+
*/
|
|
2301
2679
|
declare class ReadableStreamBYOBReader {
|
|
2302
2680
|
constructor(stream: ReadableStream);
|
|
2303
2681
|
get closed(): Promise<void>;
|
|
2304
2682
|
cancel(reason?: any): Promise<void>;
|
|
2305
|
-
|
|
2683
|
+
/**
|
|
2684
|
+
* 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.
|
|
2685
|
+
*
|
|
2686
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
|
|
2687
|
+
*/
|
|
2306
2688
|
read<T extends ArrayBufferView>(
|
|
2307
2689
|
view: T,
|
|
2308
2690
|
): Promise<ReadableStreamReadResult<T>>;
|
|
2309
|
-
|
|
2691
|
+
/**
|
|
2692
|
+
* The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
|
|
2693
|
+
*
|
|
2694
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock)
|
|
2695
|
+
*/
|
|
2310
2696
|
releaseLock(): void;
|
|
2311
2697
|
readAtLeast<T extends ArrayBufferView>(
|
|
2312
2698
|
minElements: number,
|
|
@@ -2324,60 +2710,148 @@ interface ReadableStreamGetReaderOptions {
|
|
|
2324
2710
|
*/
|
|
2325
2711
|
mode: "byob";
|
|
2326
2712
|
}
|
|
2327
|
-
|
|
2713
|
+
/**
|
|
2714
|
+
* 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).
|
|
2715
|
+
*
|
|
2716
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest)
|
|
2717
|
+
*/
|
|
2328
2718
|
declare abstract class ReadableStreamBYOBRequest {
|
|
2329
|
-
|
|
2719
|
+
/**
|
|
2720
|
+
* The **`view`** getter property of the ReadableStreamBYOBRequest interface returns the current view.
|
|
2721
|
+
*
|
|
2722
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view)
|
|
2723
|
+
*/
|
|
2330
2724
|
get view(): Uint8Array | null;
|
|
2331
|
-
|
|
2725
|
+
/**
|
|
2726
|
+
* 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.
|
|
2727
|
+
*
|
|
2728
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond)
|
|
2729
|
+
*/
|
|
2332
2730
|
respond(bytesWritten: number): void;
|
|
2333
|
-
|
|
2731
|
+
/**
|
|
2732
|
+
* 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.
|
|
2733
|
+
*
|
|
2734
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView)
|
|
2735
|
+
*/
|
|
2334
2736
|
respondWithNewView(view: ArrayBuffer | ArrayBufferView): void;
|
|
2335
2737
|
get atLeast(): number | null;
|
|
2336
2738
|
}
|
|
2337
|
-
|
|
2739
|
+
/**
|
|
2740
|
+
* The **`ReadableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a ReadableStream's state and internal queue.
|
|
2741
|
+
*
|
|
2742
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController)
|
|
2743
|
+
*/
|
|
2338
2744
|
declare abstract class ReadableStreamDefaultController<R = any> {
|
|
2339
|
-
|
|
2745
|
+
/**
|
|
2746
|
+
* The **`desiredSize`** read-only property of the required to fill the stream's internal queue.
|
|
2747
|
+
*
|
|
2748
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize)
|
|
2749
|
+
*/
|
|
2340
2750
|
get desiredSize(): number | null;
|
|
2341
|
-
|
|
2751
|
+
/**
|
|
2752
|
+
* The **`close()`** method of the ReadableStreamDefaultController interface closes the associated stream.
|
|
2753
|
+
*
|
|
2754
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close)
|
|
2755
|
+
*/
|
|
2342
2756
|
close(): void;
|
|
2343
|
-
|
|
2757
|
+
/**
|
|
2758
|
+
* The **`enqueue()`** method of the ```js-nolint enqueue(chunk) ``` - `chunk` - : The chunk to enqueue.
|
|
2759
|
+
*
|
|
2760
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)
|
|
2761
|
+
*/
|
|
2344
2762
|
enqueue(chunk?: R): void;
|
|
2345
|
-
|
|
2763
|
+
/**
|
|
2764
|
+
* The **`error()`** method of the with the associated stream to error.
|
|
2765
|
+
*
|
|
2766
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error)
|
|
2767
|
+
*/
|
|
2346
2768
|
error(reason: any): void;
|
|
2347
2769
|
}
|
|
2348
|
-
|
|
2770
|
+
/**
|
|
2771
|
+
* The **`ReadableByteStreamController`** interface of the Streams API represents a controller for a readable byte stream.
|
|
2772
|
+
*
|
|
2773
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController)
|
|
2774
|
+
*/
|
|
2349
2775
|
declare abstract class ReadableByteStreamController {
|
|
2350
|
-
|
|
2776
|
+
/**
|
|
2777
|
+
* The **`byobRequest`** read-only property of the ReadableByteStreamController interface returns the current BYOB request, or `null` if there are no pending requests.
|
|
2778
|
+
*
|
|
2779
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest)
|
|
2780
|
+
*/
|
|
2351
2781
|
get byobRequest(): ReadableStreamBYOBRequest | null;
|
|
2352
|
-
|
|
2782
|
+
/**
|
|
2783
|
+
* 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'.
|
|
2784
|
+
*
|
|
2785
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize)
|
|
2786
|
+
*/
|
|
2353
2787
|
get desiredSize(): number | null;
|
|
2354
|
-
|
|
2788
|
+
/**
|
|
2789
|
+
* The **`close()`** method of the ReadableByteStreamController interface closes the associated stream.
|
|
2790
|
+
*
|
|
2791
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close)
|
|
2792
|
+
*/
|
|
2355
2793
|
close(): void;
|
|
2356
|
-
|
|
2794
|
+
/**
|
|
2795
|
+
* 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).
|
|
2796
|
+
*
|
|
2797
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue)
|
|
2798
|
+
*/
|
|
2357
2799
|
enqueue(chunk: ArrayBuffer | ArrayBufferView): void;
|
|
2358
|
-
|
|
2800
|
+
/**
|
|
2801
|
+
* The **`error()`** method of the ReadableByteStreamController interface causes any future interactions with the associated stream to error with the specified reason.
|
|
2802
|
+
*
|
|
2803
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error)
|
|
2804
|
+
*/
|
|
2359
2805
|
error(reason: any): void;
|
|
2360
2806
|
}
|
|
2361
2807
|
/**
|
|
2362
|
-
*
|
|
2808
|
+
* The **`WritableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a WritableStream's state.
|
|
2363
2809
|
*
|
|
2364
2810
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
2365
2811
|
*/
|
|
2366
2812
|
declare abstract class WritableStreamDefaultController {
|
|
2367
|
-
|
|
2813
|
+
/**
|
|
2814
|
+
* The read-only **`signal`** property of the WritableStreamDefaultController interface returns the AbortSignal associated with the controller.
|
|
2815
|
+
*
|
|
2816
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal)
|
|
2817
|
+
*/
|
|
2368
2818
|
get signal(): AbortSignal;
|
|
2369
|
-
|
|
2819
|
+
/**
|
|
2820
|
+
* The **`error()`** method of the with the associated stream to error.
|
|
2821
|
+
*
|
|
2822
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error)
|
|
2823
|
+
*/
|
|
2370
2824
|
error(reason?: any): void;
|
|
2371
2825
|
}
|
|
2372
|
-
|
|
2826
|
+
/**
|
|
2827
|
+
* The **`TransformStreamDefaultController`** interface of the Streams API provides methods to manipulate the associated ReadableStream and WritableStream.
|
|
2828
|
+
*
|
|
2829
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController)
|
|
2830
|
+
*/
|
|
2373
2831
|
declare abstract class TransformStreamDefaultController<O = any> {
|
|
2374
|
-
|
|
2832
|
+
/**
|
|
2833
|
+
* The **`desiredSize`** read-only property of the TransformStreamDefaultController interface returns the desired size to fill the queue of the associated ReadableStream.
|
|
2834
|
+
*
|
|
2835
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize)
|
|
2836
|
+
*/
|
|
2375
2837
|
get desiredSize(): number | null;
|
|
2376
|
-
|
|
2838
|
+
/**
|
|
2839
|
+
* The **`enqueue()`** method of the TransformStreamDefaultController interface enqueues the given chunk in the readable side of the stream.
|
|
2840
|
+
*
|
|
2841
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue)
|
|
2842
|
+
*/
|
|
2377
2843
|
enqueue(chunk?: O): void;
|
|
2378
|
-
|
|
2844
|
+
/**
|
|
2845
|
+
* The **`error()`** method of the TransformStreamDefaultController interface errors both sides of the stream.
|
|
2846
|
+
*
|
|
2847
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error)
|
|
2848
|
+
*/
|
|
2379
2849
|
error(reason: any): void;
|
|
2380
|
-
|
|
2850
|
+
/**
|
|
2851
|
+
* The **`terminate()`** method of the TransformStreamDefaultController interface closes the readable side and errors the writable side of the stream.
|
|
2852
|
+
*
|
|
2853
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate)
|
|
2854
|
+
*/
|
|
2381
2855
|
terminate(): void;
|
|
2382
2856
|
}
|
|
2383
2857
|
interface ReadableWritablePair<R = any, W = any> {
|
|
@@ -2390,7 +2864,7 @@ interface ReadableWritablePair<R = any, W = any> {
|
|
|
2390
2864
|
readable: ReadableStream<R>;
|
|
2391
2865
|
}
|
|
2392
2866
|
/**
|
|
2393
|
-
*
|
|
2867
|
+
* The **`WritableStream`** interface of the Streams API provides a standard abstraction for writing streaming data to a destination, known as a sink.
|
|
2394
2868
|
*
|
|
2395
2869
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
|
|
2396
2870
|
*/
|
|
@@ -2399,47 +2873,103 @@ declare class WritableStream<W = any> {
|
|
|
2399
2873
|
underlyingSink?: UnderlyingSink,
|
|
2400
2874
|
queuingStrategy?: QueuingStrategy,
|
|
2401
2875
|
);
|
|
2402
|
-
|
|
2876
|
+
/**
|
|
2877
|
+
* The **`locked`** read-only property of the WritableStream interface returns a boolean indicating whether the `WritableStream` is locked to a writer.
|
|
2878
|
+
*
|
|
2879
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked)
|
|
2880
|
+
*/
|
|
2403
2881
|
get locked(): boolean;
|
|
2404
|
-
|
|
2882
|
+
/**
|
|
2883
|
+
* 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.
|
|
2884
|
+
*
|
|
2885
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort)
|
|
2886
|
+
*/
|
|
2405
2887
|
abort(reason?: any): Promise<void>;
|
|
2406
|
-
|
|
2888
|
+
/**
|
|
2889
|
+
* The **`close()`** method of the WritableStream interface closes the associated stream.
|
|
2890
|
+
*
|
|
2891
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close)
|
|
2892
|
+
*/
|
|
2407
2893
|
close(): Promise<void>;
|
|
2408
|
-
|
|
2894
|
+
/**
|
|
2895
|
+
* The **`getWriter()`** method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance.
|
|
2896
|
+
*
|
|
2897
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter)
|
|
2898
|
+
*/
|
|
2409
2899
|
getWriter(): WritableStreamDefaultWriter<W>;
|
|
2410
2900
|
}
|
|
2411
2901
|
/**
|
|
2412
|
-
*
|
|
2902
|
+
* 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.
|
|
2413
2903
|
*
|
|
2414
2904
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
|
|
2415
2905
|
*/
|
|
2416
2906
|
declare class WritableStreamDefaultWriter<W = any> {
|
|
2417
2907
|
constructor(stream: WritableStream);
|
|
2418
|
-
|
|
2908
|
+
/**
|
|
2909
|
+
* The **`closed`** read-only property of the the stream errors or the writer's lock is released.
|
|
2910
|
+
*
|
|
2911
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed)
|
|
2912
|
+
*/
|
|
2419
2913
|
get closed(): Promise<void>;
|
|
2420
|
-
|
|
2914
|
+
/**
|
|
2915
|
+
* 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.
|
|
2916
|
+
*
|
|
2917
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready)
|
|
2918
|
+
*/
|
|
2421
2919
|
get ready(): Promise<void>;
|
|
2422
|
-
|
|
2920
|
+
/**
|
|
2921
|
+
* The **`desiredSize`** read-only property of the to fill the stream's internal queue.
|
|
2922
|
+
*
|
|
2923
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize)
|
|
2924
|
+
*/
|
|
2423
2925
|
get desiredSize(): number | null;
|
|
2424
|
-
|
|
2926
|
+
/**
|
|
2927
|
+
* 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.
|
|
2928
|
+
*
|
|
2929
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort)
|
|
2930
|
+
*/
|
|
2425
2931
|
abort(reason?: any): Promise<void>;
|
|
2426
|
-
|
|
2932
|
+
/**
|
|
2933
|
+
* The **`close()`** method of the stream.
|
|
2934
|
+
*
|
|
2935
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close)
|
|
2936
|
+
*/
|
|
2427
2937
|
close(): Promise<void>;
|
|
2428
|
-
|
|
2938
|
+
/**
|
|
2939
|
+
* The **`write()`** method of the operation.
|
|
2940
|
+
*
|
|
2941
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write)
|
|
2942
|
+
*/
|
|
2429
2943
|
write(chunk?: W): Promise<void>;
|
|
2430
|
-
|
|
2944
|
+
/**
|
|
2945
|
+
* The **`releaseLock()`** method of the corresponding stream.
|
|
2946
|
+
*
|
|
2947
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock)
|
|
2948
|
+
*/
|
|
2431
2949
|
releaseLock(): void;
|
|
2432
2950
|
}
|
|
2433
|
-
|
|
2951
|
+
/**
|
|
2952
|
+
* The **`TransformStream`** interface of the Streams API represents a concrete implementation of the pipe chain _transform stream_ concept.
|
|
2953
|
+
*
|
|
2954
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream)
|
|
2955
|
+
*/
|
|
2434
2956
|
declare class TransformStream<I = any, O = any> {
|
|
2435
2957
|
constructor(
|
|
2436
2958
|
transformer?: Transformer<I, O>,
|
|
2437
2959
|
writableStrategy?: QueuingStrategy<I>,
|
|
2438
2960
|
readableStrategy?: QueuingStrategy<O>,
|
|
2439
2961
|
);
|
|
2440
|
-
|
|
2962
|
+
/**
|
|
2963
|
+
* The **`readable`** read-only property of the TransformStream interface returns the ReadableStream instance controlled by this `TransformStream`.
|
|
2964
|
+
*
|
|
2965
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable)
|
|
2966
|
+
*/
|
|
2441
2967
|
get readable(): ReadableStream<O>;
|
|
2442
|
-
|
|
2968
|
+
/**
|
|
2969
|
+
* The **`writable`** read-only property of the TransformStream interface returns the WritableStream instance controlled by this `TransformStream`.
|
|
2970
|
+
*
|
|
2971
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable)
|
|
2972
|
+
*/
|
|
2443
2973
|
get writable(): WritableStream<I>;
|
|
2444
2974
|
}
|
|
2445
2975
|
declare class FixedLengthStream extends IdentityTransformStream {
|
|
@@ -2460,26 +2990,42 @@ interface IdentityTransformStreamQueuingStrategy {
|
|
|
2460
2990
|
interface ReadableStreamValuesOptions {
|
|
2461
2991
|
preventCancel?: boolean;
|
|
2462
2992
|
}
|
|
2463
|
-
|
|
2993
|
+
/**
|
|
2994
|
+
* The **`CompressionStream`** interface of the Compression Streams API is an API for compressing a stream of data.
|
|
2995
|
+
*
|
|
2996
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream)
|
|
2997
|
+
*/
|
|
2464
2998
|
declare class CompressionStream extends TransformStream<
|
|
2465
2999
|
ArrayBuffer | ArrayBufferView,
|
|
2466
3000
|
Uint8Array
|
|
2467
3001
|
> {
|
|
2468
3002
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2469
3003
|
}
|
|
2470
|
-
|
|
3004
|
+
/**
|
|
3005
|
+
* The **`DecompressionStream`** interface of the Compression Streams API is an API for decompressing a stream of data.
|
|
3006
|
+
*
|
|
3007
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream)
|
|
3008
|
+
*/
|
|
2471
3009
|
declare class DecompressionStream extends TransformStream<
|
|
2472
3010
|
ArrayBuffer | ArrayBufferView,
|
|
2473
3011
|
Uint8Array
|
|
2474
3012
|
> {
|
|
2475
3013
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2476
3014
|
}
|
|
2477
|
-
|
|
3015
|
+
/**
|
|
3016
|
+
* The **`TextEncoderStream`** interface of the Encoding API converts a stream of strings into bytes in the UTF-8 encoding.
|
|
3017
|
+
*
|
|
3018
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream)
|
|
3019
|
+
*/
|
|
2478
3020
|
declare class TextEncoderStream extends TransformStream<string, Uint8Array> {
|
|
2479
3021
|
constructor();
|
|
2480
3022
|
get encoding(): string;
|
|
2481
3023
|
}
|
|
2482
|
-
|
|
3024
|
+
/**
|
|
3025
|
+
* 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.
|
|
3026
|
+
*
|
|
3027
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream)
|
|
3028
|
+
*/
|
|
2483
3029
|
declare class TextDecoderStream extends TransformStream<
|
|
2484
3030
|
ArrayBuffer | ArrayBufferView,
|
|
2485
3031
|
string
|
|
@@ -2494,7 +3040,7 @@ interface TextDecoderStreamTextDecoderStreamInit {
|
|
|
2494
3040
|
ignoreBOM?: boolean;
|
|
2495
3041
|
}
|
|
2496
3042
|
/**
|
|
2497
|
-
*
|
|
3043
|
+
* The **`ByteLengthQueuingStrategy`** interface of the Streams API provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2498
3044
|
*
|
|
2499
3045
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
|
|
2500
3046
|
*/
|
|
@@ -2502,19 +3048,27 @@ declare class ByteLengthQueuingStrategy
|
|
|
2502
3048
|
implements QueuingStrategy<ArrayBufferView>
|
|
2503
3049
|
{
|
|
2504
3050
|
constructor(init: QueuingStrategyInit);
|
|
2505
|
-
|
|
3051
|
+
/**
|
|
3052
|
+
* The read-only **`ByteLengthQueuingStrategy.highWaterMark`** property returns the total number of bytes that can be contained in the internal queue before backpressure is applied.
|
|
3053
|
+
*
|
|
3054
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark)
|
|
3055
|
+
*/
|
|
2506
3056
|
get highWaterMark(): number;
|
|
2507
3057
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
|
|
2508
3058
|
get size(): (chunk?: any) => number;
|
|
2509
3059
|
}
|
|
2510
3060
|
/**
|
|
2511
|
-
*
|
|
3061
|
+
* The **`CountQueuingStrategy`** interface of the Streams API provides a built-in chunk counting queuing strategy that can be used when constructing streams.
|
|
2512
3062
|
*
|
|
2513
3063
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
|
|
2514
3064
|
*/
|
|
2515
3065
|
declare class CountQueuingStrategy implements QueuingStrategy {
|
|
2516
3066
|
constructor(init: QueuingStrategyInit);
|
|
2517
|
-
|
|
3067
|
+
/**
|
|
3068
|
+
* The read-only **`CountQueuingStrategy.highWaterMark`** property returns the total number of chunks that can be contained in the internal queue before backpressure is applied.
|
|
3069
|
+
*
|
|
3070
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark)
|
|
3071
|
+
*/
|
|
2518
3072
|
get highWaterMark(): number;
|
|
2519
3073
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
|
|
2520
3074
|
get size(): (chunk?: any) => number;
|
|
@@ -2647,113 +3201,233 @@ interface UnsafeTraceMetrics {
|
|
|
2647
3201
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
2648
3202
|
}
|
|
2649
3203
|
/**
|
|
2650
|
-
* The URL
|
|
3204
|
+
* The **`URL`** interface is used to parse, construct, normalize, and encode URL.
|
|
2651
3205
|
*
|
|
2652
3206
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
2653
3207
|
*/
|
|
2654
3208
|
declare class URL {
|
|
2655
3209
|
constructor(url: string | URL, base?: string | URL);
|
|
2656
|
-
|
|
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
|
+
*/
|
|
2657
3215
|
get origin(): string;
|
|
2658
|
-
|
|
3216
|
+
/**
|
|
3217
|
+
* The **`href`** property of the URL interface is a string containing the whole URL.
|
|
3218
|
+
*
|
|
3219
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href)
|
|
3220
|
+
*/
|
|
2659
3221
|
get href(): string;
|
|
2660
|
-
|
|
3222
|
+
/**
|
|
3223
|
+
* The **`href`** property of the URL interface is a string containing the whole URL.
|
|
3224
|
+
*
|
|
3225
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href)
|
|
3226
|
+
*/
|
|
2661
3227
|
set href(value: string);
|
|
2662
|
-
|
|
3228
|
+
/**
|
|
3229
|
+
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final `':'`.
|
|
3230
|
+
*
|
|
3231
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
3232
|
+
*/
|
|
2663
3233
|
get protocol(): string;
|
|
2664
|
-
|
|
3234
|
+
/**
|
|
3235
|
+
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final `':'`.
|
|
3236
|
+
*
|
|
3237
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
3238
|
+
*/
|
|
2665
3239
|
set protocol(value: string);
|
|
2666
|
-
|
|
3240
|
+
/**
|
|
3241
|
+
* The **`username`** property of the URL interface is a string containing the username component of the URL.
|
|
3242
|
+
*
|
|
3243
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
3244
|
+
*/
|
|
2667
3245
|
get username(): string;
|
|
2668
|
-
|
|
3246
|
+
/**
|
|
3247
|
+
* The **`username`** property of the URL interface is a string containing the username component of the URL.
|
|
3248
|
+
*
|
|
3249
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
3250
|
+
*/
|
|
2669
3251
|
set username(value: string);
|
|
2670
|
-
|
|
3252
|
+
/**
|
|
3253
|
+
* The **`password`** property of the URL interface is a string containing the password component of the URL.
|
|
3254
|
+
*
|
|
3255
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
3256
|
+
*/
|
|
2671
3257
|
get password(): string;
|
|
2672
|
-
|
|
3258
|
+
/**
|
|
3259
|
+
* The **`password`** property of the URL interface is a string containing the password component of the URL.
|
|
3260
|
+
*
|
|
3261
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
3262
|
+
*/
|
|
2673
3263
|
set password(value: string);
|
|
2674
|
-
|
|
3264
|
+
/**
|
|
3265
|
+
* 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.
|
|
3266
|
+
*
|
|
3267
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
3268
|
+
*/
|
|
2675
3269
|
get host(): string;
|
|
2676
|
-
|
|
3270
|
+
/**
|
|
3271
|
+
* 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.
|
|
3272
|
+
*
|
|
3273
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
3274
|
+
*/
|
|
2677
3275
|
set host(value: string);
|
|
2678
|
-
|
|
3276
|
+
/**
|
|
3277
|
+
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL.
|
|
3278
|
+
*
|
|
3279
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
3280
|
+
*/
|
|
2679
3281
|
get hostname(): string;
|
|
2680
|
-
|
|
3282
|
+
/**
|
|
3283
|
+
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL.
|
|
3284
|
+
*
|
|
3285
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
3286
|
+
*/
|
|
2681
3287
|
set hostname(value: string);
|
|
2682
|
-
|
|
3288
|
+
/**
|
|
3289
|
+
* The **`port`** property of the URL interface is a string containing the port number of the URL.
|
|
3290
|
+
*
|
|
3291
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
3292
|
+
*/
|
|
2683
3293
|
get port(): string;
|
|
2684
|
-
|
|
3294
|
+
/**
|
|
3295
|
+
* The **`port`** property of the URL interface is a string containing the port number of the URL.
|
|
3296
|
+
*
|
|
3297
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
3298
|
+
*/
|
|
2685
3299
|
set port(value: string);
|
|
2686
|
-
|
|
3300
|
+
/**
|
|
3301
|
+
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure.
|
|
3302
|
+
*
|
|
3303
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
3304
|
+
*/
|
|
2687
3305
|
get pathname(): string;
|
|
2688
|
-
|
|
3306
|
+
/**
|
|
3307
|
+
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure.
|
|
3308
|
+
*
|
|
3309
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
3310
|
+
*/
|
|
2689
3311
|
set pathname(value: string);
|
|
2690
|
-
|
|
3312
|
+
/**
|
|
3313
|
+
* 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.
|
|
3314
|
+
*
|
|
3315
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
3316
|
+
*/
|
|
2691
3317
|
get search(): string;
|
|
2692
|
-
|
|
3318
|
+
/**
|
|
3319
|
+
* 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.
|
|
3320
|
+
*
|
|
3321
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
3322
|
+
*/
|
|
2693
3323
|
set search(value: string);
|
|
2694
|
-
|
|
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
|
+
*/
|
|
2695
3329
|
get hash(): string;
|
|
2696
|
-
|
|
3330
|
+
/**
|
|
3331
|
+
* The **`hash`** property of the URL interface is a string containing a `'#'` followed by the fragment identifier of the URL.
|
|
3332
|
+
*
|
|
3333
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
3334
|
+
*/
|
|
2697
3335
|
set hash(value: string);
|
|
2698
|
-
|
|
3336
|
+
/**
|
|
3337
|
+
* The **`searchParams`** read-only property of the access to the [MISSING: httpmethod('GET')] decoded query arguments contained in the URL.
|
|
3338
|
+
*
|
|
3339
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams)
|
|
3340
|
+
*/
|
|
2699
3341
|
get searchParams(): URLSearchParams;
|
|
2700
|
-
|
|
3342
|
+
/**
|
|
3343
|
+
* 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.
|
|
3344
|
+
*
|
|
3345
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON)
|
|
3346
|
+
*/
|
|
2701
3347
|
toJSON(): string;
|
|
2702
3348
|
/*function toString() { [native code] }*/
|
|
2703
3349
|
toString(): string;
|
|
2704
|
-
|
|
3350
|
+
/**
|
|
3351
|
+
* The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid.
|
|
3352
|
+
*
|
|
3353
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static)
|
|
3354
|
+
*/
|
|
2705
3355
|
static canParse(url: string, base?: string): boolean;
|
|
2706
|
-
|
|
3356
|
+
/**
|
|
3357
|
+
* The **`URL.parse()`** static method of the URL interface returns a newly created URL object representing the URL defined by the parameters.
|
|
3358
|
+
*
|
|
3359
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static)
|
|
3360
|
+
*/
|
|
2707
3361
|
static parse(url: string, base?: string): URL | null;
|
|
2708
|
-
|
|
3362
|
+
/**
|
|
3363
|
+
* The **`createObjectURL()`** static method of the URL interface creates a string containing a URL representing the object given in the parameter.
|
|
3364
|
+
*
|
|
3365
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static)
|
|
3366
|
+
*/
|
|
2709
3367
|
static createObjectURL(object: File | Blob): string;
|
|
2710
|
-
|
|
3368
|
+
/**
|
|
3369
|
+
* The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling Call this method when you've finished using an object URL to let the browser know not to keep the reference to the file any longer.
|
|
3370
|
+
*
|
|
3371
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static)
|
|
3372
|
+
*/
|
|
2711
3373
|
static revokeObjectURL(object_url: string): void;
|
|
2712
3374
|
}
|
|
2713
|
-
|
|
3375
|
+
/**
|
|
3376
|
+
* The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL.
|
|
3377
|
+
*
|
|
3378
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams)
|
|
3379
|
+
*/
|
|
2714
3380
|
declare class URLSearchParams {
|
|
2715
3381
|
constructor(
|
|
2716
3382
|
init?: Iterable<Iterable<string>> | Record<string, string> | string,
|
|
2717
3383
|
);
|
|
2718
|
-
|
|
3384
|
+
/**
|
|
3385
|
+
* The **`size`** read-only property of the URLSearchParams interface indicates the total number of search parameter entries.
|
|
3386
|
+
*
|
|
3387
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size)
|
|
3388
|
+
*/
|
|
2719
3389
|
get size(): number;
|
|
2720
3390
|
/**
|
|
2721
|
-
*
|
|
3391
|
+
* The **`append()`** method of the URLSearchParams interface appends a specified key/value pair as a new search parameter.
|
|
2722
3392
|
*
|
|
2723
3393
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
|
|
2724
3394
|
*/
|
|
2725
3395
|
append(name: string, value: string): void;
|
|
2726
3396
|
/**
|
|
2727
|
-
*
|
|
3397
|
+
* The **`delete()`** method of the URLSearchParams interface deletes specified parameters and their associated value(s) from the list of all search parameters.
|
|
2728
3398
|
*
|
|
2729
3399
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
2730
3400
|
*/
|
|
2731
3401
|
delete(name: string, value?: string): void;
|
|
2732
3402
|
/**
|
|
2733
|
-
*
|
|
3403
|
+
* The **`get()`** method of the URLSearchParams interface returns the first value associated to the given search parameter.
|
|
2734
3404
|
*
|
|
2735
3405
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
|
|
2736
3406
|
*/
|
|
2737
3407
|
get(name: string): string | null;
|
|
2738
3408
|
/**
|
|
2739
|
-
*
|
|
3409
|
+
* The **`getAll()`** method of the URLSearchParams interface returns all the values associated with a given search parameter as an array.
|
|
2740
3410
|
*
|
|
2741
3411
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
|
|
2742
3412
|
*/
|
|
2743
3413
|
getAll(name: string): string[];
|
|
2744
3414
|
/**
|
|
2745
|
-
*
|
|
3415
|
+
* The **`has()`** method of the URLSearchParams interface returns a boolean value that indicates whether the specified parameter is in the search parameters.
|
|
2746
3416
|
*
|
|
2747
3417
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
|
|
2748
3418
|
*/
|
|
2749
3419
|
has(name: string, value?: string): boolean;
|
|
2750
3420
|
/**
|
|
2751
|
-
*
|
|
3421
|
+
* The **`set()`** method of the URLSearchParams interface sets the value associated with a given search parameter to the given value.
|
|
2752
3422
|
*
|
|
2753
3423
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
2754
3424
|
*/
|
|
2755
3425
|
set(name: string, value: string): void;
|
|
2756
|
-
|
|
3426
|
+
/**
|
|
3427
|
+
* The **`URLSearchParams.sort()`** method sorts all key/value pairs contained in this object in place and returns `undefined`.
|
|
3428
|
+
*
|
|
3429
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort)
|
|
3430
|
+
*/
|
|
2757
3431
|
sort(): void;
|
|
2758
3432
|
/* Returns an array of key, value pairs for every entry in the search params. */
|
|
2759
3433
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
@@ -2770,7 +3444,7 @@ declare class URLSearchParams {
|
|
|
2770
3444
|
) => void,
|
|
2771
3445
|
thisArg?: This,
|
|
2772
3446
|
): void;
|
|
2773
|
-
/*function toString() { [native code] }
|
|
3447
|
+
/*function toString() { [native code] }*/
|
|
2774
3448
|
toString(): string;
|
|
2775
3449
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
2776
3450
|
}
|
|
@@ -2824,26 +3498,26 @@ interface URLPatternOptions {
|
|
|
2824
3498
|
ignoreCase?: boolean;
|
|
2825
3499
|
}
|
|
2826
3500
|
/**
|
|
2827
|
-
* A CloseEvent is sent to clients using WebSockets when the connection is closed.
|
|
3501
|
+
* A `CloseEvent` is sent to clients using WebSockets when the connection is closed.
|
|
2828
3502
|
*
|
|
2829
3503
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
|
|
2830
3504
|
*/
|
|
2831
3505
|
declare class CloseEvent extends Event {
|
|
2832
3506
|
constructor(type: string, initializer?: CloseEventInit);
|
|
2833
3507
|
/**
|
|
2834
|
-
*
|
|
3508
|
+
* The **`code`** read-only property of the CloseEvent interface returns a WebSocket connection close code indicating the reason the connection was closed.
|
|
2835
3509
|
*
|
|
2836
3510
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/code)
|
|
2837
3511
|
*/
|
|
2838
3512
|
readonly code: number;
|
|
2839
3513
|
/**
|
|
2840
|
-
*
|
|
3514
|
+
* 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.
|
|
2841
3515
|
*
|
|
2842
3516
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/reason)
|
|
2843
3517
|
*/
|
|
2844
3518
|
readonly reason: string;
|
|
2845
3519
|
/**
|
|
2846
|
-
*
|
|
3520
|
+
* The **`wasClean`** read-only property of the CloseEvent interface returns `true` if the connection closed cleanly.
|
|
2847
3521
|
*
|
|
2848
3522
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/wasClean)
|
|
2849
3523
|
*/
|
|
@@ -2861,7 +3535,7 @@ type WebSocketEventMap = {
|
|
|
2861
3535
|
error: ErrorEvent;
|
|
2862
3536
|
};
|
|
2863
3537
|
/**
|
|
2864
|
-
*
|
|
3538
|
+
* 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.
|
|
2865
3539
|
*
|
|
2866
3540
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2867
3541
|
*/
|
|
@@ -2878,20 +3552,20 @@ declare var WebSocket: {
|
|
|
2878
3552
|
readonly CLOSED: number;
|
|
2879
3553
|
};
|
|
2880
3554
|
/**
|
|
2881
|
-
*
|
|
3555
|
+
* 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.
|
|
2882
3556
|
*
|
|
2883
3557
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2884
3558
|
*/
|
|
2885
3559
|
interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
2886
3560
|
accept(): void;
|
|
2887
3561
|
/**
|
|
2888
|
-
*
|
|
3562
|
+
* 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.
|
|
2889
3563
|
*
|
|
2890
3564
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/send)
|
|
2891
3565
|
*/
|
|
2892
3566
|
send(message: (ArrayBuffer | ArrayBufferView) | string): void;
|
|
2893
3567
|
/**
|
|
2894
|
-
*
|
|
3568
|
+
* The **`WebSocket.close()`** method closes the already `CLOSED`, this method does nothing.
|
|
2895
3569
|
*
|
|
2896
3570
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/close)
|
|
2897
3571
|
*/
|
|
@@ -2899,25 +3573,25 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
2899
3573
|
serializeAttachment(attachment: any): void;
|
|
2900
3574
|
deserializeAttachment(): any | null;
|
|
2901
3575
|
/**
|
|
2902
|
-
*
|
|
3576
|
+
* The **`WebSocket.readyState`** read-only property returns the current state of the WebSocket connection.
|
|
2903
3577
|
*
|
|
2904
3578
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/readyState)
|
|
2905
3579
|
*/
|
|
2906
3580
|
readyState: number;
|
|
2907
3581
|
/**
|
|
2908
|
-
*
|
|
3582
|
+
* The **`WebSocket.url`** read-only property returns the absolute URL of the WebSocket as resolved by the constructor.
|
|
2909
3583
|
*
|
|
2910
3584
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/url)
|
|
2911
3585
|
*/
|
|
2912
3586
|
url: string | null;
|
|
2913
3587
|
/**
|
|
2914
|
-
*
|
|
3588
|
+
* 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.
|
|
2915
3589
|
*
|
|
2916
3590
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/protocol)
|
|
2917
3591
|
*/
|
|
2918
3592
|
protocol: string | null;
|
|
2919
3593
|
/**
|
|
2920
|
-
*
|
|
3594
|
+
* The **`WebSocket.extensions`** read-only property returns the extensions selected by the server.
|
|
2921
3595
|
*
|
|
2922
3596
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
2923
3597
|
*/
|
|
@@ -2986,29 +3660,33 @@ interface SocketInfo {
|
|
|
2986
3660
|
remoteAddress?: string;
|
|
2987
3661
|
localAddress?: string;
|
|
2988
3662
|
}
|
|
2989
|
-
|
|
3663
|
+
/**
|
|
3664
|
+
* The **`EventSource`** interface is web content's interface to server-sent events.
|
|
3665
|
+
*
|
|
3666
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource)
|
|
3667
|
+
*/
|
|
2990
3668
|
declare class EventSource extends EventTarget {
|
|
2991
3669
|
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
2992
3670
|
/**
|
|
2993
|
-
*
|
|
3671
|
+
* The **`close()`** method of the EventSource interface closes the connection, if one is made, and sets the ```js-nolint close() ``` None.
|
|
2994
3672
|
*
|
|
2995
3673
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close)
|
|
2996
3674
|
*/
|
|
2997
3675
|
close(): void;
|
|
2998
3676
|
/**
|
|
2999
|
-
*
|
|
3677
|
+
* The **`url`** read-only property of the URL of the source.
|
|
3000
3678
|
*
|
|
3001
3679
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url)
|
|
3002
3680
|
*/
|
|
3003
3681
|
get url(): string;
|
|
3004
3682
|
/**
|
|
3005
|
-
*
|
|
3683
|
+
* The **`withCredentials`** read-only property of the the `EventSource` object was instantiated with CORS credentials set.
|
|
3006
3684
|
*
|
|
3007
3685
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials)
|
|
3008
3686
|
*/
|
|
3009
3687
|
get withCredentials(): boolean;
|
|
3010
3688
|
/**
|
|
3011
|
-
*
|
|
3689
|
+
* The **`readyState`** read-only property of the connection.
|
|
3012
3690
|
*
|
|
3013
3691
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
3014
3692
|
*/
|
|
@@ -3041,22 +3719,22 @@ interface Container {
|
|
|
3041
3719
|
destroy(error?: any): Promise<void>;
|
|
3042
3720
|
signal(signo: number): void;
|
|
3043
3721
|
getTcpPort(port: number): Fetcher;
|
|
3722
|
+
setInactivityTimeout(durationMs: number | bigint): Promise<void>;
|
|
3044
3723
|
}
|
|
3045
3724
|
interface ContainerStartupOptions {
|
|
3046
3725
|
entrypoint?: string[];
|
|
3047
3726
|
enableInternet: boolean;
|
|
3048
3727
|
env?: Record<string, string>;
|
|
3728
|
+
hardTimeout?: number | bigint;
|
|
3049
3729
|
}
|
|
3050
3730
|
/**
|
|
3051
|
-
*
|
|
3731
|
+
* 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.
|
|
3052
3732
|
*
|
|
3053
3733
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort)
|
|
3054
3734
|
*/
|
|
3055
3735
|
interface MessagePort extends EventTarget {
|
|
3056
3736
|
/**
|
|
3057
|
-
*
|
|
3058
|
-
*
|
|
3059
|
-
* Throws a "DataCloneError" DOMException if transfer contains duplicate objects or port, or if message could not be cloned.
|
|
3737
|
+
* The **`postMessage()`** method of the transfers ownership of objects to other browsing contexts.
|
|
3060
3738
|
*
|
|
3061
3739
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/postMessage)
|
|
3062
3740
|
*/
|
|
@@ -3065,13 +3743,13 @@ interface MessagePort extends EventTarget {
|
|
|
3065
3743
|
options?: any[] | MessagePortPostMessageOptions,
|
|
3066
3744
|
): void;
|
|
3067
3745
|
/**
|
|
3068
|
-
*
|
|
3746
|
+
* The **`close()`** method of the MessagePort interface disconnects the port, so it is no longer active.
|
|
3069
3747
|
*
|
|
3070
3748
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/close)
|
|
3071
3749
|
*/
|
|
3072
3750
|
close(): void;
|
|
3073
3751
|
/**
|
|
3074
|
-
*
|
|
3752
|
+
* The **`start()`** method of the MessagePort interface starts the sending of messages queued on the port.
|
|
3075
3753
|
*
|
|
3076
3754
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/start)
|
|
3077
3755
|
*/
|
|
@@ -3142,6 +3820,7 @@ interface WorkerLoaderModule {
|
|
|
3142
3820
|
data?: ArrayBuffer;
|
|
3143
3821
|
json?: any;
|
|
3144
3822
|
py?: string;
|
|
3823
|
+
wasm?: ArrayBuffer;
|
|
3145
3824
|
}
|
|
3146
3825
|
interface WorkerLoaderWorkerCode {
|
|
3147
3826
|
compatibilityDate: string;
|
|
@@ -6926,6 +7605,10 @@ type AutoRagSearchRequest = {
|
|
|
6926
7605
|
ranker?: string;
|
|
6927
7606
|
score_threshold?: number;
|
|
6928
7607
|
};
|
|
7608
|
+
reranking?: {
|
|
7609
|
+
enabled?: boolean;
|
|
7610
|
+
model?: string;
|
|
7611
|
+
};
|
|
6929
7612
|
rewrite_query?: boolean;
|
|
6930
7613
|
};
|
|
6931
7614
|
type AutoRagAiSearchRequest = AutoRagSearchRequest & {
|
|
@@ -8870,6 +9553,11 @@ declare namespace CloudflareWorkersModule {
|
|
|
8870
9553
|
constructor(ctx: ExecutionContext, env: Env);
|
|
8871
9554
|
fetch?(request: Request): Response | Promise<Response>;
|
|
8872
9555
|
tail?(events: TraceItem[]): void | Promise<void>;
|
|
9556
|
+
tailStream?(
|
|
9557
|
+
event: TailStream.TailEvent<TailStream.Onset>,
|
|
9558
|
+
):
|
|
9559
|
+
| TailStream.TailEventHandlerType
|
|
9560
|
+
| Promise<TailStream.TailEventHandlerType>;
|
|
8873
9561
|
trace?(traces: TraceItem[]): void | Promise<void>;
|
|
8874
9562
|
scheduled?(controller: ScheduledController): void | Promise<void>;
|
|
8875
9563
|
queue?(batch: MessageBatch<unknown>): void | Promise<void>;
|
|
@@ -9258,7 +9946,14 @@ interface VectorizeError {
|
|
|
9258
9946
|
*
|
|
9259
9947
|
* This list is expected to grow as support for more operations are released.
|
|
9260
9948
|
*/
|
|
9261
|
-
type VectorizeVectorMetadataFilterOp =
|
|
9949
|
+
type VectorizeVectorMetadataFilterOp =
|
|
9950
|
+
| "$eq"
|
|
9951
|
+
| "$ne"
|
|
9952
|
+
| "$lt"
|
|
9953
|
+
| "$lte"
|
|
9954
|
+
| "$gt"
|
|
9955
|
+
| "$gte";
|
|
9956
|
+
type VectorizeVectorMetadataFilterCollectionOp = "$in" | "$nin";
|
|
9262
9957
|
/**
|
|
9263
9958
|
* Filter criteria for vector metadata used to limit the retrieved query result set.
|
|
9264
9959
|
*/
|
|
@@ -9271,6 +9966,12 @@ type VectorizeVectorMetadataFilter = {
|
|
|
9271
9966
|
VectorizeVectorMetadataValue,
|
|
9272
9967
|
string[]
|
|
9273
9968
|
> | null;
|
|
9969
|
+
}
|
|
9970
|
+
| {
|
|
9971
|
+
[Op in VectorizeVectorMetadataFilterCollectionOp]?: Exclude<
|
|
9972
|
+
VectorizeVectorMetadataValue,
|
|
9973
|
+
string[]
|
|
9974
|
+
>[];
|
|
9274
9975
|
};
|
|
9275
9976
|
};
|
|
9276
9977
|
/**
|