@cloudflare/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/2021-11-03/index.d.ts +926 -286
- package/2021-11-03/index.ts +926 -286
- package/2022-01-31/index.d.ts +977 -296
- package/2022-01-31/index.ts +977 -296
- package/2022-03-21/index.d.ts +977 -296
- package/2022-03-21/index.ts +977 -296
- package/2022-08-04/index.d.ts +977 -296
- package/2022-08-04/index.ts +977 -296
- package/2022-10-31/index.d.ts +997 -300
- package/2022-10-31/index.ts +997 -300
- package/2022-11-30/index.d.ts +997 -300
- package/2022-11-30/index.ts +997 -300
- package/2023-03-01/index.d.ts +1002 -301
- package/2023-03-01/index.ts +1002 -301
- package/2023-07-01/index.d.ts +1002 -301
- package/2023-07-01/index.ts +1002 -301
- package/experimental/index.d.ts +1291 -366
- package/experimental/index.ts +1291 -366
- package/index.d.ts +926 -286
- package/index.ts +926 -286
- package/latest/index.d.ts +1008 -305
- package/latest/index.ts +1008 -305
- package/oldest/index.d.ts +926 -286
- package/oldest/index.ts +926 -286
- package/package.json +1 -1
package/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)
|
|
@@ -301,7 +386,7 @@ declare function removeEventListener<
|
|
|
301
386
|
options?: EventTargetEventListenerOptions | boolean,
|
|
302
387
|
): void;
|
|
303
388
|
/**
|
|
304
|
-
*
|
|
389
|
+
* The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
|
|
305
390
|
*
|
|
306
391
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
|
|
307
392
|
*/
|
|
@@ -436,13 +521,6 @@ interface ExportedHandler<
|
|
|
436
521
|
interface StructuredSerializeOptions {
|
|
437
522
|
transfer?: any[];
|
|
438
523
|
}
|
|
439
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent) */
|
|
440
|
-
declare abstract class PromiseRejectionEvent extends Event {
|
|
441
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) */
|
|
442
|
-
readonly promise: Promise<any>;
|
|
443
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
|
|
444
|
-
readonly reason: any;
|
|
445
|
-
}
|
|
446
524
|
interface AlarmInvocationInfo {
|
|
447
525
|
readonly isRetry: boolean;
|
|
448
526
|
readonly retryCount: number;
|
|
@@ -648,110 +726,113 @@ interface AnalyticsEngineDataPoint {
|
|
|
648
726
|
blobs?: ((ArrayBuffer | string) | null)[];
|
|
649
727
|
}
|
|
650
728
|
/**
|
|
651
|
-
*
|
|
729
|
+
* The **`Event`** interface represents an event which takes place on an `EventTarget`.
|
|
652
730
|
*
|
|
653
731
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event)
|
|
654
732
|
*/
|
|
655
733
|
declare class Event {
|
|
656
734
|
constructor(type: string, init?: EventInit);
|
|
657
735
|
/**
|
|
658
|
-
*
|
|
736
|
+
* The **`type`** read-only property of the Event interface returns a string containing the event's type.
|
|
659
737
|
*
|
|
660
738
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)
|
|
661
739
|
*/
|
|
662
740
|
readonly type: string;
|
|
663
741
|
/**
|
|
664
|
-
*
|
|
742
|
+
* The **`eventPhase`** read-only property of the being evaluated.
|
|
665
743
|
*
|
|
666
744
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)
|
|
667
745
|
*/
|
|
668
746
|
readonly eventPhase: number;
|
|
669
747
|
/**
|
|
670
|
-
*
|
|
748
|
+
* The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.
|
|
671
749
|
*
|
|
672
750
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)
|
|
673
751
|
*/
|
|
674
752
|
readonly composed: boolean;
|
|
675
753
|
/**
|
|
676
|
-
*
|
|
754
|
+
* The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.
|
|
677
755
|
*
|
|
678
756
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)
|
|
679
757
|
*/
|
|
680
758
|
readonly bubbles: boolean;
|
|
681
759
|
/**
|
|
682
|
-
*
|
|
760
|
+
* 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.
|
|
683
761
|
*
|
|
684
762
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)
|
|
685
763
|
*/
|
|
686
764
|
readonly cancelable: boolean;
|
|
687
765
|
/**
|
|
688
|
-
*
|
|
766
|
+
* 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.
|
|
689
767
|
*
|
|
690
768
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)
|
|
691
769
|
*/
|
|
692
770
|
readonly defaultPrevented: boolean;
|
|
693
771
|
/**
|
|
772
|
+
* The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.
|
|
694
773
|
* @deprecated
|
|
695
774
|
*
|
|
696
775
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)
|
|
697
776
|
*/
|
|
698
777
|
readonly returnValue: boolean;
|
|
699
778
|
/**
|
|
700
|
-
*
|
|
779
|
+
* The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.
|
|
701
780
|
*
|
|
702
781
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)
|
|
703
782
|
*/
|
|
704
783
|
readonly currentTarget?: EventTarget;
|
|
705
784
|
/**
|
|
706
|
-
*
|
|
785
|
+
* The read-only **`target`** property of the dispatched.
|
|
707
786
|
*
|
|
708
787
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)
|
|
709
788
|
*/
|
|
710
789
|
readonly target?: EventTarget;
|
|
711
790
|
/**
|
|
791
|
+
* The deprecated **`Event.srcElement`** is an alias for the Event.target property.
|
|
712
792
|
* @deprecated
|
|
713
793
|
*
|
|
714
794
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)
|
|
715
795
|
*/
|
|
716
796
|
readonly srcElement: EventTarget | null;
|
|
717
797
|
/**
|
|
718
|
-
*
|
|
798
|
+
* The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.
|
|
719
799
|
*
|
|
720
800
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)
|
|
721
801
|
*/
|
|
722
802
|
readonly timeStamp: number;
|
|
723
803
|
/**
|
|
724
|
-
*
|
|
804
|
+
* 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.
|
|
725
805
|
*
|
|
726
806
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)
|
|
727
807
|
*/
|
|
728
808
|
readonly isTrusted: boolean;
|
|
729
809
|
/**
|
|
810
|
+
* The **`cancelBubble`** property of the Event interface is deprecated.
|
|
730
811
|
* @deprecated
|
|
731
812
|
*
|
|
732
813
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)
|
|
733
814
|
*/
|
|
734
815
|
cancelBubble: boolean;
|
|
735
816
|
/**
|
|
736
|
-
*
|
|
817
|
+
* 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.
|
|
737
818
|
*
|
|
738
819
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)
|
|
739
820
|
*/
|
|
740
821
|
stopImmediatePropagation(): void;
|
|
741
822
|
/**
|
|
742
|
-
*
|
|
823
|
+
* 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.
|
|
743
824
|
*
|
|
744
825
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)
|
|
745
826
|
*/
|
|
746
827
|
preventDefault(): void;
|
|
747
828
|
/**
|
|
748
|
-
*
|
|
829
|
+
* The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.
|
|
749
830
|
*
|
|
750
831
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)
|
|
751
832
|
*/
|
|
752
833
|
stopPropagation(): void;
|
|
753
834
|
/**
|
|
754
|
-
*
|
|
835
|
+
* 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.
|
|
755
836
|
*
|
|
756
837
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)
|
|
757
838
|
*/
|
|
@@ -776,7 +857,7 @@ type EventListenerOrEventListenerObject<EventType extends Event = Event> =
|
|
|
776
857
|
| EventListener<EventType>
|
|
777
858
|
| EventListenerObject<EventType>;
|
|
778
859
|
/**
|
|
779
|
-
* EventTarget is
|
|
860
|
+
* The **`EventTarget`** interface is implemented by objects that can receive events and may have listeners for them.
|
|
780
861
|
*
|
|
781
862
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
|
|
782
863
|
*/
|
|
@@ -785,19 +866,7 @@ declare class EventTarget<
|
|
|
785
866
|
> {
|
|
786
867
|
constructor();
|
|
787
868
|
/**
|
|
788
|
-
*
|
|
789
|
-
*
|
|
790
|
-
* 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.
|
|
791
|
-
*
|
|
792
|
-
* 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.
|
|
793
|
-
*
|
|
794
|
-
* 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.
|
|
795
|
-
*
|
|
796
|
-
* When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
|
|
797
|
-
*
|
|
798
|
-
* If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
|
|
799
|
-
*
|
|
800
|
-
* The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
|
|
869
|
+
* The **`addEventListener()`** method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
|
|
801
870
|
*
|
|
802
871
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
|
|
803
872
|
*/
|
|
@@ -807,7 +876,7 @@ declare class EventTarget<
|
|
|
807
876
|
options?: EventTargetAddEventListenerOptions | boolean,
|
|
808
877
|
): void;
|
|
809
878
|
/**
|
|
810
|
-
*
|
|
879
|
+
* The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.
|
|
811
880
|
*
|
|
812
881
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
|
|
813
882
|
*/
|
|
@@ -817,7 +886,7 @@ declare class EventTarget<
|
|
|
817
886
|
options?: EventTargetEventListenerOptions | boolean,
|
|
818
887
|
): void;
|
|
819
888
|
/**
|
|
820
|
-
*
|
|
889
|
+
* The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
|
|
821
890
|
*
|
|
822
891
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
|
|
823
892
|
*/
|
|
@@ -836,50 +905,70 @@ interface EventTargetHandlerObject {
|
|
|
836
905
|
handleEvent: (event: Event) => any | undefined;
|
|
837
906
|
}
|
|
838
907
|
/**
|
|
839
|
-
*
|
|
908
|
+
* The **`AbortController`** interface represents a controller object that allows you to abort one or more Web requests as and when desired.
|
|
840
909
|
*
|
|
841
910
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController)
|
|
842
911
|
*/
|
|
843
912
|
declare class AbortController {
|
|
844
913
|
constructor();
|
|
845
914
|
/**
|
|
846
|
-
*
|
|
915
|
+
* 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.
|
|
847
916
|
*
|
|
848
917
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/signal)
|
|
849
918
|
*/
|
|
850
919
|
readonly signal: AbortSignal;
|
|
851
920
|
/**
|
|
852
|
-
*
|
|
921
|
+
* The **`abort()`** method of the AbortController interface aborts an asynchronous operation before it has completed.
|
|
853
922
|
*
|
|
854
923
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/abort)
|
|
855
924
|
*/
|
|
856
925
|
abort(reason?: any): void;
|
|
857
926
|
}
|
|
858
927
|
/**
|
|
859
|
-
*
|
|
928
|
+
* 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.
|
|
860
929
|
*
|
|
861
930
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal)
|
|
862
931
|
*/
|
|
863
932
|
declare abstract class AbortSignal extends EventTarget {
|
|
864
|
-
|
|
933
|
+
/**
|
|
934
|
+
* The **`AbortSignal.abort()`** static method returns an AbortSignal that is already set as aborted (and which does not trigger an AbortSignal/abort_event event).
|
|
935
|
+
*
|
|
936
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static)
|
|
937
|
+
*/
|
|
865
938
|
static abort(reason?: any): AbortSignal;
|
|
866
|
-
|
|
939
|
+
/**
|
|
940
|
+
* The **`AbortSignal.timeout()`** static method returns an AbortSignal that will automatically abort after a specified time.
|
|
941
|
+
*
|
|
942
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static)
|
|
943
|
+
*/
|
|
867
944
|
static timeout(delay: number): AbortSignal;
|
|
868
|
-
|
|
945
|
+
/**
|
|
946
|
+
* The **`AbortSignal.any()`** static method takes an iterable of abort signals and returns an AbortSignal.
|
|
947
|
+
*
|
|
948
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static)
|
|
949
|
+
*/
|
|
869
950
|
static any(signals: AbortSignal[]): AbortSignal;
|
|
870
951
|
/**
|
|
871
|
-
*
|
|
952
|
+
* 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`).
|
|
872
953
|
*
|
|
873
954
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
|
|
874
955
|
*/
|
|
875
956
|
readonly aborted: boolean;
|
|
876
|
-
|
|
957
|
+
/**
|
|
958
|
+
* The **`reason`** read-only property returns a JavaScript value that indicates the abort reason.
|
|
959
|
+
*
|
|
960
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason)
|
|
961
|
+
*/
|
|
877
962
|
readonly reason: any;
|
|
878
963
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
879
964
|
get onabort(): any | null;
|
|
880
965
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
881
966
|
set onabort(value: any | null);
|
|
882
|
-
|
|
967
|
+
/**
|
|
968
|
+
* The **`throwIfAborted()`** method throws the signal's abort AbortSignal.reason if the signal has been aborted; otherwise it does nothing.
|
|
969
|
+
*
|
|
970
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted)
|
|
971
|
+
*/
|
|
883
972
|
throwIfAborted(): void;
|
|
884
973
|
}
|
|
885
974
|
interface Scheduler {
|
|
@@ -889,19 +978,27 @@ interface SchedulerWaitOptions {
|
|
|
889
978
|
signal?: AbortSignal;
|
|
890
979
|
}
|
|
891
980
|
/**
|
|
892
|
-
*
|
|
981
|
+
* The **`ExtendableEvent`** interface extends the lifetime of the `install` and `activate` events dispatched on the global scope as part of the service worker lifecycle.
|
|
893
982
|
*
|
|
894
983
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent)
|
|
895
984
|
*/
|
|
896
985
|
declare abstract class ExtendableEvent extends Event {
|
|
897
|
-
|
|
986
|
+
/**
|
|
987
|
+
* The **`ExtendableEvent.waitUntil()`** method tells the event dispatcher that work is ongoing.
|
|
988
|
+
*
|
|
989
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil)
|
|
990
|
+
*/
|
|
898
991
|
waitUntil(promise: Promise<any>): void;
|
|
899
992
|
}
|
|
900
|
-
|
|
993
|
+
/**
|
|
994
|
+
* The **`CustomEvent`** interface represents events initialized by an application for any purpose.
|
|
995
|
+
*
|
|
996
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent)
|
|
997
|
+
*/
|
|
901
998
|
declare class CustomEvent<T = any> extends Event {
|
|
902
999
|
constructor(type: string, init?: CustomEventCustomEventInit);
|
|
903
1000
|
/**
|
|
904
|
-
*
|
|
1001
|
+
* The read-only **`detail`** property of the CustomEvent interface returns any data passed when initializing the event.
|
|
905
1002
|
*
|
|
906
1003
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent/detail)
|
|
907
1004
|
*/
|
|
@@ -914,7 +1011,7 @@ interface CustomEventCustomEventInit {
|
|
|
914
1011
|
detail?: any;
|
|
915
1012
|
}
|
|
916
1013
|
/**
|
|
917
|
-
*
|
|
1014
|
+
* 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.
|
|
918
1015
|
*
|
|
919
1016
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob)
|
|
920
1017
|
*/
|
|
@@ -923,26 +1020,54 @@ declare class Blob {
|
|
|
923
1020
|
type?: ((ArrayBuffer | ArrayBufferView) | string | Blob)[],
|
|
924
1021
|
options?: BlobOptions,
|
|
925
1022
|
);
|
|
926
|
-
|
|
1023
|
+
/**
|
|
1024
|
+
* The **`size`** read-only property of the Blob interface returns the size of the Blob or File in bytes.
|
|
1025
|
+
*
|
|
1026
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size)
|
|
1027
|
+
*/
|
|
927
1028
|
readonly size: number;
|
|
928
|
-
|
|
1029
|
+
/**
|
|
1030
|
+
* The **`type`** read-only property of the Blob interface returns the MIME type of the file.
|
|
1031
|
+
*
|
|
1032
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type)
|
|
1033
|
+
*/
|
|
929
1034
|
readonly type: string;
|
|
930
|
-
|
|
1035
|
+
/**
|
|
1036
|
+
* 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.
|
|
1037
|
+
*
|
|
1038
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice)
|
|
1039
|
+
*/
|
|
931
1040
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
932
|
-
|
|
1041
|
+
/**
|
|
1042
|
+
* 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.
|
|
1043
|
+
*
|
|
1044
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer)
|
|
1045
|
+
*/
|
|
933
1046
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
934
|
-
|
|
1047
|
+
/**
|
|
1048
|
+
* 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.
|
|
1049
|
+
*
|
|
1050
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/bytes)
|
|
1051
|
+
*/
|
|
935
1052
|
bytes(): Promise<Uint8Array>;
|
|
936
|
-
|
|
1053
|
+
/**
|
|
1054
|
+
* The **`text()`** method of the string containing the contents of the blob, interpreted as UTF-8.
|
|
1055
|
+
*
|
|
1056
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text)
|
|
1057
|
+
*/
|
|
937
1058
|
text(): Promise<string>;
|
|
938
|
-
|
|
1059
|
+
/**
|
|
1060
|
+
* The **`stream()`** method of the Blob interface returns a ReadableStream which upon reading returns the data contained within the `Blob`.
|
|
1061
|
+
*
|
|
1062
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream)
|
|
1063
|
+
*/
|
|
939
1064
|
stream(): ReadableStream;
|
|
940
1065
|
}
|
|
941
1066
|
interface BlobOptions {
|
|
942
1067
|
type?: string;
|
|
943
1068
|
}
|
|
944
1069
|
/**
|
|
945
|
-
*
|
|
1070
|
+
* The **`File`** interface provides information about files and allows JavaScript in a web page to access their content.
|
|
946
1071
|
*
|
|
947
1072
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File)
|
|
948
1073
|
*/
|
|
@@ -952,9 +1077,17 @@ declare class File extends Blob {
|
|
|
952
1077
|
name: string,
|
|
953
1078
|
options?: FileOptions,
|
|
954
1079
|
);
|
|
955
|
-
|
|
1080
|
+
/**
|
|
1081
|
+
* The **`name`** read-only property of the File interface returns the name of the file represented by a File object.
|
|
1082
|
+
*
|
|
1083
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name)
|
|
1084
|
+
*/
|
|
956
1085
|
readonly name: string;
|
|
957
|
-
|
|
1086
|
+
/**
|
|
1087
|
+
* 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).
|
|
1088
|
+
*
|
|
1089
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified)
|
|
1090
|
+
*/
|
|
958
1091
|
readonly lastModified: number;
|
|
959
1092
|
}
|
|
960
1093
|
interface FileOptions {
|
|
@@ -967,7 +1100,11 @@ interface FileOptions {
|
|
|
967
1100
|
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
968
1101
|
*/
|
|
969
1102
|
declare abstract class CacheStorage {
|
|
970
|
-
|
|
1103
|
+
/**
|
|
1104
|
+
* The **`open()`** method of the the Cache object matching the `cacheName`.
|
|
1105
|
+
*
|
|
1106
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open)
|
|
1107
|
+
*/
|
|
971
1108
|
open(cacheName: string): Promise<Cache>;
|
|
972
1109
|
readonly default: Cache;
|
|
973
1110
|
}
|
|
@@ -1003,12 +1140,17 @@ interface CacheQueryOptions {
|
|
|
1003
1140
|
*/
|
|
1004
1141
|
declare abstract class Crypto {
|
|
1005
1142
|
/**
|
|
1143
|
+
* The **`Crypto.subtle`** read-only property returns a cryptographic operations.
|
|
1006
1144
|
* Available only in secure contexts.
|
|
1007
1145
|
*
|
|
1008
1146
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
|
|
1009
1147
|
*/
|
|
1010
1148
|
readonly subtle: SubtleCrypto;
|
|
1011
|
-
|
|
1149
|
+
/**
|
|
1150
|
+
* The **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.
|
|
1151
|
+
*
|
|
1152
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues)
|
|
1153
|
+
*/
|
|
1012
1154
|
getRandomValues<
|
|
1013
1155
|
T extends
|
|
1014
1156
|
| Int8Array
|
|
@@ -1021,6 +1163,7 @@ declare abstract class Crypto {
|
|
|
1021
1163
|
| BigUint64Array,
|
|
1022
1164
|
>(buffer: T): T;
|
|
1023
1165
|
/**
|
|
1166
|
+
* The **`randomUUID()`** method of the Crypto interface is used to generate a v4 UUID using a cryptographically secure random number generator.
|
|
1024
1167
|
* Available only in secure contexts.
|
|
1025
1168
|
*
|
|
1026
1169
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/randomUUID)
|
|
@@ -1029,49 +1172,77 @@ declare abstract class Crypto {
|
|
|
1029
1172
|
DigestStream: typeof DigestStream;
|
|
1030
1173
|
}
|
|
1031
1174
|
/**
|
|
1032
|
-
*
|
|
1175
|
+
* The **`SubtleCrypto`** interface of the Web Crypto API provides a number of low-level cryptographic functions.
|
|
1033
1176
|
* Available only in secure contexts.
|
|
1034
1177
|
*
|
|
1035
1178
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto)
|
|
1036
1179
|
*/
|
|
1037
1180
|
declare abstract class SubtleCrypto {
|
|
1038
|
-
|
|
1181
|
+
/**
|
|
1182
|
+
* The **`encrypt()`** method of the SubtleCrypto interface encrypts data.
|
|
1183
|
+
*
|
|
1184
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt)
|
|
1185
|
+
*/
|
|
1039
1186
|
encrypt(
|
|
1040
1187
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1041
1188
|
key: CryptoKey,
|
|
1042
1189
|
plainText: ArrayBuffer | ArrayBufferView,
|
|
1043
1190
|
): Promise<ArrayBuffer>;
|
|
1044
|
-
|
|
1191
|
+
/**
|
|
1192
|
+
* The **`decrypt()`** method of the SubtleCrypto interface decrypts some encrypted data.
|
|
1193
|
+
*
|
|
1194
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt)
|
|
1195
|
+
*/
|
|
1045
1196
|
decrypt(
|
|
1046
1197
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1047
1198
|
key: CryptoKey,
|
|
1048
1199
|
cipherText: ArrayBuffer | ArrayBufferView,
|
|
1049
1200
|
): Promise<ArrayBuffer>;
|
|
1050
|
-
|
|
1201
|
+
/**
|
|
1202
|
+
* The **`sign()`** method of the SubtleCrypto interface generates a digital signature.
|
|
1203
|
+
*
|
|
1204
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign)
|
|
1205
|
+
*/
|
|
1051
1206
|
sign(
|
|
1052
1207
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
1053
1208
|
key: CryptoKey,
|
|
1054
1209
|
data: ArrayBuffer | ArrayBufferView,
|
|
1055
1210
|
): Promise<ArrayBuffer>;
|
|
1056
|
-
|
|
1211
|
+
/**
|
|
1212
|
+
* The **`verify()`** method of the SubtleCrypto interface verifies a digital signature.
|
|
1213
|
+
*
|
|
1214
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify)
|
|
1215
|
+
*/
|
|
1057
1216
|
verify(
|
|
1058
1217
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
1059
1218
|
key: CryptoKey,
|
|
1060
1219
|
signature: ArrayBuffer | ArrayBufferView,
|
|
1061
1220
|
data: ArrayBuffer | ArrayBufferView,
|
|
1062
1221
|
): Promise<boolean>;
|
|
1063
|
-
|
|
1222
|
+
/**
|
|
1223
|
+
* The **`digest()`** method of the SubtleCrypto interface generates a _digest_ of the given data, using the specified hash function.
|
|
1224
|
+
*
|
|
1225
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest)
|
|
1226
|
+
*/
|
|
1064
1227
|
digest(
|
|
1065
1228
|
algorithm: string | SubtleCryptoHashAlgorithm,
|
|
1066
1229
|
data: ArrayBuffer | ArrayBufferView,
|
|
1067
1230
|
): Promise<ArrayBuffer>;
|
|
1068
|
-
|
|
1231
|
+
/**
|
|
1232
|
+
* The **`generateKey()`** method of the SubtleCrypto interface is used to generate a new key (for symmetric algorithms) or key pair (for public-key algorithms).
|
|
1233
|
+
*
|
|
1234
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey)
|
|
1235
|
+
*/
|
|
1069
1236
|
generateKey(
|
|
1070
1237
|
algorithm: string | SubtleCryptoGenerateKeyAlgorithm,
|
|
1071
1238
|
extractable: boolean,
|
|
1072
1239
|
keyUsages: string[],
|
|
1073
1240
|
): Promise<CryptoKey | CryptoKeyPair>;
|
|
1074
|
-
|
|
1241
|
+
/**
|
|
1242
|
+
* The **`deriveKey()`** method of the SubtleCrypto interface can be used to derive a secret key from a master key.
|
|
1243
|
+
*
|
|
1244
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey)
|
|
1245
|
+
*/
|
|
1075
1246
|
deriveKey(
|
|
1076
1247
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
1077
1248
|
baseKey: CryptoKey,
|
|
@@ -1079,13 +1250,21 @@ declare abstract class SubtleCrypto {
|
|
|
1079
1250
|
extractable: boolean,
|
|
1080
1251
|
keyUsages: string[],
|
|
1081
1252
|
): Promise<CryptoKey>;
|
|
1082
|
-
|
|
1253
|
+
/**
|
|
1254
|
+
* The **`deriveBits()`** method of the key.
|
|
1255
|
+
*
|
|
1256
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits)
|
|
1257
|
+
*/
|
|
1083
1258
|
deriveBits(
|
|
1084
1259
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
1085
1260
|
baseKey: CryptoKey,
|
|
1086
1261
|
length?: number | null,
|
|
1087
1262
|
): Promise<ArrayBuffer>;
|
|
1088
|
-
|
|
1263
|
+
/**
|
|
1264
|
+
* 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.
|
|
1265
|
+
*
|
|
1266
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey)
|
|
1267
|
+
*/
|
|
1089
1268
|
importKey(
|
|
1090
1269
|
format: string,
|
|
1091
1270
|
keyData: (ArrayBuffer | ArrayBufferView) | JsonWebKey,
|
|
@@ -1093,16 +1272,28 @@ declare abstract class SubtleCrypto {
|
|
|
1093
1272
|
extractable: boolean,
|
|
1094
1273
|
keyUsages: string[],
|
|
1095
1274
|
): Promise<CryptoKey>;
|
|
1096
|
-
|
|
1275
|
+
/**
|
|
1276
|
+
* 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.
|
|
1277
|
+
*
|
|
1278
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey)
|
|
1279
|
+
*/
|
|
1097
1280
|
exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
1098
|
-
|
|
1281
|
+
/**
|
|
1282
|
+
* The **`wrapKey()`** method of the SubtleCrypto interface 'wraps' a key.
|
|
1283
|
+
*
|
|
1284
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey)
|
|
1285
|
+
*/
|
|
1099
1286
|
wrapKey(
|
|
1100
1287
|
format: string,
|
|
1101
1288
|
key: CryptoKey,
|
|
1102
1289
|
wrappingKey: CryptoKey,
|
|
1103
1290
|
wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1104
1291
|
): Promise<ArrayBuffer>;
|
|
1105
|
-
|
|
1292
|
+
/**
|
|
1293
|
+
* The **`unwrapKey()`** method of the SubtleCrypto interface 'unwraps' a key.
|
|
1294
|
+
*
|
|
1295
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey)
|
|
1296
|
+
*/
|
|
1106
1297
|
unwrapKey(
|
|
1107
1298
|
format: string,
|
|
1108
1299
|
wrappedKey: ArrayBuffer | ArrayBufferView,
|
|
@@ -1118,17 +1309,29 @@ declare abstract class SubtleCrypto {
|
|
|
1118
1309
|
): boolean;
|
|
1119
1310
|
}
|
|
1120
1311
|
/**
|
|
1121
|
-
* The CryptoKey
|
|
1312
|
+
* 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.
|
|
1122
1313
|
* Available only in secure contexts.
|
|
1123
1314
|
*
|
|
1124
1315
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)
|
|
1125
1316
|
*/
|
|
1126
1317
|
declare abstract class CryptoKey {
|
|
1127
|
-
|
|
1318
|
+
/**
|
|
1319
|
+
* The read-only **`type`** property of the CryptoKey interface indicates which kind of key is represented by the object.
|
|
1320
|
+
*
|
|
1321
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type)
|
|
1322
|
+
*/
|
|
1128
1323
|
readonly type: string;
|
|
1129
|
-
|
|
1324
|
+
/**
|
|
1325
|
+
* The read-only **`extractable`** property of the CryptoKey interface indicates whether or not the key may be extracted using `SubtleCrypto.exportKey()` or `SubtleCrypto.wrapKey()`.
|
|
1326
|
+
*
|
|
1327
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable)
|
|
1328
|
+
*/
|
|
1130
1329
|
readonly extractable: boolean;
|
|
1131
|
-
|
|
1330
|
+
/**
|
|
1331
|
+
* 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.
|
|
1332
|
+
*
|
|
1333
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm)
|
|
1334
|
+
*/
|
|
1132
1335
|
readonly algorithm:
|
|
1133
1336
|
| CryptoKeyKeyAlgorithm
|
|
1134
1337
|
| CryptoKeyAesKeyAlgorithm
|
|
@@ -1136,7 +1339,11 @@ declare abstract class CryptoKey {
|
|
|
1136
1339
|
| CryptoKeyRsaKeyAlgorithm
|
|
1137
1340
|
| CryptoKeyEllipticKeyAlgorithm
|
|
1138
1341
|
| CryptoKeyArbitraryKeyAlgorithm;
|
|
1139
|
-
|
|
1342
|
+
/**
|
|
1343
|
+
* The read-only **`usages`** property of the CryptoKey interface indicates what can be done with the key.
|
|
1344
|
+
*
|
|
1345
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages)
|
|
1346
|
+
*/
|
|
1140
1347
|
readonly usages: string[];
|
|
1141
1348
|
}
|
|
1142
1349
|
interface CryptoKeyPair {
|
|
@@ -1245,24 +1452,14 @@ declare class DigestStream extends WritableStream<
|
|
|
1245
1452
|
get bytesWritten(): number | bigint;
|
|
1246
1453
|
}
|
|
1247
1454
|
/**
|
|
1248
|
-
*
|
|
1455
|
+
* The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, `KOI8-R`, `GBK`, etc.
|
|
1249
1456
|
*
|
|
1250
1457
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
|
|
1251
1458
|
*/
|
|
1252
1459
|
declare class TextDecoder {
|
|
1253
1460
|
constructor(label?: string, options?: TextDecoderConstructorOptions);
|
|
1254
1461
|
/**
|
|
1255
|
-
*
|
|
1256
|
-
*
|
|
1257
|
-
* ```
|
|
1258
|
-
* var string = "", decoder = new TextDecoder(encoding), buffer;
|
|
1259
|
-
* while(buffer = next_chunk()) {
|
|
1260
|
-
* string += decoder.decode(buffer, {stream:true});
|
|
1261
|
-
* }
|
|
1262
|
-
* string += decoder.decode(); // end-of-queue
|
|
1263
|
-
* ```
|
|
1264
|
-
*
|
|
1265
|
-
* If the error mode is "fatal" and encoding's decoder returns error, throws a TypeError.
|
|
1462
|
+
* The **`TextDecoder.decode()`** method returns a string containing text decoded from the buffer passed as a parameter.
|
|
1266
1463
|
*
|
|
1267
1464
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder/decode)
|
|
1268
1465
|
*/
|
|
@@ -1275,27 +1472,24 @@ declare class TextDecoder {
|
|
|
1275
1472
|
readonly ignoreBOM: boolean;
|
|
1276
1473
|
}
|
|
1277
1474
|
/**
|
|
1278
|
-
* TextEncoder takes a stream of code points as input and emits a stream of
|
|
1475
|
+
* The **`TextEncoder`** interface takes a stream of code points as input and emits a stream of UTF-8 bytes.
|
|
1279
1476
|
*
|
|
1280
1477
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
|
|
1281
1478
|
*/
|
|
1282
1479
|
declare class TextEncoder {
|
|
1283
1480
|
constructor();
|
|
1284
1481
|
/**
|
|
1285
|
-
*
|
|
1482
|
+
* 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.
|
|
1286
1483
|
*
|
|
1287
1484
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encode)
|
|
1288
1485
|
*/
|
|
1289
1486
|
encode(input?: string): Uint8Array;
|
|
1290
1487
|
/**
|
|
1291
|
-
*
|
|
1488
|
+
* 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.
|
|
1292
1489
|
*
|
|
1293
1490
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
|
|
1294
1491
|
*/
|
|
1295
|
-
encodeInto(
|
|
1296
|
-
input: string,
|
|
1297
|
-
buffer: ArrayBuffer | ArrayBufferView,
|
|
1298
|
-
): TextEncoderEncodeIntoResult;
|
|
1492
|
+
encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
|
|
1299
1493
|
readonly encoding: string;
|
|
1300
1494
|
}
|
|
1301
1495
|
interface TextDecoderConstructorOptions {
|
|
@@ -1310,21 +1504,41 @@ interface TextEncoderEncodeIntoResult {
|
|
|
1310
1504
|
written: number;
|
|
1311
1505
|
}
|
|
1312
1506
|
/**
|
|
1313
|
-
*
|
|
1507
|
+
* The **`ErrorEvent`** interface represents events providing information related to errors in scripts or in files.
|
|
1314
1508
|
*
|
|
1315
1509
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
|
|
1316
1510
|
*/
|
|
1317
1511
|
declare class ErrorEvent extends Event {
|
|
1318
1512
|
constructor(type: string, init?: ErrorEventErrorEventInit);
|
|
1319
|
-
|
|
1513
|
+
/**
|
|
1514
|
+
* The **`filename`** read-only property of the ErrorEvent interface returns a string containing the name of the script file in which the error occurred.
|
|
1515
|
+
*
|
|
1516
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename)
|
|
1517
|
+
*/
|
|
1320
1518
|
get filename(): string;
|
|
1321
|
-
|
|
1519
|
+
/**
|
|
1520
|
+
* The **`message`** read-only property of the ErrorEvent interface returns a string containing a human-readable error message describing the problem.
|
|
1521
|
+
*
|
|
1522
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message)
|
|
1523
|
+
*/
|
|
1322
1524
|
get message(): string;
|
|
1323
|
-
|
|
1525
|
+
/**
|
|
1526
|
+
* 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.
|
|
1527
|
+
*
|
|
1528
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno)
|
|
1529
|
+
*/
|
|
1324
1530
|
get lineno(): number;
|
|
1325
|
-
|
|
1531
|
+
/**
|
|
1532
|
+
* 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.
|
|
1533
|
+
*
|
|
1534
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno)
|
|
1535
|
+
*/
|
|
1326
1536
|
get colno(): number;
|
|
1327
|
-
|
|
1537
|
+
/**
|
|
1538
|
+
* 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.
|
|
1539
|
+
*
|
|
1540
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error)
|
|
1541
|
+
*/
|
|
1328
1542
|
get error(): any;
|
|
1329
1543
|
}
|
|
1330
1544
|
interface ErrorEventErrorEventInit {
|
|
@@ -1335,38 +1549,38 @@ interface ErrorEventErrorEventInit {
|
|
|
1335
1549
|
error?: any;
|
|
1336
1550
|
}
|
|
1337
1551
|
/**
|
|
1338
|
-
*
|
|
1552
|
+
* The **`MessageEvent`** interface represents a message received by a target object.
|
|
1339
1553
|
*
|
|
1340
1554
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
|
|
1341
1555
|
*/
|
|
1342
1556
|
declare class MessageEvent extends Event {
|
|
1343
1557
|
constructor(type: string, initializer: MessageEventInit);
|
|
1344
1558
|
/**
|
|
1345
|
-
*
|
|
1559
|
+
* 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.
|
|
1346
1560
|
*
|
|
1347
1561
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
|
|
1348
1562
|
*/
|
|
1349
1563
|
readonly data: any;
|
|
1350
1564
|
/**
|
|
1351
|
-
*
|
|
1565
|
+
* The **`origin`** read-only property of the origin of the message emitter.
|
|
1352
1566
|
*
|
|
1353
1567
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/origin)
|
|
1354
1568
|
*/
|
|
1355
1569
|
readonly origin: string | null;
|
|
1356
1570
|
/**
|
|
1357
|
-
*
|
|
1571
|
+
* The **`lastEventId`** read-only property of the unique ID for the event.
|
|
1358
1572
|
*
|
|
1359
1573
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/lastEventId)
|
|
1360
1574
|
*/
|
|
1361
1575
|
readonly lastEventId: string;
|
|
1362
1576
|
/**
|
|
1363
|
-
*
|
|
1577
|
+
* The **`source`** read-only property of the a WindowProxy, MessagePort, or a `MessageEventSource` (which can be a WindowProxy, message emitter.
|
|
1364
1578
|
*
|
|
1365
1579
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/source)
|
|
1366
1580
|
*/
|
|
1367
1581
|
readonly source: MessagePort | null;
|
|
1368
1582
|
/**
|
|
1369
|
-
*
|
|
1583
|
+
* The **`ports`** read-only property of the containing all MessagePort objects sent with the message, in order.
|
|
1370
1584
|
*
|
|
1371
1585
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/ports)
|
|
1372
1586
|
*/
|
|
@@ -1376,27 +1590,78 @@ interface MessageEventInit {
|
|
|
1376
1590
|
data: ArrayBuffer | string;
|
|
1377
1591
|
}
|
|
1378
1592
|
/**
|
|
1379
|
-
*
|
|
1593
|
+
* The **`PromiseRejectionEvent`** interface represents events which are sent to the global script context when JavaScript Promises are rejected.
|
|
1594
|
+
*
|
|
1595
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent)
|
|
1596
|
+
*/
|
|
1597
|
+
declare abstract class PromiseRejectionEvent extends Event {
|
|
1598
|
+
/**
|
|
1599
|
+
* The PromiseRejectionEvent interface's **`promise`** read-only property indicates the JavaScript rejected.
|
|
1600
|
+
*
|
|
1601
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise)
|
|
1602
|
+
*/
|
|
1603
|
+
readonly promise: Promise<any>;
|
|
1604
|
+
/**
|
|
1605
|
+
* The PromiseRejectionEvent **`reason`** read-only property is any JavaScript value or Object which provides the reason passed into Promise.reject().
|
|
1606
|
+
*
|
|
1607
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason)
|
|
1608
|
+
*/
|
|
1609
|
+
readonly reason: any;
|
|
1610
|
+
}
|
|
1611
|
+
/**
|
|
1612
|
+
* 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.
|
|
1380
1613
|
*
|
|
1381
1614
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)
|
|
1382
1615
|
*/
|
|
1383
1616
|
declare class FormData {
|
|
1384
1617
|
constructor();
|
|
1385
|
-
|
|
1618
|
+
/**
|
|
1619
|
+
* 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.
|
|
1620
|
+
*
|
|
1621
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append)
|
|
1622
|
+
*/
|
|
1386
1623
|
append(name: string, value: string): void;
|
|
1387
|
-
|
|
1624
|
+
/**
|
|
1625
|
+
* 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.
|
|
1626
|
+
*
|
|
1627
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append)
|
|
1628
|
+
*/
|
|
1388
1629
|
append(name: string, value: Blob, filename?: string): void;
|
|
1389
|
-
|
|
1630
|
+
/**
|
|
1631
|
+
* The **`delete()`** method of the FormData interface deletes a key and its value(s) from a `FormData` object.
|
|
1632
|
+
*
|
|
1633
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete)
|
|
1634
|
+
*/
|
|
1390
1635
|
delete(name: string): void;
|
|
1391
|
-
|
|
1636
|
+
/**
|
|
1637
|
+
* The **`get()`** method of the FormData interface returns the first value associated with a given key from within a `FormData` object.
|
|
1638
|
+
*
|
|
1639
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get)
|
|
1640
|
+
*/
|
|
1392
1641
|
get(name: string): string | null;
|
|
1393
|
-
|
|
1642
|
+
/**
|
|
1643
|
+
* The **`getAll()`** method of the FormData interface returns all the values associated with a given key from within a `FormData` object.
|
|
1644
|
+
*
|
|
1645
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll)
|
|
1646
|
+
*/
|
|
1394
1647
|
getAll(name: string): string[];
|
|
1395
|
-
|
|
1648
|
+
/**
|
|
1649
|
+
* The **`has()`** method of the FormData interface returns whether a `FormData` object contains a certain key.
|
|
1650
|
+
*
|
|
1651
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has)
|
|
1652
|
+
*/
|
|
1396
1653
|
has(name: string): boolean;
|
|
1397
|
-
|
|
1654
|
+
/**
|
|
1655
|
+
* 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.
|
|
1656
|
+
*
|
|
1657
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set)
|
|
1658
|
+
*/
|
|
1398
1659
|
set(name: string, value: string): void;
|
|
1399
|
-
|
|
1660
|
+
/**
|
|
1661
|
+
* 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.
|
|
1662
|
+
*
|
|
1663
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set)
|
|
1664
|
+
*/
|
|
1400
1665
|
set(name: string, value: Blob, filename?: string): void;
|
|
1401
1666
|
/* Returns an array of key, value pairs for every entry in the list. */
|
|
1402
1667
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
@@ -1522,14 +1787,22 @@ interface DocumentEnd {
|
|
|
1522
1787
|
append(content: string, options?: ContentOptions): DocumentEnd;
|
|
1523
1788
|
}
|
|
1524
1789
|
/**
|
|
1525
|
-
* This is the event type for fetch
|
|
1790
|
+
* This is the event type for `fetch` events dispatched on the ServiceWorkerGlobalScope.
|
|
1526
1791
|
*
|
|
1527
1792
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent)
|
|
1528
1793
|
*/
|
|
1529
1794
|
declare abstract class FetchEvent extends ExtendableEvent {
|
|
1530
|
-
|
|
1795
|
+
/**
|
|
1796
|
+
* The **`request`** read-only property of the the event handler.
|
|
1797
|
+
*
|
|
1798
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request)
|
|
1799
|
+
*/
|
|
1531
1800
|
readonly request: Request;
|
|
1532
|
-
|
|
1801
|
+
/**
|
|
1802
|
+
* The **`respondWith()`** method of allows you to provide a promise for a Response yourself.
|
|
1803
|
+
*
|
|
1804
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith)
|
|
1805
|
+
*/
|
|
1533
1806
|
respondWith(promise: Response | Promise<Response>): void;
|
|
1534
1807
|
passThroughOnException(): void;
|
|
1535
1808
|
}
|
|
@@ -1538,22 +1811,42 @@ type HeadersInit =
|
|
|
1538
1811
|
| Iterable<Iterable<string>>
|
|
1539
1812
|
| Record<string, string>;
|
|
1540
1813
|
/**
|
|
1541
|
-
*
|
|
1814
|
+
* The **`Headers`** interface of the Fetch API allows you to perform various actions on HTTP request and response headers.
|
|
1542
1815
|
*
|
|
1543
1816
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers)
|
|
1544
1817
|
*/
|
|
1545
1818
|
declare class Headers {
|
|
1546
1819
|
constructor(init?: HeadersInit);
|
|
1547
|
-
|
|
1820
|
+
/**
|
|
1821
|
+
* 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.
|
|
1822
|
+
*
|
|
1823
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get)
|
|
1824
|
+
*/
|
|
1548
1825
|
get(name: string): string | null;
|
|
1549
1826
|
getAll(name: string): string[];
|
|
1550
|
-
|
|
1827
|
+
/**
|
|
1828
|
+
* The **`has()`** method of the Headers interface returns a boolean stating whether a `Headers` object contains a certain header.
|
|
1829
|
+
*
|
|
1830
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has)
|
|
1831
|
+
*/
|
|
1551
1832
|
has(name: string): boolean;
|
|
1552
|
-
|
|
1833
|
+
/**
|
|
1834
|
+
* 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.
|
|
1835
|
+
*
|
|
1836
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set)
|
|
1837
|
+
*/
|
|
1553
1838
|
set(name: string, value: string): void;
|
|
1554
|
-
|
|
1839
|
+
/**
|
|
1840
|
+
* 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.
|
|
1841
|
+
*
|
|
1842
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append)
|
|
1843
|
+
*/
|
|
1555
1844
|
append(name: string, value: string): void;
|
|
1556
|
-
|
|
1845
|
+
/**
|
|
1846
|
+
* The **`delete()`** method of the Headers interface deletes a header from the current `Headers` object.
|
|
1847
|
+
*
|
|
1848
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete)
|
|
1849
|
+
*/
|
|
1557
1850
|
delete(name: string): void;
|
|
1558
1851
|
forEach<This = unknown>(
|
|
1559
1852
|
callback: (this: This, value: string, key: string, parent: Headers) => void,
|
|
@@ -1594,7 +1887,7 @@ declare abstract class Body {
|
|
|
1594
1887
|
blob(): Promise<Blob>;
|
|
1595
1888
|
}
|
|
1596
1889
|
/**
|
|
1597
|
-
*
|
|
1890
|
+
* The **`Response`** interface of the Fetch API represents the response to a request.
|
|
1598
1891
|
*
|
|
1599
1892
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
|
|
1600
1893
|
*/
|
|
@@ -1606,28 +1899,60 @@ declare var Response: {
|
|
|
1606
1899
|
json(any: any, maybeInit?: ResponseInit | Response): Response;
|
|
1607
1900
|
};
|
|
1608
1901
|
/**
|
|
1609
|
-
*
|
|
1902
|
+
* The **`Response`** interface of the Fetch API represents the response to a request.
|
|
1610
1903
|
*
|
|
1611
1904
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
|
|
1612
1905
|
*/
|
|
1613
1906
|
interface Response extends Body {
|
|
1614
|
-
|
|
1907
|
+
/**
|
|
1908
|
+
* The **`clone()`** method of the Response interface creates a clone of a response object, identical in every way, but stored in a different variable.
|
|
1909
|
+
*
|
|
1910
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone)
|
|
1911
|
+
*/
|
|
1615
1912
|
clone(): Response;
|
|
1616
|
-
|
|
1913
|
+
/**
|
|
1914
|
+
* The **`status`** read-only property of the Response interface contains the HTTP status codes of the response.
|
|
1915
|
+
*
|
|
1916
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status)
|
|
1917
|
+
*/
|
|
1617
1918
|
readonly status: number;
|
|
1618
|
-
|
|
1919
|
+
/**
|
|
1920
|
+
* The **`statusText`** read-only property of the Response interface contains the status message corresponding to the HTTP status code in Response.status.
|
|
1921
|
+
*
|
|
1922
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText)
|
|
1923
|
+
*/
|
|
1619
1924
|
readonly statusText: string;
|
|
1620
|
-
|
|
1925
|
+
/**
|
|
1926
|
+
* The **`headers`** read-only property of the with the response.
|
|
1927
|
+
*
|
|
1928
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers)
|
|
1929
|
+
*/
|
|
1621
1930
|
readonly headers: Headers;
|
|
1622
|
-
|
|
1931
|
+
/**
|
|
1932
|
+
* 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.
|
|
1933
|
+
*
|
|
1934
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok)
|
|
1935
|
+
*/
|
|
1623
1936
|
readonly ok: boolean;
|
|
1624
|
-
|
|
1937
|
+
/**
|
|
1938
|
+
* 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.
|
|
1939
|
+
*
|
|
1940
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected)
|
|
1941
|
+
*/
|
|
1625
1942
|
readonly redirected: boolean;
|
|
1626
|
-
|
|
1943
|
+
/**
|
|
1944
|
+
* The **`url`** read-only property of the Response interface contains the URL of the response.
|
|
1945
|
+
*
|
|
1946
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url)
|
|
1947
|
+
*/
|
|
1627
1948
|
readonly url: string;
|
|
1628
1949
|
readonly webSocket: WebSocket | null;
|
|
1629
1950
|
readonly cf?: any;
|
|
1630
|
-
|
|
1951
|
+
/**
|
|
1952
|
+
* The **`type`** read-only property of the Response interface contains the type of the response.
|
|
1953
|
+
*
|
|
1954
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/type)
|
|
1955
|
+
*/
|
|
1631
1956
|
type: "default" | "error";
|
|
1632
1957
|
}
|
|
1633
1958
|
interface ResponseInit {
|
|
@@ -1642,7 +1967,7 @@ type RequestInfo<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> =
|
|
|
1642
1967
|
| Request<CfHostMetadata, Cf>
|
|
1643
1968
|
| string;
|
|
1644
1969
|
/**
|
|
1645
|
-
*
|
|
1970
|
+
* The **`Request`** interface of the Fetch API represents a resource request.
|
|
1646
1971
|
*
|
|
1647
1972
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
|
|
1648
1973
|
*/
|
|
@@ -1654,54 +1979,58 @@ declare var Request: {
|
|
|
1654
1979
|
): Request<CfHostMetadata, Cf>;
|
|
1655
1980
|
};
|
|
1656
1981
|
/**
|
|
1657
|
-
*
|
|
1982
|
+
* The **`Request`** interface of the Fetch API represents a resource request.
|
|
1658
1983
|
*
|
|
1659
1984
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
|
|
1660
1985
|
*/
|
|
1661
1986
|
interface Request<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>>
|
|
1662
1987
|
extends Body {
|
|
1663
|
-
|
|
1988
|
+
/**
|
|
1989
|
+
* The **`clone()`** method of the Request interface creates a copy of the current `Request` object.
|
|
1990
|
+
*
|
|
1991
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone)
|
|
1992
|
+
*/
|
|
1664
1993
|
clone(): Request<CfHostMetadata, Cf>;
|
|
1665
1994
|
/**
|
|
1666
|
-
*
|
|
1995
|
+
* The **`method`** read-only property of the `POST`, etc.) A String indicating the method of the request.
|
|
1667
1996
|
*
|
|
1668
1997
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/method)
|
|
1669
1998
|
*/
|
|
1670
1999
|
readonly method: string;
|
|
1671
2000
|
/**
|
|
1672
|
-
*
|
|
2001
|
+
* The **`url`** read-only property of the Request interface contains the URL of the request.
|
|
1673
2002
|
*
|
|
1674
2003
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/url)
|
|
1675
2004
|
*/
|
|
1676
2005
|
readonly url: string;
|
|
1677
2006
|
/**
|
|
1678
|
-
*
|
|
2007
|
+
* The **`headers`** read-only property of the with the request.
|
|
1679
2008
|
*
|
|
1680
2009
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/headers)
|
|
1681
2010
|
*/
|
|
1682
2011
|
readonly headers: Headers;
|
|
1683
2012
|
/**
|
|
1684
|
-
*
|
|
2013
|
+
* The **`redirect`** read-only property of the Request interface contains the mode for how redirects are handled.
|
|
1685
2014
|
*
|
|
1686
2015
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/redirect)
|
|
1687
2016
|
*/
|
|
1688
2017
|
readonly redirect: string;
|
|
1689
2018
|
readonly fetcher: Fetcher | null;
|
|
1690
2019
|
/**
|
|
1691
|
-
*
|
|
2020
|
+
* The read-only **`signal`** property of the Request interface returns the AbortSignal associated with the request.
|
|
1692
2021
|
*
|
|
1693
2022
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/signal)
|
|
1694
2023
|
*/
|
|
1695
2024
|
readonly signal: AbortSignal;
|
|
1696
2025
|
readonly cf?: Cf;
|
|
1697
2026
|
/**
|
|
1698
|
-
*
|
|
2027
|
+
* The **`integrity`** read-only property of the Request interface contains the subresource integrity value of the request.
|
|
1699
2028
|
*
|
|
1700
2029
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/integrity)
|
|
1701
2030
|
*/
|
|
1702
2031
|
readonly integrity: string;
|
|
1703
2032
|
/**
|
|
1704
|
-
*
|
|
2033
|
+
* 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.
|
|
1705
2034
|
*
|
|
1706
2035
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive)
|
|
1707
2036
|
*/
|
|
@@ -2209,30 +2538,58 @@ type ReadableStreamReadResult<R = any> =
|
|
|
2209
2538
|
value?: undefined;
|
|
2210
2539
|
};
|
|
2211
2540
|
/**
|
|
2212
|
-
*
|
|
2541
|
+
* The `ReadableStream` interface of the Streams API represents a readable stream of byte data.
|
|
2213
2542
|
*
|
|
2214
2543
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2215
2544
|
*/
|
|
2216
2545
|
interface ReadableStream<R = any> {
|
|
2217
|
-
|
|
2546
|
+
/**
|
|
2547
|
+
* The **`locked`** read-only property of the ReadableStream interface returns whether or not the readable stream is locked to a reader.
|
|
2548
|
+
*
|
|
2549
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked)
|
|
2550
|
+
*/
|
|
2218
2551
|
readonly locked: boolean;
|
|
2219
|
-
|
|
2552
|
+
/**
|
|
2553
|
+
* The **`cancel()`** method of the ReadableStream interface returns a Promise that resolves when the stream is canceled.
|
|
2554
|
+
*
|
|
2555
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel)
|
|
2556
|
+
*/
|
|
2220
2557
|
cancel(reason?: any): Promise<void>;
|
|
2221
|
-
|
|
2558
|
+
/**
|
|
2559
|
+
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it.
|
|
2560
|
+
*
|
|
2561
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
|
|
2562
|
+
*/
|
|
2222
2563
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
2223
|
-
|
|
2564
|
+
/**
|
|
2565
|
+
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it.
|
|
2566
|
+
*
|
|
2567
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
|
|
2568
|
+
*/
|
|
2224
2569
|
getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader;
|
|
2225
|
-
|
|
2570
|
+
/**
|
|
2571
|
+
* 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.
|
|
2572
|
+
*
|
|
2573
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough)
|
|
2574
|
+
*/
|
|
2226
2575
|
pipeThrough<T>(
|
|
2227
2576
|
transform: ReadableWritablePair<T, R>,
|
|
2228
2577
|
options?: StreamPipeOptions,
|
|
2229
2578
|
): ReadableStream<T>;
|
|
2230
|
-
|
|
2579
|
+
/**
|
|
2580
|
+
* 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.
|
|
2581
|
+
*
|
|
2582
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo)
|
|
2583
|
+
*/
|
|
2231
2584
|
pipeTo(
|
|
2232
2585
|
destination: WritableStream<R>,
|
|
2233
2586
|
options?: StreamPipeOptions,
|
|
2234
2587
|
): Promise<void>;
|
|
2235
|
-
|
|
2588
|
+
/**
|
|
2589
|
+
* The **`tee()`** method of the two-element array containing the two resulting branches as new ReadableStream instances.
|
|
2590
|
+
*
|
|
2591
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee)
|
|
2592
|
+
*/
|
|
2236
2593
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
2237
2594
|
values(options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
|
|
2238
2595
|
[Symbol.asyncIterator](
|
|
@@ -2240,7 +2597,7 @@ interface ReadableStream<R = any> {
|
|
|
2240
2597
|
): AsyncIterableIterator<R>;
|
|
2241
2598
|
}
|
|
2242
2599
|
/**
|
|
2243
|
-
*
|
|
2600
|
+
* The `ReadableStream` interface of the Streams API represents a readable stream of byte data.
|
|
2244
2601
|
*
|
|
2245
2602
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2246
2603
|
*/
|
|
@@ -2255,26 +2612,50 @@ declare const ReadableStream: {
|
|
|
2255
2612
|
strategy?: QueuingStrategy<R>,
|
|
2256
2613
|
): ReadableStream<R>;
|
|
2257
2614
|
};
|
|
2258
|
-
|
|
2615
|
+
/**
|
|
2616
|
+
* 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).
|
|
2617
|
+
*
|
|
2618
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader)
|
|
2619
|
+
*/
|
|
2259
2620
|
declare class ReadableStreamDefaultReader<R = any> {
|
|
2260
2621
|
constructor(stream: ReadableStream);
|
|
2261
2622
|
readonly closed: Promise<void>;
|
|
2262
2623
|
cancel(reason?: any): Promise<void>;
|
|
2263
|
-
|
|
2624
|
+
/**
|
|
2625
|
+
* The **`read()`** method of the ReadableStreamDefaultReader interface returns a Promise providing access to the next chunk in the stream's internal queue.
|
|
2626
|
+
*
|
|
2627
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read)
|
|
2628
|
+
*/
|
|
2264
2629
|
read(): Promise<ReadableStreamReadResult<R>>;
|
|
2265
|
-
|
|
2630
|
+
/**
|
|
2631
|
+
* The **`releaseLock()`** method of the ReadableStreamDefaultReader interface releases the reader's lock on the stream.
|
|
2632
|
+
*
|
|
2633
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock)
|
|
2634
|
+
*/
|
|
2266
2635
|
releaseLock(): void;
|
|
2267
2636
|
}
|
|
2268
|
-
|
|
2637
|
+
/**
|
|
2638
|
+
* The `ReadableStreamBYOBReader` interface of the Streams API defines a reader for a ReadableStream that supports zero-copy reading from an underlying byte source.
|
|
2639
|
+
*
|
|
2640
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader)
|
|
2641
|
+
*/
|
|
2269
2642
|
declare class ReadableStreamBYOBReader {
|
|
2270
2643
|
constructor(stream: ReadableStream);
|
|
2271
2644
|
readonly closed: Promise<void>;
|
|
2272
2645
|
cancel(reason?: any): Promise<void>;
|
|
2273
|
-
|
|
2646
|
+
/**
|
|
2647
|
+
* 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.
|
|
2648
|
+
*
|
|
2649
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
|
|
2650
|
+
*/
|
|
2274
2651
|
read<T extends ArrayBufferView>(
|
|
2275
2652
|
view: T,
|
|
2276
2653
|
): Promise<ReadableStreamReadResult<T>>;
|
|
2277
|
-
|
|
2654
|
+
/**
|
|
2655
|
+
* The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
|
|
2656
|
+
*
|
|
2657
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock)
|
|
2658
|
+
*/
|
|
2278
2659
|
releaseLock(): void;
|
|
2279
2660
|
readAtLeast<T extends ArrayBufferView>(
|
|
2280
2661
|
minElements: number,
|
|
@@ -2292,60 +2673,148 @@ interface ReadableStreamGetReaderOptions {
|
|
|
2292
2673
|
*/
|
|
2293
2674
|
mode: "byob";
|
|
2294
2675
|
}
|
|
2295
|
-
|
|
2676
|
+
/**
|
|
2677
|
+
* 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).
|
|
2678
|
+
*
|
|
2679
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest)
|
|
2680
|
+
*/
|
|
2296
2681
|
interface ReadableStreamBYOBRequest {
|
|
2297
|
-
|
|
2682
|
+
/**
|
|
2683
|
+
* The **`view`** getter property of the ReadableStreamBYOBRequest interface returns the current view.
|
|
2684
|
+
*
|
|
2685
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view)
|
|
2686
|
+
*/
|
|
2298
2687
|
get view(): Uint8Array | null;
|
|
2299
|
-
|
|
2688
|
+
/**
|
|
2689
|
+
* 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.
|
|
2690
|
+
*
|
|
2691
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond)
|
|
2692
|
+
*/
|
|
2300
2693
|
respond(bytesWritten: number): void;
|
|
2301
|
-
|
|
2694
|
+
/**
|
|
2695
|
+
* 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.
|
|
2696
|
+
*
|
|
2697
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView)
|
|
2698
|
+
*/
|
|
2302
2699
|
respondWithNewView(view: ArrayBuffer | ArrayBufferView): void;
|
|
2303
2700
|
get atLeast(): number | null;
|
|
2304
2701
|
}
|
|
2305
|
-
|
|
2702
|
+
/**
|
|
2703
|
+
* The **`ReadableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a ReadableStream's state and internal queue.
|
|
2704
|
+
*
|
|
2705
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController)
|
|
2706
|
+
*/
|
|
2306
2707
|
interface ReadableStreamDefaultController<R = any> {
|
|
2307
|
-
|
|
2708
|
+
/**
|
|
2709
|
+
* The **`desiredSize`** read-only property of the required to fill the stream's internal queue.
|
|
2710
|
+
*
|
|
2711
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize)
|
|
2712
|
+
*/
|
|
2308
2713
|
get desiredSize(): number | null;
|
|
2309
|
-
|
|
2714
|
+
/**
|
|
2715
|
+
* The **`close()`** method of the ReadableStreamDefaultController interface closes the associated stream.
|
|
2716
|
+
*
|
|
2717
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close)
|
|
2718
|
+
*/
|
|
2310
2719
|
close(): void;
|
|
2311
|
-
|
|
2720
|
+
/**
|
|
2721
|
+
* The **`enqueue()`** method of the ```js-nolint enqueue(chunk) ``` - `chunk` - : The chunk to enqueue.
|
|
2722
|
+
*
|
|
2723
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)
|
|
2724
|
+
*/
|
|
2312
2725
|
enqueue(chunk?: R): void;
|
|
2313
|
-
|
|
2726
|
+
/**
|
|
2727
|
+
* The **`error()`** method of the with the associated stream to error.
|
|
2728
|
+
*
|
|
2729
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error)
|
|
2730
|
+
*/
|
|
2314
2731
|
error(reason: any): void;
|
|
2315
2732
|
}
|
|
2316
|
-
|
|
2733
|
+
/**
|
|
2734
|
+
* The **`ReadableByteStreamController`** interface of the Streams API represents a controller for a readable byte stream.
|
|
2735
|
+
*
|
|
2736
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController)
|
|
2737
|
+
*/
|
|
2317
2738
|
interface ReadableByteStreamController {
|
|
2318
|
-
|
|
2739
|
+
/**
|
|
2740
|
+
* The **`byobRequest`** read-only property of the ReadableByteStreamController interface returns the current BYOB request, or `null` if there are no pending requests.
|
|
2741
|
+
*
|
|
2742
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest)
|
|
2743
|
+
*/
|
|
2319
2744
|
get byobRequest(): ReadableStreamBYOBRequest | null;
|
|
2320
|
-
|
|
2745
|
+
/**
|
|
2746
|
+
* 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'.
|
|
2747
|
+
*
|
|
2748
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize)
|
|
2749
|
+
*/
|
|
2321
2750
|
get desiredSize(): number | null;
|
|
2322
|
-
|
|
2751
|
+
/**
|
|
2752
|
+
* The **`close()`** method of the ReadableByteStreamController interface closes the associated stream.
|
|
2753
|
+
*
|
|
2754
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close)
|
|
2755
|
+
*/
|
|
2323
2756
|
close(): void;
|
|
2324
|
-
|
|
2757
|
+
/**
|
|
2758
|
+
* 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).
|
|
2759
|
+
*
|
|
2760
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue)
|
|
2761
|
+
*/
|
|
2325
2762
|
enqueue(chunk: ArrayBuffer | ArrayBufferView): void;
|
|
2326
|
-
|
|
2763
|
+
/**
|
|
2764
|
+
* The **`error()`** method of the ReadableByteStreamController interface causes any future interactions with the associated stream to error with the specified reason.
|
|
2765
|
+
*
|
|
2766
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error)
|
|
2767
|
+
*/
|
|
2327
2768
|
error(reason: any): void;
|
|
2328
2769
|
}
|
|
2329
2770
|
/**
|
|
2330
|
-
*
|
|
2771
|
+
* The **`WritableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a WritableStream's state.
|
|
2331
2772
|
*
|
|
2332
2773
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
2333
2774
|
*/
|
|
2334
2775
|
interface WritableStreamDefaultController {
|
|
2335
|
-
|
|
2776
|
+
/**
|
|
2777
|
+
* The read-only **`signal`** property of the WritableStreamDefaultController interface returns the AbortSignal associated with the controller.
|
|
2778
|
+
*
|
|
2779
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal)
|
|
2780
|
+
*/
|
|
2336
2781
|
get signal(): AbortSignal;
|
|
2337
|
-
|
|
2782
|
+
/**
|
|
2783
|
+
* The **`error()`** method of the with the associated stream to error.
|
|
2784
|
+
*
|
|
2785
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error)
|
|
2786
|
+
*/
|
|
2338
2787
|
error(reason?: any): void;
|
|
2339
2788
|
}
|
|
2340
|
-
|
|
2789
|
+
/**
|
|
2790
|
+
* The **`TransformStreamDefaultController`** interface of the Streams API provides methods to manipulate the associated ReadableStream and WritableStream.
|
|
2791
|
+
*
|
|
2792
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController)
|
|
2793
|
+
*/
|
|
2341
2794
|
interface TransformStreamDefaultController<O = any> {
|
|
2342
|
-
|
|
2795
|
+
/**
|
|
2796
|
+
* The **`desiredSize`** read-only property of the TransformStreamDefaultController interface returns the desired size to fill the queue of the associated ReadableStream.
|
|
2797
|
+
*
|
|
2798
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize)
|
|
2799
|
+
*/
|
|
2343
2800
|
get desiredSize(): number | null;
|
|
2344
|
-
|
|
2801
|
+
/**
|
|
2802
|
+
* The **`enqueue()`** method of the TransformStreamDefaultController interface enqueues the given chunk in the readable side of the stream.
|
|
2803
|
+
*
|
|
2804
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue)
|
|
2805
|
+
*/
|
|
2345
2806
|
enqueue(chunk?: O): void;
|
|
2346
|
-
|
|
2807
|
+
/**
|
|
2808
|
+
* The **`error()`** method of the TransformStreamDefaultController interface errors both sides of the stream.
|
|
2809
|
+
*
|
|
2810
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error)
|
|
2811
|
+
*/
|
|
2347
2812
|
error(reason: any): void;
|
|
2348
|
-
|
|
2813
|
+
/**
|
|
2814
|
+
* The **`terminate()`** method of the TransformStreamDefaultController interface closes the readable side and errors the writable side of the stream.
|
|
2815
|
+
*
|
|
2816
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate)
|
|
2817
|
+
*/
|
|
2349
2818
|
terminate(): void;
|
|
2350
2819
|
}
|
|
2351
2820
|
interface ReadableWritablePair<R = any, W = any> {
|
|
@@ -2358,7 +2827,7 @@ interface ReadableWritablePair<R = any, W = any> {
|
|
|
2358
2827
|
readable: ReadableStream<R>;
|
|
2359
2828
|
}
|
|
2360
2829
|
/**
|
|
2361
|
-
*
|
|
2830
|
+
* The **`WritableStream`** interface of the Streams API provides a standard abstraction for writing streaming data to a destination, known as a sink.
|
|
2362
2831
|
*
|
|
2363
2832
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
|
|
2364
2833
|
*/
|
|
@@ -2367,47 +2836,103 @@ declare class WritableStream<W = any> {
|
|
|
2367
2836
|
underlyingSink?: UnderlyingSink,
|
|
2368
2837
|
queuingStrategy?: QueuingStrategy,
|
|
2369
2838
|
);
|
|
2370
|
-
|
|
2839
|
+
/**
|
|
2840
|
+
* The **`locked`** read-only property of the WritableStream interface returns a boolean indicating whether the `WritableStream` is locked to a writer.
|
|
2841
|
+
*
|
|
2842
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked)
|
|
2843
|
+
*/
|
|
2371
2844
|
readonly locked: boolean;
|
|
2372
|
-
|
|
2845
|
+
/**
|
|
2846
|
+
* 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.
|
|
2847
|
+
*
|
|
2848
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort)
|
|
2849
|
+
*/
|
|
2373
2850
|
abort(reason?: any): Promise<void>;
|
|
2374
|
-
|
|
2851
|
+
/**
|
|
2852
|
+
* The **`close()`** method of the WritableStream interface closes the associated stream.
|
|
2853
|
+
*
|
|
2854
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close)
|
|
2855
|
+
*/
|
|
2375
2856
|
close(): Promise<void>;
|
|
2376
|
-
|
|
2857
|
+
/**
|
|
2858
|
+
* The **`getWriter()`** method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance.
|
|
2859
|
+
*
|
|
2860
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter)
|
|
2861
|
+
*/
|
|
2377
2862
|
getWriter(): WritableStreamDefaultWriter<W>;
|
|
2378
2863
|
}
|
|
2379
2864
|
/**
|
|
2380
|
-
*
|
|
2865
|
+
* 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.
|
|
2381
2866
|
*
|
|
2382
2867
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
|
|
2383
2868
|
*/
|
|
2384
2869
|
declare class WritableStreamDefaultWriter<W = any> {
|
|
2385
2870
|
constructor(stream: WritableStream);
|
|
2386
|
-
|
|
2871
|
+
/**
|
|
2872
|
+
* The **`closed`** read-only property of the the stream errors or the writer's lock is released.
|
|
2873
|
+
*
|
|
2874
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed)
|
|
2875
|
+
*/
|
|
2387
2876
|
readonly closed: Promise<void>;
|
|
2388
|
-
|
|
2877
|
+
/**
|
|
2878
|
+
* 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.
|
|
2879
|
+
*
|
|
2880
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready)
|
|
2881
|
+
*/
|
|
2389
2882
|
readonly ready: Promise<void>;
|
|
2390
|
-
|
|
2883
|
+
/**
|
|
2884
|
+
* The **`desiredSize`** read-only property of the to fill the stream's internal queue.
|
|
2885
|
+
*
|
|
2886
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize)
|
|
2887
|
+
*/
|
|
2391
2888
|
readonly desiredSize: number | null;
|
|
2392
|
-
|
|
2889
|
+
/**
|
|
2890
|
+
* 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.
|
|
2891
|
+
*
|
|
2892
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort)
|
|
2893
|
+
*/
|
|
2393
2894
|
abort(reason?: any): Promise<void>;
|
|
2394
|
-
|
|
2895
|
+
/**
|
|
2896
|
+
* The **`close()`** method of the stream.
|
|
2897
|
+
*
|
|
2898
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close)
|
|
2899
|
+
*/
|
|
2395
2900
|
close(): Promise<void>;
|
|
2396
|
-
|
|
2901
|
+
/**
|
|
2902
|
+
* The **`write()`** method of the operation.
|
|
2903
|
+
*
|
|
2904
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write)
|
|
2905
|
+
*/
|
|
2397
2906
|
write(chunk?: W): Promise<void>;
|
|
2398
|
-
|
|
2907
|
+
/**
|
|
2908
|
+
* The **`releaseLock()`** method of the corresponding stream.
|
|
2909
|
+
*
|
|
2910
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock)
|
|
2911
|
+
*/
|
|
2399
2912
|
releaseLock(): void;
|
|
2400
2913
|
}
|
|
2401
|
-
|
|
2914
|
+
/**
|
|
2915
|
+
* The **`TransformStream`** interface of the Streams API represents a concrete implementation of the pipe chain _transform stream_ concept.
|
|
2916
|
+
*
|
|
2917
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream)
|
|
2918
|
+
*/
|
|
2402
2919
|
declare class TransformStream<I = any, O = any> {
|
|
2403
2920
|
constructor(
|
|
2404
2921
|
transformer?: Transformer<I, O>,
|
|
2405
2922
|
writableStrategy?: QueuingStrategy<I>,
|
|
2406
2923
|
readableStrategy?: QueuingStrategy<O>,
|
|
2407
2924
|
);
|
|
2408
|
-
|
|
2925
|
+
/**
|
|
2926
|
+
* The **`readable`** read-only property of the TransformStream interface returns the ReadableStream instance controlled by this `TransformStream`.
|
|
2927
|
+
*
|
|
2928
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable)
|
|
2929
|
+
*/
|
|
2409
2930
|
readonly readable: ReadableStream<O>;
|
|
2410
|
-
|
|
2931
|
+
/**
|
|
2932
|
+
* The **`writable`** read-only property of the TransformStream interface returns the WritableStream instance controlled by this `TransformStream`.
|
|
2933
|
+
*
|
|
2934
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable)
|
|
2935
|
+
*/
|
|
2411
2936
|
readonly writable: WritableStream<I>;
|
|
2412
2937
|
}
|
|
2413
2938
|
declare class FixedLengthStream extends IdentityTransformStream {
|
|
@@ -2428,26 +2953,42 @@ interface IdentityTransformStreamQueuingStrategy {
|
|
|
2428
2953
|
interface ReadableStreamValuesOptions {
|
|
2429
2954
|
preventCancel?: boolean;
|
|
2430
2955
|
}
|
|
2431
|
-
|
|
2956
|
+
/**
|
|
2957
|
+
* The **`CompressionStream`** interface of the Compression Streams API is an API for compressing a stream of data.
|
|
2958
|
+
*
|
|
2959
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream)
|
|
2960
|
+
*/
|
|
2432
2961
|
declare class CompressionStream extends TransformStream<
|
|
2433
2962
|
ArrayBuffer | ArrayBufferView,
|
|
2434
2963
|
Uint8Array
|
|
2435
2964
|
> {
|
|
2436
2965
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2437
2966
|
}
|
|
2438
|
-
|
|
2967
|
+
/**
|
|
2968
|
+
* The **`DecompressionStream`** interface of the Compression Streams API is an API for decompressing a stream of data.
|
|
2969
|
+
*
|
|
2970
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream)
|
|
2971
|
+
*/
|
|
2439
2972
|
declare class DecompressionStream extends TransformStream<
|
|
2440
2973
|
ArrayBuffer | ArrayBufferView,
|
|
2441
2974
|
Uint8Array
|
|
2442
2975
|
> {
|
|
2443
2976
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2444
2977
|
}
|
|
2445
|
-
|
|
2978
|
+
/**
|
|
2979
|
+
* The **`TextEncoderStream`** interface of the Encoding API converts a stream of strings into bytes in the UTF-8 encoding.
|
|
2980
|
+
*
|
|
2981
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream)
|
|
2982
|
+
*/
|
|
2446
2983
|
declare class TextEncoderStream extends TransformStream<string, Uint8Array> {
|
|
2447
2984
|
constructor();
|
|
2448
2985
|
get encoding(): string;
|
|
2449
2986
|
}
|
|
2450
|
-
|
|
2987
|
+
/**
|
|
2988
|
+
* 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.
|
|
2989
|
+
*
|
|
2990
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream)
|
|
2991
|
+
*/
|
|
2451
2992
|
declare class TextDecoderStream extends TransformStream<
|
|
2452
2993
|
ArrayBuffer | ArrayBufferView,
|
|
2453
2994
|
string
|
|
@@ -2462,7 +3003,7 @@ interface TextDecoderStreamTextDecoderStreamInit {
|
|
|
2462
3003
|
ignoreBOM?: boolean;
|
|
2463
3004
|
}
|
|
2464
3005
|
/**
|
|
2465
|
-
*
|
|
3006
|
+
* The **`ByteLengthQueuingStrategy`** interface of the Streams API provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2466
3007
|
*
|
|
2467
3008
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
|
|
2468
3009
|
*/
|
|
@@ -2470,19 +3011,27 @@ declare class ByteLengthQueuingStrategy
|
|
|
2470
3011
|
implements QueuingStrategy<ArrayBufferView>
|
|
2471
3012
|
{
|
|
2472
3013
|
constructor(init: QueuingStrategyInit);
|
|
2473
|
-
|
|
3014
|
+
/**
|
|
3015
|
+
* The read-only **`ByteLengthQueuingStrategy.highWaterMark`** property returns the total number of bytes that can be contained in the internal queue before backpressure is applied.
|
|
3016
|
+
*
|
|
3017
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark)
|
|
3018
|
+
*/
|
|
2474
3019
|
get highWaterMark(): number;
|
|
2475
3020
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
|
|
2476
3021
|
get size(): (chunk?: any) => number;
|
|
2477
3022
|
}
|
|
2478
3023
|
/**
|
|
2479
|
-
*
|
|
3024
|
+
* The **`CountQueuingStrategy`** interface of the Streams API provides a built-in chunk counting queuing strategy that can be used when constructing streams.
|
|
2480
3025
|
*
|
|
2481
3026
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
|
|
2482
3027
|
*/
|
|
2483
3028
|
declare class CountQueuingStrategy implements QueuingStrategy {
|
|
2484
3029
|
constructor(init: QueuingStrategyInit);
|
|
2485
|
-
|
|
3030
|
+
/**
|
|
3031
|
+
* The read-only **`CountQueuingStrategy.highWaterMark`** property returns the total number of chunks that can be contained in the internal queue before backpressure is applied.
|
|
3032
|
+
*
|
|
3033
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark)
|
|
3034
|
+
*/
|
|
2486
3035
|
get highWaterMark(): number;
|
|
2487
3036
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
|
|
2488
3037
|
get size(): (chunk?: any) => number;
|
|
@@ -2615,42 +3164,98 @@ interface UnsafeTraceMetrics {
|
|
|
2615
3164
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
2616
3165
|
}
|
|
2617
3166
|
/**
|
|
2618
|
-
* The URL
|
|
3167
|
+
* The **`URL`** interface is used to parse, construct, normalize, and encode URL.
|
|
2619
3168
|
*
|
|
2620
3169
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
2621
3170
|
*/
|
|
2622
3171
|
declare class URL {
|
|
2623
3172
|
constructor(url: string | URL, base?: string | URL);
|
|
2624
|
-
|
|
3173
|
+
/**
|
|
3174
|
+
* The **`href`** property of the URL interface is a string containing the whole URL.
|
|
3175
|
+
*
|
|
3176
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href)
|
|
3177
|
+
*/
|
|
2625
3178
|
href: string;
|
|
2626
|
-
|
|
3179
|
+
/**
|
|
3180
|
+
* The **`origin`** read-only property of the URL interface returns a string containing the Unicode serialization of the origin of the represented URL.
|
|
3181
|
+
*
|
|
3182
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin)
|
|
3183
|
+
*/
|
|
2627
3184
|
readonly origin: string;
|
|
2628
|
-
|
|
3185
|
+
/**
|
|
3186
|
+
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final `':'`.
|
|
3187
|
+
*
|
|
3188
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
3189
|
+
*/
|
|
2629
3190
|
protocol: string;
|
|
2630
|
-
|
|
3191
|
+
/**
|
|
3192
|
+
* The **`username`** property of the URL interface is a string containing the username component of the URL.
|
|
3193
|
+
*
|
|
3194
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
3195
|
+
*/
|
|
2631
3196
|
username: string;
|
|
2632
|
-
|
|
3197
|
+
/**
|
|
3198
|
+
* The **`password`** property of the URL interface is a string containing the password component of the URL.
|
|
3199
|
+
*
|
|
3200
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
3201
|
+
*/
|
|
2633
3202
|
password: string;
|
|
2634
|
-
|
|
3203
|
+
/**
|
|
3204
|
+
* 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.
|
|
3205
|
+
*
|
|
3206
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
3207
|
+
*/
|
|
2635
3208
|
host: string;
|
|
2636
|
-
|
|
3209
|
+
/**
|
|
3210
|
+
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL.
|
|
3211
|
+
*
|
|
3212
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
3213
|
+
*/
|
|
2637
3214
|
hostname: string;
|
|
2638
|
-
|
|
3215
|
+
/**
|
|
3216
|
+
* The **`port`** property of the URL interface is a string containing the port number of the URL.
|
|
3217
|
+
*
|
|
3218
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
3219
|
+
*/
|
|
2639
3220
|
port: string;
|
|
2640
|
-
|
|
3221
|
+
/**
|
|
3222
|
+
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure.
|
|
3223
|
+
*
|
|
3224
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
3225
|
+
*/
|
|
2641
3226
|
pathname: string;
|
|
2642
|
-
|
|
3227
|
+
/**
|
|
3228
|
+
* 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.
|
|
3229
|
+
*
|
|
3230
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
3231
|
+
*/
|
|
2643
3232
|
search: string;
|
|
2644
|
-
|
|
3233
|
+
/**
|
|
3234
|
+
* The **`searchParams`** read-only property of the access to the [MISSING: httpmethod('GET')] decoded query arguments contained in the URL.
|
|
3235
|
+
*
|
|
3236
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams)
|
|
3237
|
+
*/
|
|
2645
3238
|
readonly searchParams: URLSearchParams;
|
|
2646
|
-
|
|
3239
|
+
/**
|
|
3240
|
+
* The **`hash`** property of the URL interface is a string containing a `'#'` followed by the fragment identifier of the URL.
|
|
3241
|
+
*
|
|
3242
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
3243
|
+
*/
|
|
2647
3244
|
hash: string;
|
|
2648
3245
|
/*function toString() { [native code] }*/
|
|
2649
3246
|
toString(): string;
|
|
2650
|
-
|
|
3247
|
+
/**
|
|
3248
|
+
* 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.
|
|
3249
|
+
*
|
|
3250
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON)
|
|
3251
|
+
*/
|
|
2651
3252
|
toJSON(): string;
|
|
2652
3253
|
}
|
|
2653
|
-
|
|
3254
|
+
/**
|
|
3255
|
+
* The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL.
|
|
3256
|
+
*
|
|
3257
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams)
|
|
3258
|
+
*/
|
|
2654
3259
|
declare class URLSearchParams {
|
|
2655
3260
|
constructor(
|
|
2656
3261
|
init?:
|
|
@@ -2659,45 +3264,53 @@ declare class URLSearchParams {
|
|
|
2659
3264
|
| Record<string, string>
|
|
2660
3265
|
| [key: string, value: string][],
|
|
2661
3266
|
);
|
|
2662
|
-
|
|
3267
|
+
/**
|
|
3268
|
+
* The **`size`** read-only property of the URLSearchParams interface indicates the total number of search parameter entries.
|
|
3269
|
+
*
|
|
3270
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size)
|
|
3271
|
+
*/
|
|
2663
3272
|
get size(): number;
|
|
2664
3273
|
/**
|
|
2665
|
-
*
|
|
3274
|
+
* The **`append()`** method of the URLSearchParams interface appends a specified key/value pair as a new search parameter.
|
|
2666
3275
|
*
|
|
2667
3276
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
|
|
2668
3277
|
*/
|
|
2669
3278
|
append(name: string, value: string): void;
|
|
2670
3279
|
/**
|
|
2671
|
-
*
|
|
3280
|
+
* The **`delete()`** method of the URLSearchParams interface deletes specified parameters and their associated value(s) from the list of all search parameters.
|
|
2672
3281
|
*
|
|
2673
3282
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
2674
3283
|
*/
|
|
2675
3284
|
delete(name: string): void;
|
|
2676
3285
|
/**
|
|
2677
|
-
*
|
|
3286
|
+
* The **`get()`** method of the URLSearchParams interface returns the first value associated to the given search parameter.
|
|
2678
3287
|
*
|
|
2679
3288
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
|
|
2680
3289
|
*/
|
|
2681
3290
|
get(name: string): string | null;
|
|
2682
3291
|
/**
|
|
2683
|
-
*
|
|
3292
|
+
* The **`getAll()`** method of the URLSearchParams interface returns all the values associated with a given search parameter as an array.
|
|
2684
3293
|
*
|
|
2685
3294
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
|
|
2686
3295
|
*/
|
|
2687
3296
|
getAll(name: string): string[];
|
|
2688
3297
|
/**
|
|
2689
|
-
*
|
|
3298
|
+
* The **`has()`** method of the URLSearchParams interface returns a boolean value that indicates whether the specified parameter is in the search parameters.
|
|
2690
3299
|
*
|
|
2691
3300
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
|
|
2692
3301
|
*/
|
|
2693
3302
|
has(name: string): boolean;
|
|
2694
3303
|
/**
|
|
2695
|
-
*
|
|
3304
|
+
* The **`set()`** method of the URLSearchParams interface sets the value associated with a given search parameter to the given value.
|
|
2696
3305
|
*
|
|
2697
3306
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
2698
3307
|
*/
|
|
2699
3308
|
set(name: string, value: string): void;
|
|
2700
|
-
|
|
3309
|
+
/**
|
|
3310
|
+
* The **`URLSearchParams.sort()`** method sorts all key/value pairs contained in this object in place and returns `undefined`.
|
|
3311
|
+
*
|
|
3312
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort)
|
|
3313
|
+
*/
|
|
2701
3314
|
sort(): void;
|
|
2702
3315
|
/* Returns an array of key, value pairs for every entry in the search params. */
|
|
2703
3316
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
@@ -2714,7 +3327,7 @@ declare class URLSearchParams {
|
|
|
2714
3327
|
) => void,
|
|
2715
3328
|
thisArg?: This,
|
|
2716
3329
|
): void;
|
|
2717
|
-
/*function toString() { [native code] }
|
|
3330
|
+
/*function toString() { [native code] }*/
|
|
2718
3331
|
toString(): string;
|
|
2719
3332
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
2720
3333
|
}
|
|
@@ -2768,26 +3381,26 @@ interface URLPatternOptions {
|
|
|
2768
3381
|
ignoreCase?: boolean;
|
|
2769
3382
|
}
|
|
2770
3383
|
/**
|
|
2771
|
-
* A CloseEvent is sent to clients using WebSockets when the connection is closed.
|
|
3384
|
+
* A `CloseEvent` is sent to clients using WebSockets when the connection is closed.
|
|
2772
3385
|
*
|
|
2773
3386
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
|
|
2774
3387
|
*/
|
|
2775
3388
|
declare class CloseEvent extends Event {
|
|
2776
3389
|
constructor(type: string, initializer?: CloseEventInit);
|
|
2777
3390
|
/**
|
|
2778
|
-
*
|
|
3391
|
+
* The **`code`** read-only property of the CloseEvent interface returns a WebSocket connection close code indicating the reason the connection was closed.
|
|
2779
3392
|
*
|
|
2780
3393
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/code)
|
|
2781
3394
|
*/
|
|
2782
3395
|
readonly code: number;
|
|
2783
3396
|
/**
|
|
2784
|
-
*
|
|
3397
|
+
* 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.
|
|
2785
3398
|
*
|
|
2786
3399
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/reason)
|
|
2787
3400
|
*/
|
|
2788
3401
|
readonly reason: string;
|
|
2789
3402
|
/**
|
|
2790
|
-
*
|
|
3403
|
+
* The **`wasClean`** read-only property of the CloseEvent interface returns `true` if the connection closed cleanly.
|
|
2791
3404
|
*
|
|
2792
3405
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/wasClean)
|
|
2793
3406
|
*/
|
|
@@ -2805,7 +3418,7 @@ type WebSocketEventMap = {
|
|
|
2805
3418
|
error: ErrorEvent;
|
|
2806
3419
|
};
|
|
2807
3420
|
/**
|
|
2808
|
-
*
|
|
3421
|
+
* 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.
|
|
2809
3422
|
*
|
|
2810
3423
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2811
3424
|
*/
|
|
@@ -2822,20 +3435,20 @@ declare var WebSocket: {
|
|
|
2822
3435
|
readonly CLOSED: number;
|
|
2823
3436
|
};
|
|
2824
3437
|
/**
|
|
2825
|
-
*
|
|
3438
|
+
* 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.
|
|
2826
3439
|
*
|
|
2827
3440
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2828
3441
|
*/
|
|
2829
3442
|
interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
2830
3443
|
accept(): void;
|
|
2831
3444
|
/**
|
|
2832
|
-
*
|
|
3445
|
+
* 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.
|
|
2833
3446
|
*
|
|
2834
3447
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/send)
|
|
2835
3448
|
*/
|
|
2836
3449
|
send(message: (ArrayBuffer | ArrayBufferView) | string): void;
|
|
2837
3450
|
/**
|
|
2838
|
-
*
|
|
3451
|
+
* The **`WebSocket.close()`** method closes the already `CLOSED`, this method does nothing.
|
|
2839
3452
|
*
|
|
2840
3453
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/close)
|
|
2841
3454
|
*/
|
|
@@ -2843,25 +3456,25 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
2843
3456
|
serializeAttachment(attachment: any): void;
|
|
2844
3457
|
deserializeAttachment(): any | null;
|
|
2845
3458
|
/**
|
|
2846
|
-
*
|
|
3459
|
+
* The **`WebSocket.readyState`** read-only property returns the current state of the WebSocket connection.
|
|
2847
3460
|
*
|
|
2848
3461
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/readyState)
|
|
2849
3462
|
*/
|
|
2850
3463
|
readonly readyState: number;
|
|
2851
3464
|
/**
|
|
2852
|
-
*
|
|
3465
|
+
* The **`WebSocket.url`** read-only property returns the absolute URL of the WebSocket as resolved by the constructor.
|
|
2853
3466
|
*
|
|
2854
3467
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/url)
|
|
2855
3468
|
*/
|
|
2856
3469
|
readonly url: string | null;
|
|
2857
3470
|
/**
|
|
2858
|
-
*
|
|
3471
|
+
* 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.
|
|
2859
3472
|
*
|
|
2860
3473
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/protocol)
|
|
2861
3474
|
*/
|
|
2862
3475
|
readonly protocol: string | null;
|
|
2863
3476
|
/**
|
|
2864
|
-
*
|
|
3477
|
+
* The **`WebSocket.extensions`** read-only property returns the extensions selected by the server.
|
|
2865
3478
|
*
|
|
2866
3479
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
2867
3480
|
*/
|
|
@@ -2930,29 +3543,33 @@ interface SocketInfo {
|
|
|
2930
3543
|
remoteAddress?: string;
|
|
2931
3544
|
localAddress?: string;
|
|
2932
3545
|
}
|
|
2933
|
-
|
|
3546
|
+
/**
|
|
3547
|
+
* The **`EventSource`** interface is web content's interface to server-sent events.
|
|
3548
|
+
*
|
|
3549
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource)
|
|
3550
|
+
*/
|
|
2934
3551
|
declare class EventSource extends EventTarget {
|
|
2935
3552
|
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
2936
3553
|
/**
|
|
2937
|
-
*
|
|
3554
|
+
* The **`close()`** method of the EventSource interface closes the connection, if one is made, and sets the ```js-nolint close() ``` None.
|
|
2938
3555
|
*
|
|
2939
3556
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close)
|
|
2940
3557
|
*/
|
|
2941
3558
|
close(): void;
|
|
2942
3559
|
/**
|
|
2943
|
-
*
|
|
3560
|
+
* The **`url`** read-only property of the URL of the source.
|
|
2944
3561
|
*
|
|
2945
3562
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url)
|
|
2946
3563
|
*/
|
|
2947
3564
|
get url(): string;
|
|
2948
3565
|
/**
|
|
2949
|
-
*
|
|
3566
|
+
* The **`withCredentials`** read-only property of the the `EventSource` object was instantiated with CORS credentials set.
|
|
2950
3567
|
*
|
|
2951
3568
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials)
|
|
2952
3569
|
*/
|
|
2953
3570
|
get withCredentials(): boolean;
|
|
2954
3571
|
/**
|
|
2955
|
-
*
|
|
3572
|
+
* The **`readyState`** read-only property of the connection.
|
|
2956
3573
|
*
|
|
2957
3574
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
2958
3575
|
*/
|
|
@@ -2985,22 +3602,22 @@ interface Container {
|
|
|
2985
3602
|
destroy(error?: any): Promise<void>;
|
|
2986
3603
|
signal(signo: number): void;
|
|
2987
3604
|
getTcpPort(port: number): Fetcher;
|
|
3605
|
+
setInactivityTimeout(durationMs: number | bigint): Promise<void>;
|
|
2988
3606
|
}
|
|
2989
3607
|
interface ContainerStartupOptions {
|
|
2990
3608
|
entrypoint?: string[];
|
|
2991
3609
|
enableInternet: boolean;
|
|
2992
3610
|
env?: Record<string, string>;
|
|
3611
|
+
hardTimeout?: number | bigint;
|
|
2993
3612
|
}
|
|
2994
3613
|
/**
|
|
2995
|
-
*
|
|
3614
|
+
* 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.
|
|
2996
3615
|
*
|
|
2997
3616
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort)
|
|
2998
3617
|
*/
|
|
2999
3618
|
interface MessagePort extends EventTarget {
|
|
3000
3619
|
/**
|
|
3001
|
-
*
|
|
3002
|
-
*
|
|
3003
|
-
* Throws a "DataCloneError" DOMException if transfer contains duplicate objects or port, or if message could not be cloned.
|
|
3620
|
+
* The **`postMessage()`** method of the transfers ownership of objects to other browsing contexts.
|
|
3004
3621
|
*
|
|
3005
3622
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/postMessage)
|
|
3006
3623
|
*/
|
|
@@ -3009,13 +3626,13 @@ interface MessagePort extends EventTarget {
|
|
|
3009
3626
|
options?: any[] | MessagePortPostMessageOptions,
|
|
3010
3627
|
): void;
|
|
3011
3628
|
/**
|
|
3012
|
-
*
|
|
3629
|
+
* The **`close()`** method of the MessagePort interface disconnects the port, so it is no longer active.
|
|
3013
3630
|
*
|
|
3014
3631
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/close)
|
|
3015
3632
|
*/
|
|
3016
3633
|
close(): void;
|
|
3017
3634
|
/**
|
|
3018
|
-
*
|
|
3635
|
+
* The **`start()`** method of the MessagePort interface starts the sending of messages queued on the port.
|
|
3019
3636
|
*
|
|
3020
3637
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/start)
|
|
3021
3638
|
*/
|
|
@@ -3086,6 +3703,7 @@ interface WorkerLoaderModule {
|
|
|
3086
3703
|
data?: ArrayBuffer;
|
|
3087
3704
|
json?: any;
|
|
3088
3705
|
py?: string;
|
|
3706
|
+
wasm?: ArrayBuffer;
|
|
3089
3707
|
}
|
|
3090
3708
|
interface WorkerLoaderWorkerCode {
|
|
3091
3709
|
compatibilityDate: string;
|
|
@@ -6870,6 +7488,10 @@ type AutoRagSearchRequest = {
|
|
|
6870
7488
|
ranker?: string;
|
|
6871
7489
|
score_threshold?: number;
|
|
6872
7490
|
};
|
|
7491
|
+
reranking?: {
|
|
7492
|
+
enabled?: boolean;
|
|
7493
|
+
model?: string;
|
|
7494
|
+
};
|
|
6873
7495
|
rewrite_query?: boolean;
|
|
6874
7496
|
};
|
|
6875
7497
|
type AutoRagAiSearchRequest = AutoRagSearchRequest & {
|
|
@@ -8814,6 +9436,11 @@ declare namespace CloudflareWorkersModule {
|
|
|
8814
9436
|
constructor(ctx: ExecutionContext, env: Env);
|
|
8815
9437
|
fetch?(request: Request): Response | Promise<Response>;
|
|
8816
9438
|
tail?(events: TraceItem[]): void | Promise<void>;
|
|
9439
|
+
tailStream?(
|
|
9440
|
+
event: TailStream.TailEvent<TailStream.Onset>,
|
|
9441
|
+
):
|
|
9442
|
+
| TailStream.TailEventHandlerType
|
|
9443
|
+
| Promise<TailStream.TailEventHandlerType>;
|
|
8817
9444
|
trace?(traces: TraceItem[]): void | Promise<void>;
|
|
8818
9445
|
scheduled?(controller: ScheduledController): void | Promise<void>;
|
|
8819
9446
|
queue?(batch: MessageBatch<unknown>): void | Promise<void>;
|
|
@@ -9202,7 +9829,14 @@ interface VectorizeError {
|
|
|
9202
9829
|
*
|
|
9203
9830
|
* This list is expected to grow as support for more operations are released.
|
|
9204
9831
|
*/
|
|
9205
|
-
type VectorizeVectorMetadataFilterOp =
|
|
9832
|
+
type VectorizeVectorMetadataFilterOp =
|
|
9833
|
+
| "$eq"
|
|
9834
|
+
| "$ne"
|
|
9835
|
+
| "$lt"
|
|
9836
|
+
| "$lte"
|
|
9837
|
+
| "$gt"
|
|
9838
|
+
| "$gte";
|
|
9839
|
+
type VectorizeVectorMetadataFilterCollectionOp = "$in" | "$nin";
|
|
9206
9840
|
/**
|
|
9207
9841
|
* Filter criteria for vector metadata used to limit the retrieved query result set.
|
|
9208
9842
|
*/
|
|
@@ -9215,6 +9849,12 @@ type VectorizeVectorMetadataFilter = {
|
|
|
9215
9849
|
VectorizeVectorMetadataValue,
|
|
9216
9850
|
string[]
|
|
9217
9851
|
> | null;
|
|
9852
|
+
}
|
|
9853
|
+
| {
|
|
9854
|
+
[Op in VectorizeVectorMetadataFilterCollectionOp]?: Exclude<
|
|
9855
|
+
VectorizeVectorMetadataValue,
|
|
9856
|
+
string[]
|
|
9857
|
+
>[];
|
|
9218
9858
|
};
|
|
9219
9859
|
};
|
|
9220
9860
|
/**
|