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