@cloudflare/workers-types 4.20251014.0 → 4.20251106.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/2021-11-03/index.d.ts +926 -286
- package/2021-11-03/index.ts +926 -286
- package/2022-01-31/index.d.ts +977 -296
- package/2022-01-31/index.ts +977 -296
- package/2022-03-21/index.d.ts +977 -296
- package/2022-03-21/index.ts +977 -296
- package/2022-08-04/index.d.ts +977 -296
- package/2022-08-04/index.ts +977 -296
- package/2022-10-31/index.d.ts +997 -300
- package/2022-10-31/index.ts +997 -300
- package/2022-11-30/index.d.ts +997 -300
- package/2022-11-30/index.ts +997 -300
- package/2023-03-01/index.d.ts +1002 -301
- package/2023-03-01/index.ts +1002 -301
- package/2023-07-01/index.d.ts +1002 -301
- package/2023-07-01/index.ts +1002 -301
- package/experimental/index.d.ts +1291 -366
- package/experimental/index.ts +1291 -366
- package/index.d.ts +926 -286
- package/index.ts +926 -286
- package/latest/index.d.ts +1008 -305
- package/latest/index.ts +1008 -305
- package/oldest/index.d.ts +926 -286
- package/oldest/index.ts +926 -286
- package/package.json +1 -1
package/2022-01-31/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,116 +731,120 @@ 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
|
get 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
|
get 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
|
get 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
|
get 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
|
get 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
|
get 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
|
get 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
|
get currentTarget(): EventTarget | undefined;
|
|
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
|
get target(): EventTarget | undefined;
|
|
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
|
get srcElement(): EventTarget | undefined;
|
|
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
|
get 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
|
get 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
|
get cancelBubble(): boolean;
|
|
740
821
|
/**
|
|
822
|
+
* The **`cancelBubble`** property of the Event interface is deprecated.
|
|
741
823
|
* @deprecated
|
|
742
824
|
*
|
|
743
825
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)
|
|
744
826
|
*/
|
|
745
827
|
set cancelBubble(value: boolean);
|
|
746
828
|
/**
|
|
747
|
-
*
|
|
829
|
+
* 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.
|
|
748
830
|
*
|
|
749
831
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)
|
|
750
832
|
*/
|
|
751
833
|
stopImmediatePropagation(): void;
|
|
752
834
|
/**
|
|
753
|
-
*
|
|
835
|
+
* 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.
|
|
754
836
|
*
|
|
755
837
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)
|
|
756
838
|
*/
|
|
757
839
|
preventDefault(): void;
|
|
758
840
|
/**
|
|
759
|
-
*
|
|
841
|
+
* The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.
|
|
760
842
|
*
|
|
761
843
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)
|
|
762
844
|
*/
|
|
763
845
|
stopPropagation(): void;
|
|
764
846
|
/**
|
|
765
|
-
*
|
|
847
|
+
* 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.
|
|
766
848
|
*
|
|
767
849
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)
|
|
768
850
|
*/
|
|
@@ -787,7 +869,7 @@ export type EventListenerOrEventListenerObject<
|
|
|
787
869
|
EventType extends Event = Event,
|
|
788
870
|
> = EventListener<EventType> | EventListenerObject<EventType>;
|
|
789
871
|
/**
|
|
790
|
-
* EventTarget is
|
|
872
|
+
* The **`EventTarget`** interface is implemented by objects that can receive events and may have listeners for them.
|
|
791
873
|
*
|
|
792
874
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
|
|
793
875
|
*/
|
|
@@ -796,19 +878,7 @@ export declare class EventTarget<
|
|
|
796
878
|
> {
|
|
797
879
|
constructor();
|
|
798
880
|
/**
|
|
799
|
-
*
|
|
800
|
-
*
|
|
801
|
-
* 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.
|
|
802
|
-
*
|
|
803
|
-
* 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.
|
|
804
|
-
*
|
|
805
|
-
* 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.
|
|
806
|
-
*
|
|
807
|
-
* When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
|
|
808
|
-
*
|
|
809
|
-
* If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
|
|
810
|
-
*
|
|
811
|
-
* The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
|
|
881
|
+
* The **`addEventListener()`** method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
|
|
812
882
|
*
|
|
813
883
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
|
|
814
884
|
*/
|
|
@@ -818,7 +888,7 @@ export declare class EventTarget<
|
|
|
818
888
|
options?: EventTargetAddEventListenerOptions | boolean,
|
|
819
889
|
): void;
|
|
820
890
|
/**
|
|
821
|
-
*
|
|
891
|
+
* The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.
|
|
822
892
|
*
|
|
823
893
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
|
|
824
894
|
*/
|
|
@@ -828,7 +898,7 @@ export declare class EventTarget<
|
|
|
828
898
|
options?: EventTargetEventListenerOptions | boolean,
|
|
829
899
|
): void;
|
|
830
900
|
/**
|
|
831
|
-
*
|
|
901
|
+
* The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
|
|
832
902
|
*
|
|
833
903
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
|
|
834
904
|
*/
|
|
@@ -847,50 +917,70 @@ export interface EventTargetHandlerObject {
|
|
|
847
917
|
handleEvent: (event: Event) => any | undefined;
|
|
848
918
|
}
|
|
849
919
|
/**
|
|
850
|
-
*
|
|
920
|
+
* The **`AbortController`** interface represents a controller object that allows you to abort one or more Web requests as and when desired.
|
|
851
921
|
*
|
|
852
922
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController)
|
|
853
923
|
*/
|
|
854
924
|
export declare class AbortController {
|
|
855
925
|
constructor();
|
|
856
926
|
/**
|
|
857
|
-
*
|
|
927
|
+
* 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.
|
|
858
928
|
*
|
|
859
929
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/signal)
|
|
860
930
|
*/
|
|
861
931
|
get signal(): AbortSignal;
|
|
862
932
|
/**
|
|
863
|
-
*
|
|
933
|
+
* The **`abort()`** method of the AbortController interface aborts an asynchronous operation before it has completed.
|
|
864
934
|
*
|
|
865
935
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/abort)
|
|
866
936
|
*/
|
|
867
937
|
abort(reason?: any): void;
|
|
868
938
|
}
|
|
869
939
|
/**
|
|
870
|
-
*
|
|
940
|
+
* 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.
|
|
871
941
|
*
|
|
872
942
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal)
|
|
873
943
|
*/
|
|
874
944
|
export declare abstract class AbortSignal extends EventTarget {
|
|
875
|
-
|
|
945
|
+
/**
|
|
946
|
+
* The **`AbortSignal.abort()`** static method returns an AbortSignal that is already set as aborted (and which does not trigger an AbortSignal/abort_event event).
|
|
947
|
+
*
|
|
948
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static)
|
|
949
|
+
*/
|
|
876
950
|
static abort(reason?: any): AbortSignal;
|
|
877
|
-
|
|
951
|
+
/**
|
|
952
|
+
* The **`AbortSignal.timeout()`** static method returns an AbortSignal that will automatically abort after a specified time.
|
|
953
|
+
*
|
|
954
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static)
|
|
955
|
+
*/
|
|
878
956
|
static timeout(delay: number): AbortSignal;
|
|
879
|
-
|
|
957
|
+
/**
|
|
958
|
+
* The **`AbortSignal.any()`** static method takes an iterable of abort signals and returns an AbortSignal.
|
|
959
|
+
*
|
|
960
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static)
|
|
961
|
+
*/
|
|
880
962
|
static any(signals: AbortSignal[]): AbortSignal;
|
|
881
963
|
/**
|
|
882
|
-
*
|
|
964
|
+
* 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`).
|
|
883
965
|
*
|
|
884
966
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
|
|
885
967
|
*/
|
|
886
968
|
get aborted(): boolean;
|
|
887
|
-
|
|
969
|
+
/**
|
|
970
|
+
* The **`reason`** read-only property returns a JavaScript value that indicates the abort reason.
|
|
971
|
+
*
|
|
972
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason)
|
|
973
|
+
*/
|
|
888
974
|
get reason(): any;
|
|
889
975
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
890
976
|
get onabort(): any | null;
|
|
891
977
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
892
978
|
set onabort(value: any | null);
|
|
893
|
-
|
|
979
|
+
/**
|
|
980
|
+
* The **`throwIfAborted()`** method throws the signal's abort AbortSignal.reason if the signal has been aborted; otherwise it does nothing.
|
|
981
|
+
*
|
|
982
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted)
|
|
983
|
+
*/
|
|
894
984
|
throwIfAborted(): void;
|
|
895
985
|
}
|
|
896
986
|
export interface Scheduler {
|
|
@@ -900,19 +990,27 @@ export interface SchedulerWaitOptions {
|
|
|
900
990
|
signal?: AbortSignal;
|
|
901
991
|
}
|
|
902
992
|
/**
|
|
903
|
-
*
|
|
993
|
+
* The **`ExtendableEvent`** interface extends the lifetime of the `install` and `activate` events dispatched on the global scope as part of the service worker lifecycle.
|
|
904
994
|
*
|
|
905
995
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent)
|
|
906
996
|
*/
|
|
907
997
|
export declare abstract class ExtendableEvent extends Event {
|
|
908
|
-
|
|
998
|
+
/**
|
|
999
|
+
* The **`ExtendableEvent.waitUntil()`** method tells the event dispatcher that work is ongoing.
|
|
1000
|
+
*
|
|
1001
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil)
|
|
1002
|
+
*/
|
|
909
1003
|
waitUntil(promise: Promise<any>): void;
|
|
910
1004
|
}
|
|
911
|
-
|
|
1005
|
+
/**
|
|
1006
|
+
* The **`CustomEvent`** interface represents events initialized by an application for any purpose.
|
|
1007
|
+
*
|
|
1008
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent)
|
|
1009
|
+
*/
|
|
912
1010
|
export declare class CustomEvent<T = any> extends Event {
|
|
913
1011
|
constructor(type: string, init?: CustomEventCustomEventInit);
|
|
914
1012
|
/**
|
|
915
|
-
*
|
|
1013
|
+
* The read-only **`detail`** property of the CustomEvent interface returns any data passed when initializing the event.
|
|
916
1014
|
*
|
|
917
1015
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent/detail)
|
|
918
1016
|
*/
|
|
@@ -925,7 +1023,7 @@ export interface CustomEventCustomEventInit {
|
|
|
925
1023
|
detail?: any;
|
|
926
1024
|
}
|
|
927
1025
|
/**
|
|
928
|
-
*
|
|
1026
|
+
* 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.
|
|
929
1027
|
*
|
|
930
1028
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob)
|
|
931
1029
|
*/
|
|
@@ -934,26 +1032,54 @@ export declare class Blob {
|
|
|
934
1032
|
type?: ((ArrayBuffer | ArrayBufferView) | string | Blob)[],
|
|
935
1033
|
options?: BlobOptions,
|
|
936
1034
|
);
|
|
937
|
-
|
|
1035
|
+
/**
|
|
1036
|
+
* The **`size`** read-only property of the Blob interface returns the size of the Blob or File in bytes.
|
|
1037
|
+
*
|
|
1038
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size)
|
|
1039
|
+
*/
|
|
938
1040
|
get size(): number;
|
|
939
|
-
|
|
1041
|
+
/**
|
|
1042
|
+
* The **`type`** read-only property of the Blob interface returns the MIME type of the file.
|
|
1043
|
+
*
|
|
1044
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type)
|
|
1045
|
+
*/
|
|
940
1046
|
get type(): string;
|
|
941
|
-
|
|
1047
|
+
/**
|
|
1048
|
+
* 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.
|
|
1049
|
+
*
|
|
1050
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice)
|
|
1051
|
+
*/
|
|
942
1052
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
943
|
-
|
|
1053
|
+
/**
|
|
1054
|
+
* 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.
|
|
1055
|
+
*
|
|
1056
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer)
|
|
1057
|
+
*/
|
|
944
1058
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
945
|
-
|
|
1059
|
+
/**
|
|
1060
|
+
* 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.
|
|
1061
|
+
*
|
|
1062
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/bytes)
|
|
1063
|
+
*/
|
|
946
1064
|
bytes(): Promise<Uint8Array>;
|
|
947
|
-
|
|
1065
|
+
/**
|
|
1066
|
+
* The **`text()`** method of the string containing the contents of the blob, interpreted as UTF-8.
|
|
1067
|
+
*
|
|
1068
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text)
|
|
1069
|
+
*/
|
|
948
1070
|
text(): Promise<string>;
|
|
949
|
-
|
|
1071
|
+
/**
|
|
1072
|
+
* The **`stream()`** method of the Blob interface returns a ReadableStream which upon reading returns the data contained within the `Blob`.
|
|
1073
|
+
*
|
|
1074
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream)
|
|
1075
|
+
*/
|
|
950
1076
|
stream(): ReadableStream;
|
|
951
1077
|
}
|
|
952
1078
|
export interface BlobOptions {
|
|
953
1079
|
type?: string;
|
|
954
1080
|
}
|
|
955
1081
|
/**
|
|
956
|
-
*
|
|
1082
|
+
* The **`File`** interface provides information about files and allows JavaScript in a web page to access their content.
|
|
957
1083
|
*
|
|
958
1084
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File)
|
|
959
1085
|
*/
|
|
@@ -963,9 +1089,17 @@ export declare class File extends Blob {
|
|
|
963
1089
|
name: string,
|
|
964
1090
|
options?: FileOptions,
|
|
965
1091
|
);
|
|
966
|
-
|
|
1092
|
+
/**
|
|
1093
|
+
* The **`name`** read-only property of the File interface returns the name of the file represented by a File object.
|
|
1094
|
+
*
|
|
1095
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name)
|
|
1096
|
+
*/
|
|
967
1097
|
get name(): string;
|
|
968
|
-
|
|
1098
|
+
/**
|
|
1099
|
+
* 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).
|
|
1100
|
+
*
|
|
1101
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified)
|
|
1102
|
+
*/
|
|
969
1103
|
get lastModified(): number;
|
|
970
1104
|
}
|
|
971
1105
|
export interface FileOptions {
|
|
@@ -978,7 +1112,11 @@ export interface FileOptions {
|
|
|
978
1112
|
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
979
1113
|
*/
|
|
980
1114
|
export declare abstract class CacheStorage {
|
|
981
|
-
|
|
1115
|
+
/**
|
|
1116
|
+
* The **`open()`** method of the the Cache object matching the `cacheName`.
|
|
1117
|
+
*
|
|
1118
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open)
|
|
1119
|
+
*/
|
|
982
1120
|
open(cacheName: string): Promise<Cache>;
|
|
983
1121
|
readonly default: Cache;
|
|
984
1122
|
}
|
|
@@ -1014,12 +1152,17 @@ export interface CacheQueryOptions {
|
|
|
1014
1152
|
*/
|
|
1015
1153
|
export declare abstract class Crypto {
|
|
1016
1154
|
/**
|
|
1155
|
+
* The **`Crypto.subtle`** read-only property returns a cryptographic operations.
|
|
1017
1156
|
* Available only in secure contexts.
|
|
1018
1157
|
*
|
|
1019
1158
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
|
|
1020
1159
|
*/
|
|
1021
1160
|
get subtle(): SubtleCrypto;
|
|
1022
|
-
|
|
1161
|
+
/**
|
|
1162
|
+
* The **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.
|
|
1163
|
+
*
|
|
1164
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues)
|
|
1165
|
+
*/
|
|
1023
1166
|
getRandomValues<
|
|
1024
1167
|
T extends
|
|
1025
1168
|
| Int8Array
|
|
@@ -1032,6 +1175,7 @@ export declare abstract class Crypto {
|
|
|
1032
1175
|
| BigUint64Array,
|
|
1033
1176
|
>(buffer: T): T;
|
|
1034
1177
|
/**
|
|
1178
|
+
* The **`randomUUID()`** method of the Crypto interface is used to generate a v4 UUID using a cryptographically secure random number generator.
|
|
1035
1179
|
* Available only in secure contexts.
|
|
1036
1180
|
*
|
|
1037
1181
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/randomUUID)
|
|
@@ -1040,49 +1184,77 @@ export declare abstract class Crypto {
|
|
|
1040
1184
|
DigestStream: typeof DigestStream;
|
|
1041
1185
|
}
|
|
1042
1186
|
/**
|
|
1043
|
-
*
|
|
1187
|
+
* The **`SubtleCrypto`** interface of the Web Crypto API provides a number of low-level cryptographic functions.
|
|
1044
1188
|
* Available only in secure contexts.
|
|
1045
1189
|
*
|
|
1046
1190
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto)
|
|
1047
1191
|
*/
|
|
1048
1192
|
export declare abstract class SubtleCrypto {
|
|
1049
|
-
|
|
1193
|
+
/**
|
|
1194
|
+
* The **`encrypt()`** method of the SubtleCrypto interface encrypts data.
|
|
1195
|
+
*
|
|
1196
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt)
|
|
1197
|
+
*/
|
|
1050
1198
|
encrypt(
|
|
1051
1199
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1052
1200
|
key: CryptoKey,
|
|
1053
1201
|
plainText: ArrayBuffer | ArrayBufferView,
|
|
1054
1202
|
): Promise<ArrayBuffer>;
|
|
1055
|
-
|
|
1203
|
+
/**
|
|
1204
|
+
* The **`decrypt()`** method of the SubtleCrypto interface decrypts some encrypted data.
|
|
1205
|
+
*
|
|
1206
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt)
|
|
1207
|
+
*/
|
|
1056
1208
|
decrypt(
|
|
1057
1209
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1058
1210
|
key: CryptoKey,
|
|
1059
1211
|
cipherText: ArrayBuffer | ArrayBufferView,
|
|
1060
1212
|
): Promise<ArrayBuffer>;
|
|
1061
|
-
|
|
1213
|
+
/**
|
|
1214
|
+
* The **`sign()`** method of the SubtleCrypto interface generates a digital signature.
|
|
1215
|
+
*
|
|
1216
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign)
|
|
1217
|
+
*/
|
|
1062
1218
|
sign(
|
|
1063
1219
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
1064
1220
|
key: CryptoKey,
|
|
1065
1221
|
data: ArrayBuffer | ArrayBufferView,
|
|
1066
1222
|
): Promise<ArrayBuffer>;
|
|
1067
|
-
|
|
1223
|
+
/**
|
|
1224
|
+
* The **`verify()`** method of the SubtleCrypto interface verifies a digital signature.
|
|
1225
|
+
*
|
|
1226
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify)
|
|
1227
|
+
*/
|
|
1068
1228
|
verify(
|
|
1069
1229
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
1070
1230
|
key: CryptoKey,
|
|
1071
1231
|
signature: ArrayBuffer | ArrayBufferView,
|
|
1072
1232
|
data: ArrayBuffer | ArrayBufferView,
|
|
1073
1233
|
): Promise<boolean>;
|
|
1074
|
-
|
|
1234
|
+
/**
|
|
1235
|
+
* The **`digest()`** method of the SubtleCrypto interface generates a _digest_ of the given data, using the specified hash function.
|
|
1236
|
+
*
|
|
1237
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest)
|
|
1238
|
+
*/
|
|
1075
1239
|
digest(
|
|
1076
1240
|
algorithm: string | SubtleCryptoHashAlgorithm,
|
|
1077
1241
|
data: ArrayBuffer | ArrayBufferView,
|
|
1078
1242
|
): Promise<ArrayBuffer>;
|
|
1079
|
-
|
|
1243
|
+
/**
|
|
1244
|
+
* The **`generateKey()`** method of the SubtleCrypto interface is used to generate a new key (for symmetric algorithms) or key pair (for public-key algorithms).
|
|
1245
|
+
*
|
|
1246
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey)
|
|
1247
|
+
*/
|
|
1080
1248
|
generateKey(
|
|
1081
1249
|
algorithm: string | SubtleCryptoGenerateKeyAlgorithm,
|
|
1082
1250
|
extractable: boolean,
|
|
1083
1251
|
keyUsages: string[],
|
|
1084
1252
|
): Promise<CryptoKey | CryptoKeyPair>;
|
|
1085
|
-
|
|
1253
|
+
/**
|
|
1254
|
+
* The **`deriveKey()`** method of the SubtleCrypto interface can be used to derive a secret key from a master key.
|
|
1255
|
+
*
|
|
1256
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey)
|
|
1257
|
+
*/
|
|
1086
1258
|
deriveKey(
|
|
1087
1259
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
1088
1260
|
baseKey: CryptoKey,
|
|
@@ -1090,13 +1262,21 @@ export declare abstract class SubtleCrypto {
|
|
|
1090
1262
|
extractable: boolean,
|
|
1091
1263
|
keyUsages: string[],
|
|
1092
1264
|
): Promise<CryptoKey>;
|
|
1093
|
-
|
|
1265
|
+
/**
|
|
1266
|
+
* The **`deriveBits()`** method of the key.
|
|
1267
|
+
*
|
|
1268
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits)
|
|
1269
|
+
*/
|
|
1094
1270
|
deriveBits(
|
|
1095
1271
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
1096
1272
|
baseKey: CryptoKey,
|
|
1097
1273
|
length?: number | null,
|
|
1098
1274
|
): Promise<ArrayBuffer>;
|
|
1099
|
-
|
|
1275
|
+
/**
|
|
1276
|
+
* 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.
|
|
1277
|
+
*
|
|
1278
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey)
|
|
1279
|
+
*/
|
|
1100
1280
|
importKey(
|
|
1101
1281
|
format: string,
|
|
1102
1282
|
keyData: (ArrayBuffer | ArrayBufferView) | JsonWebKey,
|
|
@@ -1104,16 +1284,28 @@ export declare abstract class SubtleCrypto {
|
|
|
1104
1284
|
extractable: boolean,
|
|
1105
1285
|
keyUsages: string[],
|
|
1106
1286
|
): Promise<CryptoKey>;
|
|
1107
|
-
|
|
1287
|
+
/**
|
|
1288
|
+
* 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.
|
|
1289
|
+
*
|
|
1290
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey)
|
|
1291
|
+
*/
|
|
1108
1292
|
exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
1109
|
-
|
|
1293
|
+
/**
|
|
1294
|
+
* The **`wrapKey()`** method of the SubtleCrypto interface 'wraps' a key.
|
|
1295
|
+
*
|
|
1296
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey)
|
|
1297
|
+
*/
|
|
1110
1298
|
wrapKey(
|
|
1111
1299
|
format: string,
|
|
1112
1300
|
key: CryptoKey,
|
|
1113
1301
|
wrappingKey: CryptoKey,
|
|
1114
1302
|
wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1115
1303
|
): Promise<ArrayBuffer>;
|
|
1116
|
-
|
|
1304
|
+
/**
|
|
1305
|
+
* The **`unwrapKey()`** method of the SubtleCrypto interface 'unwraps' a key.
|
|
1306
|
+
*
|
|
1307
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey)
|
|
1308
|
+
*/
|
|
1117
1309
|
unwrapKey(
|
|
1118
1310
|
format: string,
|
|
1119
1311
|
wrappedKey: ArrayBuffer | ArrayBufferView,
|
|
@@ -1129,17 +1321,29 @@ export declare abstract class SubtleCrypto {
|
|
|
1129
1321
|
): boolean;
|
|
1130
1322
|
}
|
|
1131
1323
|
/**
|
|
1132
|
-
* The CryptoKey
|
|
1324
|
+
* 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.
|
|
1133
1325
|
* Available only in secure contexts.
|
|
1134
1326
|
*
|
|
1135
1327
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)
|
|
1136
1328
|
*/
|
|
1137
1329
|
export declare abstract class CryptoKey {
|
|
1138
|
-
|
|
1330
|
+
/**
|
|
1331
|
+
* The read-only **`type`** property of the CryptoKey interface indicates which kind of key is represented by the object.
|
|
1332
|
+
*
|
|
1333
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type)
|
|
1334
|
+
*/
|
|
1139
1335
|
readonly type: string;
|
|
1140
|
-
|
|
1336
|
+
/**
|
|
1337
|
+
* The read-only **`extractable`** property of the CryptoKey interface indicates whether or not the key may be extracted using `SubtleCrypto.exportKey()` or `SubtleCrypto.wrapKey()`.
|
|
1338
|
+
*
|
|
1339
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable)
|
|
1340
|
+
*/
|
|
1141
1341
|
readonly extractable: boolean;
|
|
1142
|
-
|
|
1342
|
+
/**
|
|
1343
|
+
* 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.
|
|
1344
|
+
*
|
|
1345
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm)
|
|
1346
|
+
*/
|
|
1143
1347
|
readonly algorithm:
|
|
1144
1348
|
| CryptoKeyKeyAlgorithm
|
|
1145
1349
|
| CryptoKeyAesKeyAlgorithm
|
|
@@ -1147,7 +1351,11 @@ export declare abstract class CryptoKey {
|
|
|
1147
1351
|
| CryptoKeyRsaKeyAlgorithm
|
|
1148
1352
|
| CryptoKeyEllipticKeyAlgorithm
|
|
1149
1353
|
| CryptoKeyArbitraryKeyAlgorithm;
|
|
1150
|
-
|
|
1354
|
+
/**
|
|
1355
|
+
* The read-only **`usages`** property of the CryptoKey interface indicates what can be done with the key.
|
|
1356
|
+
*
|
|
1357
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages)
|
|
1358
|
+
*/
|
|
1151
1359
|
readonly usages: string[];
|
|
1152
1360
|
}
|
|
1153
1361
|
export interface CryptoKeyPair {
|
|
@@ -1256,24 +1464,14 @@ export declare class DigestStream extends WritableStream<
|
|
|
1256
1464
|
get bytesWritten(): number | bigint;
|
|
1257
1465
|
}
|
|
1258
1466
|
/**
|
|
1259
|
-
*
|
|
1467
|
+
* The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, `KOI8-R`, `GBK`, etc.
|
|
1260
1468
|
*
|
|
1261
1469
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
|
|
1262
1470
|
*/
|
|
1263
1471
|
export declare class TextDecoder {
|
|
1264
1472
|
constructor(label?: string, options?: TextDecoderConstructorOptions);
|
|
1265
1473
|
/**
|
|
1266
|
-
*
|
|
1267
|
-
*
|
|
1268
|
-
* ```
|
|
1269
|
-
* var string = "", decoder = new TextDecoder(encoding), buffer;
|
|
1270
|
-
* while(buffer = next_chunk()) {
|
|
1271
|
-
* string += decoder.decode(buffer, {stream:true});
|
|
1272
|
-
* }
|
|
1273
|
-
* string += decoder.decode(); // end-of-queue
|
|
1274
|
-
* ```
|
|
1275
|
-
*
|
|
1276
|
-
* If the error mode is "fatal" and encoding's decoder returns error, throws a TypeError.
|
|
1474
|
+
* The **`TextDecoder.decode()`** method returns a string containing text decoded from the buffer passed as a parameter.
|
|
1277
1475
|
*
|
|
1278
1476
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder/decode)
|
|
1279
1477
|
*/
|
|
@@ -1286,27 +1484,24 @@ export declare class TextDecoder {
|
|
|
1286
1484
|
get ignoreBOM(): boolean;
|
|
1287
1485
|
}
|
|
1288
1486
|
/**
|
|
1289
|
-
* TextEncoder takes a stream of code points as input and emits a stream of
|
|
1487
|
+
* The **`TextEncoder`** interface takes a stream of code points as input and emits a stream of UTF-8 bytes.
|
|
1290
1488
|
*
|
|
1291
1489
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
|
|
1292
1490
|
*/
|
|
1293
1491
|
export declare class TextEncoder {
|
|
1294
1492
|
constructor();
|
|
1295
1493
|
/**
|
|
1296
|
-
*
|
|
1494
|
+
* 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.
|
|
1297
1495
|
*
|
|
1298
1496
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encode)
|
|
1299
1497
|
*/
|
|
1300
1498
|
encode(input?: string): Uint8Array;
|
|
1301
1499
|
/**
|
|
1302
|
-
*
|
|
1500
|
+
* 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.
|
|
1303
1501
|
*
|
|
1304
1502
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
|
|
1305
1503
|
*/
|
|
1306
|
-
encodeInto(
|
|
1307
|
-
input: string,
|
|
1308
|
-
buffer: ArrayBuffer | ArrayBufferView,
|
|
1309
|
-
): TextEncoderEncodeIntoResult;
|
|
1504
|
+
encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
|
|
1310
1505
|
get encoding(): string;
|
|
1311
1506
|
}
|
|
1312
1507
|
export interface TextDecoderConstructorOptions {
|
|
@@ -1321,21 +1516,41 @@ export interface TextEncoderEncodeIntoResult {
|
|
|
1321
1516
|
written: number;
|
|
1322
1517
|
}
|
|
1323
1518
|
/**
|
|
1324
|
-
*
|
|
1519
|
+
* The **`ErrorEvent`** interface represents events providing information related to errors in scripts or in files.
|
|
1325
1520
|
*
|
|
1326
1521
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
|
|
1327
1522
|
*/
|
|
1328
1523
|
export declare class ErrorEvent extends Event {
|
|
1329
1524
|
constructor(type: string, init?: ErrorEventErrorEventInit);
|
|
1330
|
-
|
|
1525
|
+
/**
|
|
1526
|
+
* The **`filename`** read-only property of the ErrorEvent interface returns a string containing the name of the script file in which the error occurred.
|
|
1527
|
+
*
|
|
1528
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename)
|
|
1529
|
+
*/
|
|
1331
1530
|
get filename(): string;
|
|
1332
|
-
|
|
1531
|
+
/**
|
|
1532
|
+
* The **`message`** read-only property of the ErrorEvent interface returns a string containing a human-readable error message describing the problem.
|
|
1533
|
+
*
|
|
1534
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message)
|
|
1535
|
+
*/
|
|
1333
1536
|
get message(): string;
|
|
1334
|
-
|
|
1537
|
+
/**
|
|
1538
|
+
* 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.
|
|
1539
|
+
*
|
|
1540
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno)
|
|
1541
|
+
*/
|
|
1335
1542
|
get lineno(): number;
|
|
1336
|
-
|
|
1543
|
+
/**
|
|
1544
|
+
* 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.
|
|
1545
|
+
*
|
|
1546
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno)
|
|
1547
|
+
*/
|
|
1337
1548
|
get colno(): number;
|
|
1338
|
-
|
|
1549
|
+
/**
|
|
1550
|
+
* 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.
|
|
1551
|
+
*
|
|
1552
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error)
|
|
1553
|
+
*/
|
|
1339
1554
|
get error(): any;
|
|
1340
1555
|
}
|
|
1341
1556
|
export interface ErrorEventErrorEventInit {
|
|
@@ -1346,38 +1561,38 @@ export interface ErrorEventErrorEventInit {
|
|
|
1346
1561
|
error?: any;
|
|
1347
1562
|
}
|
|
1348
1563
|
/**
|
|
1349
|
-
*
|
|
1564
|
+
* The **`MessageEvent`** interface represents a message received by a target object.
|
|
1350
1565
|
*
|
|
1351
1566
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
|
|
1352
1567
|
*/
|
|
1353
1568
|
export declare class MessageEvent extends Event {
|
|
1354
1569
|
constructor(type: string, initializer: MessageEventInit);
|
|
1355
1570
|
/**
|
|
1356
|
-
*
|
|
1571
|
+
* 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.
|
|
1357
1572
|
*
|
|
1358
1573
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
|
|
1359
1574
|
*/
|
|
1360
1575
|
readonly data: any;
|
|
1361
1576
|
/**
|
|
1362
|
-
*
|
|
1577
|
+
* The **`origin`** read-only property of the origin of the message emitter.
|
|
1363
1578
|
*
|
|
1364
1579
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/origin)
|
|
1365
1580
|
*/
|
|
1366
1581
|
readonly origin: string | null;
|
|
1367
1582
|
/**
|
|
1368
|
-
*
|
|
1583
|
+
* The **`lastEventId`** read-only property of the unique ID for the event.
|
|
1369
1584
|
*
|
|
1370
1585
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/lastEventId)
|
|
1371
1586
|
*/
|
|
1372
1587
|
readonly lastEventId: string;
|
|
1373
1588
|
/**
|
|
1374
|
-
*
|
|
1589
|
+
* The **`source`** read-only property of the a WindowProxy, MessagePort, or a `MessageEventSource` (which can be a WindowProxy, message emitter.
|
|
1375
1590
|
*
|
|
1376
1591
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/source)
|
|
1377
1592
|
*/
|
|
1378
1593
|
readonly source: MessagePort | null;
|
|
1379
1594
|
/**
|
|
1380
|
-
*
|
|
1595
|
+
* The **`ports`** read-only property of the containing all MessagePort objects sent with the message, in order.
|
|
1381
1596
|
*
|
|
1382
1597
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/ports)
|
|
1383
1598
|
*/
|
|
@@ -1387,27 +1602,78 @@ export interface MessageEventInit {
|
|
|
1387
1602
|
data: ArrayBuffer | string;
|
|
1388
1603
|
}
|
|
1389
1604
|
/**
|
|
1390
|
-
*
|
|
1605
|
+
* The **`PromiseRejectionEvent`** interface represents events which are sent to the global script context when JavaScript Promises are rejected.
|
|
1606
|
+
*
|
|
1607
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent)
|
|
1608
|
+
*/
|
|
1609
|
+
export declare abstract class PromiseRejectionEvent extends Event {
|
|
1610
|
+
/**
|
|
1611
|
+
* The PromiseRejectionEvent interface's **`promise`** read-only property indicates the JavaScript rejected.
|
|
1612
|
+
*
|
|
1613
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise)
|
|
1614
|
+
*/
|
|
1615
|
+
readonly promise: Promise<any>;
|
|
1616
|
+
/**
|
|
1617
|
+
* The PromiseRejectionEvent **`reason`** read-only property is any JavaScript value or Object which provides the reason passed into Promise.reject().
|
|
1618
|
+
*
|
|
1619
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason)
|
|
1620
|
+
*/
|
|
1621
|
+
readonly reason: any;
|
|
1622
|
+
}
|
|
1623
|
+
/**
|
|
1624
|
+
* 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.
|
|
1391
1625
|
*
|
|
1392
1626
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)
|
|
1393
1627
|
*/
|
|
1394
1628
|
export declare class FormData {
|
|
1395
1629
|
constructor();
|
|
1396
|
-
|
|
1630
|
+
/**
|
|
1631
|
+
* 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.
|
|
1632
|
+
*
|
|
1633
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append)
|
|
1634
|
+
*/
|
|
1397
1635
|
append(name: string, value: string): void;
|
|
1398
|
-
|
|
1636
|
+
/**
|
|
1637
|
+
* 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.
|
|
1638
|
+
*
|
|
1639
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append)
|
|
1640
|
+
*/
|
|
1399
1641
|
append(name: string, value: Blob, filename?: string): void;
|
|
1400
|
-
|
|
1642
|
+
/**
|
|
1643
|
+
* The **`delete()`** method of the FormData interface deletes a key and its value(s) from a `FormData` object.
|
|
1644
|
+
*
|
|
1645
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete)
|
|
1646
|
+
*/
|
|
1401
1647
|
delete(name: string): void;
|
|
1402
|
-
|
|
1648
|
+
/**
|
|
1649
|
+
* The **`get()`** method of the FormData interface returns the first value associated with a given key from within a `FormData` object.
|
|
1650
|
+
*
|
|
1651
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get)
|
|
1652
|
+
*/
|
|
1403
1653
|
get(name: string): (File | string) | null;
|
|
1404
|
-
|
|
1654
|
+
/**
|
|
1655
|
+
* The **`getAll()`** method of the FormData interface returns all the values associated with a given key from within a `FormData` object.
|
|
1656
|
+
*
|
|
1657
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll)
|
|
1658
|
+
*/
|
|
1405
1659
|
getAll(name: string): (File | string)[];
|
|
1406
|
-
|
|
1660
|
+
/**
|
|
1661
|
+
* The **`has()`** method of the FormData interface returns whether a `FormData` object contains a certain key.
|
|
1662
|
+
*
|
|
1663
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has)
|
|
1664
|
+
*/
|
|
1407
1665
|
has(name: string): boolean;
|
|
1408
|
-
|
|
1666
|
+
/**
|
|
1667
|
+
* 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.
|
|
1668
|
+
*
|
|
1669
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set)
|
|
1670
|
+
*/
|
|
1409
1671
|
set(name: string, value: string): void;
|
|
1410
|
-
|
|
1672
|
+
/**
|
|
1673
|
+
* 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.
|
|
1674
|
+
*
|
|
1675
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set)
|
|
1676
|
+
*/
|
|
1411
1677
|
set(name: string, value: Blob, filename?: string): void;
|
|
1412
1678
|
/* Returns an array of key, value pairs for every entry in the list. */
|
|
1413
1679
|
entries(): IterableIterator<[key: string, value: File | string]>;
|
|
@@ -1533,14 +1799,22 @@ export interface DocumentEnd {
|
|
|
1533
1799
|
append(content: string, options?: ContentOptions): DocumentEnd;
|
|
1534
1800
|
}
|
|
1535
1801
|
/**
|
|
1536
|
-
* This is the event type for fetch
|
|
1802
|
+
* This is the event type for `fetch` events dispatched on the ServiceWorkerGlobalScope.
|
|
1537
1803
|
*
|
|
1538
1804
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent)
|
|
1539
1805
|
*/
|
|
1540
1806
|
export declare abstract class FetchEvent extends ExtendableEvent {
|
|
1541
|
-
|
|
1807
|
+
/**
|
|
1808
|
+
* The **`request`** read-only property of the the event handler.
|
|
1809
|
+
*
|
|
1810
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request)
|
|
1811
|
+
*/
|
|
1542
1812
|
readonly request: Request;
|
|
1543
|
-
|
|
1813
|
+
/**
|
|
1814
|
+
* The **`respondWith()`** method of allows you to provide a promise for a Response yourself.
|
|
1815
|
+
*
|
|
1816
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith)
|
|
1817
|
+
*/
|
|
1544
1818
|
respondWith(promise: Response | Promise<Response>): void;
|
|
1545
1819
|
passThroughOnException(): void;
|
|
1546
1820
|
}
|
|
@@ -1549,22 +1823,42 @@ export type HeadersInit =
|
|
|
1549
1823
|
| Iterable<Iterable<string>>
|
|
1550
1824
|
| Record<string, string>;
|
|
1551
1825
|
/**
|
|
1552
|
-
*
|
|
1826
|
+
* The **`Headers`** interface of the Fetch API allows you to perform various actions on HTTP request and response headers.
|
|
1553
1827
|
*
|
|
1554
1828
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers)
|
|
1555
1829
|
*/
|
|
1556
1830
|
export declare class Headers {
|
|
1557
1831
|
constructor(init?: HeadersInit);
|
|
1558
|
-
|
|
1832
|
+
/**
|
|
1833
|
+
* 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.
|
|
1834
|
+
*
|
|
1835
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get)
|
|
1836
|
+
*/
|
|
1559
1837
|
get(name: string): string | null;
|
|
1560
1838
|
getAll(name: string): string[];
|
|
1561
|
-
|
|
1839
|
+
/**
|
|
1840
|
+
* The **`has()`** method of the Headers interface returns a boolean stating whether a `Headers` object contains a certain header.
|
|
1841
|
+
*
|
|
1842
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has)
|
|
1843
|
+
*/
|
|
1562
1844
|
has(name: string): boolean;
|
|
1563
|
-
|
|
1845
|
+
/**
|
|
1846
|
+
* 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.
|
|
1847
|
+
*
|
|
1848
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set)
|
|
1849
|
+
*/
|
|
1564
1850
|
set(name: string, value: string): void;
|
|
1565
|
-
|
|
1851
|
+
/**
|
|
1852
|
+
* 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.
|
|
1853
|
+
*
|
|
1854
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append)
|
|
1855
|
+
*/
|
|
1566
1856
|
append(name: string, value: string): void;
|
|
1567
|
-
|
|
1857
|
+
/**
|
|
1858
|
+
* The **`delete()`** method of the Headers interface deletes a header from the current `Headers` object.
|
|
1859
|
+
*
|
|
1860
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete)
|
|
1861
|
+
*/
|
|
1568
1862
|
delete(name: string): void;
|
|
1569
1863
|
forEach<This = unknown>(
|
|
1570
1864
|
callback: (this: This, value: string, key: string, parent: Headers) => void,
|
|
@@ -1605,7 +1899,7 @@ export declare abstract class Body {
|
|
|
1605
1899
|
blob(): Promise<Blob>;
|
|
1606
1900
|
}
|
|
1607
1901
|
/**
|
|
1608
|
-
*
|
|
1902
|
+
* The **`Response`** interface of the Fetch API represents the response to a request.
|
|
1609
1903
|
*
|
|
1610
1904
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
|
|
1611
1905
|
*/
|
|
@@ -1617,28 +1911,60 @@ export declare var Response: {
|
|
|
1617
1911
|
json(any: any, maybeInit?: ResponseInit | Response): Response;
|
|
1618
1912
|
};
|
|
1619
1913
|
/**
|
|
1620
|
-
*
|
|
1914
|
+
* The **`Response`** interface of the Fetch API represents the response to a request.
|
|
1621
1915
|
*
|
|
1622
1916
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
|
|
1623
1917
|
*/
|
|
1624
1918
|
export interface Response extends Body {
|
|
1625
|
-
|
|
1919
|
+
/**
|
|
1920
|
+
* The **`clone()`** method of the Response interface creates a clone of a response object, identical in every way, but stored in a different variable.
|
|
1921
|
+
*
|
|
1922
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone)
|
|
1923
|
+
*/
|
|
1626
1924
|
clone(): Response;
|
|
1627
|
-
|
|
1925
|
+
/**
|
|
1926
|
+
* The **`status`** read-only property of the Response interface contains the HTTP status codes of the response.
|
|
1927
|
+
*
|
|
1928
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status)
|
|
1929
|
+
*/
|
|
1628
1930
|
status: number;
|
|
1629
|
-
|
|
1931
|
+
/**
|
|
1932
|
+
* The **`statusText`** read-only property of the Response interface contains the status message corresponding to the HTTP status code in Response.status.
|
|
1933
|
+
*
|
|
1934
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText)
|
|
1935
|
+
*/
|
|
1630
1936
|
statusText: string;
|
|
1631
|
-
|
|
1937
|
+
/**
|
|
1938
|
+
* The **`headers`** read-only property of the with the response.
|
|
1939
|
+
*
|
|
1940
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers)
|
|
1941
|
+
*/
|
|
1632
1942
|
headers: Headers;
|
|
1633
|
-
|
|
1943
|
+
/**
|
|
1944
|
+
* 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.
|
|
1945
|
+
*
|
|
1946
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok)
|
|
1947
|
+
*/
|
|
1634
1948
|
ok: boolean;
|
|
1635
|
-
|
|
1949
|
+
/**
|
|
1950
|
+
* 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.
|
|
1951
|
+
*
|
|
1952
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected)
|
|
1953
|
+
*/
|
|
1636
1954
|
redirected: boolean;
|
|
1637
|
-
|
|
1955
|
+
/**
|
|
1956
|
+
* The **`url`** read-only property of the Response interface contains the URL of the response.
|
|
1957
|
+
*
|
|
1958
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url)
|
|
1959
|
+
*/
|
|
1638
1960
|
url: string;
|
|
1639
1961
|
webSocket: WebSocket | null;
|
|
1640
1962
|
cf: any | undefined;
|
|
1641
|
-
|
|
1963
|
+
/**
|
|
1964
|
+
* The **`type`** read-only property of the Response interface contains the type of the response.
|
|
1965
|
+
*
|
|
1966
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/type)
|
|
1967
|
+
*/
|
|
1642
1968
|
type: "default" | "error";
|
|
1643
1969
|
}
|
|
1644
1970
|
export interface ResponseInit {
|
|
@@ -1654,7 +1980,7 @@ export type RequestInfo<
|
|
|
1654
1980
|
Cf = CfProperties<CfHostMetadata>,
|
|
1655
1981
|
> = Request<CfHostMetadata, Cf> | string;
|
|
1656
1982
|
/**
|
|
1657
|
-
*
|
|
1983
|
+
* The **`Request`** interface of the Fetch API represents a resource request.
|
|
1658
1984
|
*
|
|
1659
1985
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
|
|
1660
1986
|
*/
|
|
@@ -1666,7 +1992,7 @@ export declare var Request: {
|
|
|
1666
1992
|
): Request<CfHostMetadata, Cf>;
|
|
1667
1993
|
};
|
|
1668
1994
|
/**
|
|
1669
|
-
*
|
|
1995
|
+
* The **`Request`** interface of the Fetch API represents a resource request.
|
|
1670
1996
|
*
|
|
1671
1997
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
|
|
1672
1998
|
*/
|
|
@@ -1674,48 +2000,52 @@ export interface Request<
|
|
|
1674
2000
|
CfHostMetadata = unknown,
|
|
1675
2001
|
Cf = CfProperties<CfHostMetadata>,
|
|
1676
2002
|
> extends Body {
|
|
1677
|
-
|
|
2003
|
+
/**
|
|
2004
|
+
* The **`clone()`** method of the Request interface creates a copy of the current `Request` object.
|
|
2005
|
+
*
|
|
2006
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone)
|
|
2007
|
+
*/
|
|
1678
2008
|
clone(): Request<CfHostMetadata, Cf>;
|
|
1679
2009
|
/**
|
|
1680
|
-
*
|
|
2010
|
+
* The **`method`** read-only property of the `POST`, etc.) A String indicating the method of the request.
|
|
1681
2011
|
*
|
|
1682
2012
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/method)
|
|
1683
2013
|
*/
|
|
1684
2014
|
method: string;
|
|
1685
2015
|
/**
|
|
1686
|
-
*
|
|
2016
|
+
* The **`url`** read-only property of the Request interface contains the URL of the request.
|
|
1687
2017
|
*
|
|
1688
2018
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/url)
|
|
1689
2019
|
*/
|
|
1690
2020
|
url: string;
|
|
1691
2021
|
/**
|
|
1692
|
-
*
|
|
2022
|
+
* The **`headers`** read-only property of the with the request.
|
|
1693
2023
|
*
|
|
1694
2024
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/headers)
|
|
1695
2025
|
*/
|
|
1696
2026
|
headers: Headers;
|
|
1697
2027
|
/**
|
|
1698
|
-
*
|
|
2028
|
+
* The **`redirect`** read-only property of the Request interface contains the mode for how redirects are handled.
|
|
1699
2029
|
*
|
|
1700
2030
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/redirect)
|
|
1701
2031
|
*/
|
|
1702
2032
|
redirect: string;
|
|
1703
2033
|
fetcher: Fetcher | null;
|
|
1704
2034
|
/**
|
|
1705
|
-
*
|
|
2035
|
+
* The read-only **`signal`** property of the Request interface returns the AbortSignal associated with the request.
|
|
1706
2036
|
*
|
|
1707
2037
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/signal)
|
|
1708
2038
|
*/
|
|
1709
2039
|
signal: AbortSignal;
|
|
1710
2040
|
cf: Cf | undefined;
|
|
1711
2041
|
/**
|
|
1712
|
-
*
|
|
2042
|
+
* The **`integrity`** read-only property of the Request interface contains the subresource integrity value of the request.
|
|
1713
2043
|
*
|
|
1714
2044
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/integrity)
|
|
1715
2045
|
*/
|
|
1716
2046
|
integrity: string;
|
|
1717
2047
|
/**
|
|
1718
|
-
*
|
|
2048
|
+
* 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.
|
|
1719
2049
|
*
|
|
1720
2050
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive)
|
|
1721
2051
|
*/
|
|
@@ -2223,30 +2553,58 @@ export type ReadableStreamReadResult<R = any> =
|
|
|
2223
2553
|
value?: undefined;
|
|
2224
2554
|
};
|
|
2225
2555
|
/**
|
|
2226
|
-
*
|
|
2556
|
+
* The `ReadableStream` interface of the Streams API represents a readable stream of byte data.
|
|
2227
2557
|
*
|
|
2228
2558
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2229
2559
|
*/
|
|
2230
2560
|
export interface ReadableStream<R = any> {
|
|
2231
|
-
|
|
2561
|
+
/**
|
|
2562
|
+
* The **`locked`** read-only property of the ReadableStream interface returns whether or not the readable stream is locked to a reader.
|
|
2563
|
+
*
|
|
2564
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked)
|
|
2565
|
+
*/
|
|
2232
2566
|
get locked(): boolean;
|
|
2233
|
-
|
|
2567
|
+
/**
|
|
2568
|
+
* The **`cancel()`** method of the ReadableStream interface returns a Promise that resolves when the stream is canceled.
|
|
2569
|
+
*
|
|
2570
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel)
|
|
2571
|
+
*/
|
|
2234
2572
|
cancel(reason?: any): Promise<void>;
|
|
2235
|
-
|
|
2573
|
+
/**
|
|
2574
|
+
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it.
|
|
2575
|
+
*
|
|
2576
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
|
|
2577
|
+
*/
|
|
2236
2578
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
2237
|
-
|
|
2579
|
+
/**
|
|
2580
|
+
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it.
|
|
2581
|
+
*
|
|
2582
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
|
|
2583
|
+
*/
|
|
2238
2584
|
getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader;
|
|
2239
|
-
|
|
2585
|
+
/**
|
|
2586
|
+
* 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.
|
|
2587
|
+
*
|
|
2588
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough)
|
|
2589
|
+
*/
|
|
2240
2590
|
pipeThrough<T>(
|
|
2241
2591
|
transform: ReadableWritablePair<T, R>,
|
|
2242
2592
|
options?: StreamPipeOptions,
|
|
2243
2593
|
): ReadableStream<T>;
|
|
2244
|
-
|
|
2594
|
+
/**
|
|
2595
|
+
* 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.
|
|
2596
|
+
*
|
|
2597
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo)
|
|
2598
|
+
*/
|
|
2245
2599
|
pipeTo(
|
|
2246
2600
|
destination: WritableStream<R>,
|
|
2247
2601
|
options?: StreamPipeOptions,
|
|
2248
2602
|
): Promise<void>;
|
|
2249
|
-
|
|
2603
|
+
/**
|
|
2604
|
+
* The **`tee()`** method of the two-element array containing the two resulting branches as new ReadableStream instances.
|
|
2605
|
+
*
|
|
2606
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee)
|
|
2607
|
+
*/
|
|
2250
2608
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
2251
2609
|
values(options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
|
|
2252
2610
|
[Symbol.asyncIterator](
|
|
@@ -2254,7 +2612,7 @@ export interface ReadableStream<R = any> {
|
|
|
2254
2612
|
): AsyncIterableIterator<R>;
|
|
2255
2613
|
}
|
|
2256
2614
|
/**
|
|
2257
|
-
*
|
|
2615
|
+
* The `ReadableStream` interface of the Streams API represents a readable stream of byte data.
|
|
2258
2616
|
*
|
|
2259
2617
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2260
2618
|
*/
|
|
@@ -2269,26 +2627,50 @@ export declare const ReadableStream: {
|
|
|
2269
2627
|
strategy?: QueuingStrategy<R>,
|
|
2270
2628
|
): ReadableStream<R>;
|
|
2271
2629
|
};
|
|
2272
|
-
|
|
2630
|
+
/**
|
|
2631
|
+
* 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).
|
|
2632
|
+
*
|
|
2633
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader)
|
|
2634
|
+
*/
|
|
2273
2635
|
export declare class ReadableStreamDefaultReader<R = any> {
|
|
2274
2636
|
constructor(stream: ReadableStream);
|
|
2275
2637
|
get closed(): Promise<void>;
|
|
2276
2638
|
cancel(reason?: any): Promise<void>;
|
|
2277
|
-
|
|
2639
|
+
/**
|
|
2640
|
+
* The **`read()`** method of the ReadableStreamDefaultReader interface returns a Promise providing access to the next chunk in the stream's internal queue.
|
|
2641
|
+
*
|
|
2642
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read)
|
|
2643
|
+
*/
|
|
2278
2644
|
read(): Promise<ReadableStreamReadResult<R>>;
|
|
2279
|
-
|
|
2645
|
+
/**
|
|
2646
|
+
* The **`releaseLock()`** method of the ReadableStreamDefaultReader interface releases the reader's lock on the stream.
|
|
2647
|
+
*
|
|
2648
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock)
|
|
2649
|
+
*/
|
|
2280
2650
|
releaseLock(): void;
|
|
2281
2651
|
}
|
|
2282
|
-
|
|
2652
|
+
/**
|
|
2653
|
+
* The `ReadableStreamBYOBReader` interface of the Streams API defines a reader for a ReadableStream that supports zero-copy reading from an underlying byte source.
|
|
2654
|
+
*
|
|
2655
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader)
|
|
2656
|
+
*/
|
|
2283
2657
|
export declare class ReadableStreamBYOBReader {
|
|
2284
2658
|
constructor(stream: ReadableStream);
|
|
2285
2659
|
get closed(): Promise<void>;
|
|
2286
2660
|
cancel(reason?: any): Promise<void>;
|
|
2287
|
-
|
|
2661
|
+
/**
|
|
2662
|
+
* 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.
|
|
2663
|
+
*
|
|
2664
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
|
|
2665
|
+
*/
|
|
2288
2666
|
read<T extends ArrayBufferView>(
|
|
2289
2667
|
view: T,
|
|
2290
2668
|
): Promise<ReadableStreamReadResult<T>>;
|
|
2291
|
-
|
|
2669
|
+
/**
|
|
2670
|
+
* The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
|
|
2671
|
+
*
|
|
2672
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock)
|
|
2673
|
+
*/
|
|
2292
2674
|
releaseLock(): void;
|
|
2293
2675
|
readAtLeast<T extends ArrayBufferView>(
|
|
2294
2676
|
minElements: number,
|
|
@@ -2306,60 +2688,148 @@ export interface ReadableStreamGetReaderOptions {
|
|
|
2306
2688
|
*/
|
|
2307
2689
|
mode: "byob";
|
|
2308
2690
|
}
|
|
2309
|
-
|
|
2691
|
+
/**
|
|
2692
|
+
* 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).
|
|
2693
|
+
*
|
|
2694
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest)
|
|
2695
|
+
*/
|
|
2310
2696
|
export interface ReadableStreamBYOBRequest {
|
|
2311
|
-
|
|
2697
|
+
/**
|
|
2698
|
+
* The **`view`** getter property of the ReadableStreamBYOBRequest interface returns the current view.
|
|
2699
|
+
*
|
|
2700
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view)
|
|
2701
|
+
*/
|
|
2312
2702
|
get view(): Uint8Array | null;
|
|
2313
|
-
|
|
2703
|
+
/**
|
|
2704
|
+
* 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.
|
|
2705
|
+
*
|
|
2706
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond)
|
|
2707
|
+
*/
|
|
2314
2708
|
respond(bytesWritten: number): void;
|
|
2315
|
-
|
|
2709
|
+
/**
|
|
2710
|
+
* 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.
|
|
2711
|
+
*
|
|
2712
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView)
|
|
2713
|
+
*/
|
|
2316
2714
|
respondWithNewView(view: ArrayBuffer | ArrayBufferView): void;
|
|
2317
2715
|
get atLeast(): number | null;
|
|
2318
2716
|
}
|
|
2319
|
-
|
|
2717
|
+
/**
|
|
2718
|
+
* The **`ReadableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a ReadableStream's state and internal queue.
|
|
2719
|
+
*
|
|
2720
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController)
|
|
2721
|
+
*/
|
|
2320
2722
|
export interface ReadableStreamDefaultController<R = any> {
|
|
2321
|
-
|
|
2723
|
+
/**
|
|
2724
|
+
* The **`desiredSize`** read-only property of the required to fill the stream's internal queue.
|
|
2725
|
+
*
|
|
2726
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize)
|
|
2727
|
+
*/
|
|
2322
2728
|
get desiredSize(): number | null;
|
|
2323
|
-
|
|
2729
|
+
/**
|
|
2730
|
+
* The **`close()`** method of the ReadableStreamDefaultController interface closes the associated stream.
|
|
2731
|
+
*
|
|
2732
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close)
|
|
2733
|
+
*/
|
|
2324
2734
|
close(): void;
|
|
2325
|
-
|
|
2735
|
+
/**
|
|
2736
|
+
* The **`enqueue()`** method of the ```js-nolint enqueue(chunk) ``` - `chunk` - : The chunk to enqueue.
|
|
2737
|
+
*
|
|
2738
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)
|
|
2739
|
+
*/
|
|
2326
2740
|
enqueue(chunk?: R): void;
|
|
2327
|
-
|
|
2741
|
+
/**
|
|
2742
|
+
* The **`error()`** method of the with the associated stream to error.
|
|
2743
|
+
*
|
|
2744
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error)
|
|
2745
|
+
*/
|
|
2328
2746
|
error(reason: any): void;
|
|
2329
2747
|
}
|
|
2330
|
-
|
|
2748
|
+
/**
|
|
2749
|
+
* The **`ReadableByteStreamController`** interface of the Streams API represents a controller for a readable byte stream.
|
|
2750
|
+
*
|
|
2751
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController)
|
|
2752
|
+
*/
|
|
2331
2753
|
export interface ReadableByteStreamController {
|
|
2332
|
-
|
|
2754
|
+
/**
|
|
2755
|
+
* The **`byobRequest`** read-only property of the ReadableByteStreamController interface returns the current BYOB request, or `null` if there are no pending requests.
|
|
2756
|
+
*
|
|
2757
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest)
|
|
2758
|
+
*/
|
|
2333
2759
|
get byobRequest(): ReadableStreamBYOBRequest | null;
|
|
2334
|
-
|
|
2760
|
+
/**
|
|
2761
|
+
* 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'.
|
|
2762
|
+
*
|
|
2763
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize)
|
|
2764
|
+
*/
|
|
2335
2765
|
get desiredSize(): number | null;
|
|
2336
|
-
|
|
2766
|
+
/**
|
|
2767
|
+
* The **`close()`** method of the ReadableByteStreamController interface closes the associated stream.
|
|
2768
|
+
*
|
|
2769
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close)
|
|
2770
|
+
*/
|
|
2337
2771
|
close(): void;
|
|
2338
|
-
|
|
2772
|
+
/**
|
|
2773
|
+
* 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).
|
|
2774
|
+
*
|
|
2775
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue)
|
|
2776
|
+
*/
|
|
2339
2777
|
enqueue(chunk: ArrayBuffer | ArrayBufferView): void;
|
|
2340
|
-
|
|
2778
|
+
/**
|
|
2779
|
+
* The **`error()`** method of the ReadableByteStreamController interface causes any future interactions with the associated stream to error with the specified reason.
|
|
2780
|
+
*
|
|
2781
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error)
|
|
2782
|
+
*/
|
|
2341
2783
|
error(reason: any): void;
|
|
2342
2784
|
}
|
|
2343
2785
|
/**
|
|
2344
|
-
*
|
|
2786
|
+
* The **`WritableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a WritableStream's state.
|
|
2345
2787
|
*
|
|
2346
2788
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
2347
2789
|
*/
|
|
2348
2790
|
export interface WritableStreamDefaultController {
|
|
2349
|
-
|
|
2791
|
+
/**
|
|
2792
|
+
* The read-only **`signal`** property of the WritableStreamDefaultController interface returns the AbortSignal associated with the controller.
|
|
2793
|
+
*
|
|
2794
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal)
|
|
2795
|
+
*/
|
|
2350
2796
|
get signal(): AbortSignal;
|
|
2351
|
-
|
|
2797
|
+
/**
|
|
2798
|
+
* The **`error()`** method of the with the associated stream to error.
|
|
2799
|
+
*
|
|
2800
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error)
|
|
2801
|
+
*/
|
|
2352
2802
|
error(reason?: any): void;
|
|
2353
2803
|
}
|
|
2354
|
-
|
|
2804
|
+
/**
|
|
2805
|
+
* The **`TransformStreamDefaultController`** interface of the Streams API provides methods to manipulate the associated ReadableStream and WritableStream.
|
|
2806
|
+
*
|
|
2807
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController)
|
|
2808
|
+
*/
|
|
2355
2809
|
export interface TransformStreamDefaultController<O = any> {
|
|
2356
|
-
|
|
2810
|
+
/**
|
|
2811
|
+
* The **`desiredSize`** read-only property of the TransformStreamDefaultController interface returns the desired size to fill the queue of the associated ReadableStream.
|
|
2812
|
+
*
|
|
2813
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize)
|
|
2814
|
+
*/
|
|
2357
2815
|
get desiredSize(): number | null;
|
|
2358
|
-
|
|
2816
|
+
/**
|
|
2817
|
+
* The **`enqueue()`** method of the TransformStreamDefaultController interface enqueues the given chunk in the readable side of the stream.
|
|
2818
|
+
*
|
|
2819
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue)
|
|
2820
|
+
*/
|
|
2359
2821
|
enqueue(chunk?: O): void;
|
|
2360
|
-
|
|
2822
|
+
/**
|
|
2823
|
+
* The **`error()`** method of the TransformStreamDefaultController interface errors both sides of the stream.
|
|
2824
|
+
*
|
|
2825
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error)
|
|
2826
|
+
*/
|
|
2361
2827
|
error(reason: any): void;
|
|
2362
|
-
|
|
2828
|
+
/**
|
|
2829
|
+
* The **`terminate()`** method of the TransformStreamDefaultController interface closes the readable side and errors the writable side of the stream.
|
|
2830
|
+
*
|
|
2831
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate)
|
|
2832
|
+
*/
|
|
2363
2833
|
terminate(): void;
|
|
2364
2834
|
}
|
|
2365
2835
|
export interface ReadableWritablePair<R = any, W = any> {
|
|
@@ -2372,7 +2842,7 @@ export interface ReadableWritablePair<R = any, W = any> {
|
|
|
2372
2842
|
readable: ReadableStream<R>;
|
|
2373
2843
|
}
|
|
2374
2844
|
/**
|
|
2375
|
-
*
|
|
2845
|
+
* The **`WritableStream`** interface of the Streams API provides a standard abstraction for writing streaming data to a destination, known as a sink.
|
|
2376
2846
|
*
|
|
2377
2847
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
|
|
2378
2848
|
*/
|
|
@@ -2381,47 +2851,103 @@ export declare class WritableStream<W = any> {
|
|
|
2381
2851
|
underlyingSink?: UnderlyingSink,
|
|
2382
2852
|
queuingStrategy?: QueuingStrategy,
|
|
2383
2853
|
);
|
|
2384
|
-
|
|
2854
|
+
/**
|
|
2855
|
+
* The **`locked`** read-only property of the WritableStream interface returns a boolean indicating whether the `WritableStream` is locked to a writer.
|
|
2856
|
+
*
|
|
2857
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked)
|
|
2858
|
+
*/
|
|
2385
2859
|
get locked(): boolean;
|
|
2386
|
-
|
|
2860
|
+
/**
|
|
2861
|
+
* 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.
|
|
2862
|
+
*
|
|
2863
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort)
|
|
2864
|
+
*/
|
|
2387
2865
|
abort(reason?: any): Promise<void>;
|
|
2388
|
-
|
|
2866
|
+
/**
|
|
2867
|
+
* The **`close()`** method of the WritableStream interface closes the associated stream.
|
|
2868
|
+
*
|
|
2869
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close)
|
|
2870
|
+
*/
|
|
2389
2871
|
close(): Promise<void>;
|
|
2390
|
-
|
|
2872
|
+
/**
|
|
2873
|
+
* The **`getWriter()`** method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance.
|
|
2874
|
+
*
|
|
2875
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter)
|
|
2876
|
+
*/
|
|
2391
2877
|
getWriter(): WritableStreamDefaultWriter<W>;
|
|
2392
2878
|
}
|
|
2393
2879
|
/**
|
|
2394
|
-
*
|
|
2880
|
+
* 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.
|
|
2395
2881
|
*
|
|
2396
2882
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
|
|
2397
2883
|
*/
|
|
2398
2884
|
export declare class WritableStreamDefaultWriter<W = any> {
|
|
2399
2885
|
constructor(stream: WritableStream);
|
|
2400
|
-
|
|
2886
|
+
/**
|
|
2887
|
+
* The **`closed`** read-only property of the the stream errors or the writer's lock is released.
|
|
2888
|
+
*
|
|
2889
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed)
|
|
2890
|
+
*/
|
|
2401
2891
|
get closed(): Promise<void>;
|
|
2402
|
-
|
|
2892
|
+
/**
|
|
2893
|
+
* 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.
|
|
2894
|
+
*
|
|
2895
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready)
|
|
2896
|
+
*/
|
|
2403
2897
|
get ready(): Promise<void>;
|
|
2404
|
-
|
|
2898
|
+
/**
|
|
2899
|
+
* The **`desiredSize`** read-only property of the to fill the stream's internal queue.
|
|
2900
|
+
*
|
|
2901
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize)
|
|
2902
|
+
*/
|
|
2405
2903
|
get desiredSize(): number | null;
|
|
2406
|
-
|
|
2904
|
+
/**
|
|
2905
|
+
* 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.
|
|
2906
|
+
*
|
|
2907
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort)
|
|
2908
|
+
*/
|
|
2407
2909
|
abort(reason?: any): Promise<void>;
|
|
2408
|
-
|
|
2910
|
+
/**
|
|
2911
|
+
* The **`close()`** method of the stream.
|
|
2912
|
+
*
|
|
2913
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close)
|
|
2914
|
+
*/
|
|
2409
2915
|
close(): Promise<void>;
|
|
2410
|
-
|
|
2916
|
+
/**
|
|
2917
|
+
* The **`write()`** method of the operation.
|
|
2918
|
+
*
|
|
2919
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write)
|
|
2920
|
+
*/
|
|
2411
2921
|
write(chunk?: W): Promise<void>;
|
|
2412
|
-
|
|
2922
|
+
/**
|
|
2923
|
+
* The **`releaseLock()`** method of the corresponding stream.
|
|
2924
|
+
*
|
|
2925
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock)
|
|
2926
|
+
*/
|
|
2413
2927
|
releaseLock(): void;
|
|
2414
2928
|
}
|
|
2415
|
-
|
|
2929
|
+
/**
|
|
2930
|
+
* The **`TransformStream`** interface of the Streams API represents a concrete implementation of the pipe chain _transform stream_ concept.
|
|
2931
|
+
*
|
|
2932
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream)
|
|
2933
|
+
*/
|
|
2416
2934
|
export declare class TransformStream<I = any, O = any> {
|
|
2417
2935
|
constructor(
|
|
2418
2936
|
transformer?: Transformer<I, O>,
|
|
2419
2937
|
writableStrategy?: QueuingStrategy<I>,
|
|
2420
2938
|
readableStrategy?: QueuingStrategy<O>,
|
|
2421
2939
|
);
|
|
2422
|
-
|
|
2940
|
+
/**
|
|
2941
|
+
* The **`readable`** read-only property of the TransformStream interface returns the ReadableStream instance controlled by this `TransformStream`.
|
|
2942
|
+
*
|
|
2943
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable)
|
|
2944
|
+
*/
|
|
2423
2945
|
get readable(): ReadableStream<O>;
|
|
2424
|
-
|
|
2946
|
+
/**
|
|
2947
|
+
* The **`writable`** read-only property of the TransformStream interface returns the WritableStream instance controlled by this `TransformStream`.
|
|
2948
|
+
*
|
|
2949
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable)
|
|
2950
|
+
*/
|
|
2425
2951
|
get writable(): WritableStream<I>;
|
|
2426
2952
|
}
|
|
2427
2953
|
export declare class FixedLengthStream extends IdentityTransformStream {
|
|
@@ -2442,21 +2968,33 @@ export interface IdentityTransformStreamQueuingStrategy {
|
|
|
2442
2968
|
export interface ReadableStreamValuesOptions {
|
|
2443
2969
|
preventCancel?: boolean;
|
|
2444
2970
|
}
|
|
2445
|
-
|
|
2971
|
+
/**
|
|
2972
|
+
* The **`CompressionStream`** interface of the Compression Streams API is an API for compressing a stream of data.
|
|
2973
|
+
*
|
|
2974
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream)
|
|
2975
|
+
*/
|
|
2446
2976
|
export declare class CompressionStream extends TransformStream<
|
|
2447
2977
|
ArrayBuffer | ArrayBufferView,
|
|
2448
2978
|
Uint8Array
|
|
2449
2979
|
> {
|
|
2450
2980
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2451
2981
|
}
|
|
2452
|
-
|
|
2982
|
+
/**
|
|
2983
|
+
* The **`DecompressionStream`** interface of the Compression Streams API is an API for decompressing a stream of data.
|
|
2984
|
+
*
|
|
2985
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream)
|
|
2986
|
+
*/
|
|
2453
2987
|
export declare class DecompressionStream extends TransformStream<
|
|
2454
2988
|
ArrayBuffer | ArrayBufferView,
|
|
2455
2989
|
Uint8Array
|
|
2456
2990
|
> {
|
|
2457
2991
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2458
2992
|
}
|
|
2459
|
-
|
|
2993
|
+
/**
|
|
2994
|
+
* The **`TextEncoderStream`** interface of the Encoding API converts a stream of strings into bytes in the UTF-8 encoding.
|
|
2995
|
+
*
|
|
2996
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream)
|
|
2997
|
+
*/
|
|
2460
2998
|
export declare class TextEncoderStream extends TransformStream<
|
|
2461
2999
|
string,
|
|
2462
3000
|
Uint8Array
|
|
@@ -2464,7 +3002,11 @@ export declare class TextEncoderStream extends TransformStream<
|
|
|
2464
3002
|
constructor();
|
|
2465
3003
|
get encoding(): string;
|
|
2466
3004
|
}
|
|
2467
|
-
|
|
3005
|
+
/**
|
|
3006
|
+
* 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.
|
|
3007
|
+
*
|
|
3008
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream)
|
|
3009
|
+
*/
|
|
2468
3010
|
export declare class TextDecoderStream extends TransformStream<
|
|
2469
3011
|
ArrayBuffer | ArrayBufferView,
|
|
2470
3012
|
string
|
|
@@ -2479,7 +3021,7 @@ export interface TextDecoderStreamTextDecoderStreamInit {
|
|
|
2479
3021
|
ignoreBOM?: boolean;
|
|
2480
3022
|
}
|
|
2481
3023
|
/**
|
|
2482
|
-
*
|
|
3024
|
+
* The **`ByteLengthQueuingStrategy`** interface of the Streams API provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2483
3025
|
*
|
|
2484
3026
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
|
|
2485
3027
|
*/
|
|
@@ -2487,19 +3029,27 @@ export declare class ByteLengthQueuingStrategy
|
|
|
2487
3029
|
implements QueuingStrategy<ArrayBufferView>
|
|
2488
3030
|
{
|
|
2489
3031
|
constructor(init: QueuingStrategyInit);
|
|
2490
|
-
|
|
3032
|
+
/**
|
|
3033
|
+
* The read-only **`ByteLengthQueuingStrategy.highWaterMark`** property returns the total number of bytes that can be contained in the internal queue before backpressure is applied.
|
|
3034
|
+
*
|
|
3035
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark)
|
|
3036
|
+
*/
|
|
2491
3037
|
get highWaterMark(): number;
|
|
2492
3038
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
|
|
2493
3039
|
get size(): (chunk?: any) => number;
|
|
2494
3040
|
}
|
|
2495
3041
|
/**
|
|
2496
|
-
*
|
|
3042
|
+
* The **`CountQueuingStrategy`** interface of the Streams API provides a built-in chunk counting queuing strategy that can be used when constructing streams.
|
|
2497
3043
|
*
|
|
2498
3044
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
|
|
2499
3045
|
*/
|
|
2500
3046
|
export declare class CountQueuingStrategy implements QueuingStrategy {
|
|
2501
3047
|
constructor(init: QueuingStrategyInit);
|
|
2502
|
-
|
|
3048
|
+
/**
|
|
3049
|
+
* The read-only **`CountQueuingStrategy.highWaterMark`** property returns the total number of chunks that can be contained in the internal queue before backpressure is applied.
|
|
3050
|
+
*
|
|
3051
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark)
|
|
3052
|
+
*/
|
|
2503
3053
|
get highWaterMark(): number;
|
|
2504
3054
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
|
|
2505
3055
|
get size(): (chunk?: any) => number;
|
|
@@ -2632,62 +3182,158 @@ export interface UnsafeTraceMetrics {
|
|
|
2632
3182
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
2633
3183
|
}
|
|
2634
3184
|
/**
|
|
2635
|
-
* The URL
|
|
3185
|
+
* The **`URL`** interface is used to parse, construct, normalize, and encode URL.
|
|
2636
3186
|
*
|
|
2637
3187
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
2638
3188
|
*/
|
|
2639
3189
|
export declare class URL {
|
|
2640
3190
|
constructor(url: string | URL, base?: string | URL);
|
|
2641
|
-
|
|
3191
|
+
/**
|
|
3192
|
+
* The **`href`** property of the URL interface is a string containing the whole URL.
|
|
3193
|
+
*
|
|
3194
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href)
|
|
3195
|
+
*/
|
|
2642
3196
|
get href(): string;
|
|
2643
|
-
|
|
3197
|
+
/**
|
|
3198
|
+
* The **`href`** property of the URL interface is a string containing the whole URL.
|
|
3199
|
+
*
|
|
3200
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href)
|
|
3201
|
+
*/
|
|
2644
3202
|
set href(value: string);
|
|
2645
|
-
|
|
3203
|
+
/**
|
|
3204
|
+
* The **`origin`** read-only property of the URL interface returns a string containing the Unicode serialization of the origin of the represented URL.
|
|
3205
|
+
*
|
|
3206
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin)
|
|
3207
|
+
*/
|
|
2646
3208
|
get origin(): string;
|
|
2647
|
-
|
|
3209
|
+
/**
|
|
3210
|
+
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final `':'`.
|
|
3211
|
+
*
|
|
3212
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
3213
|
+
*/
|
|
2648
3214
|
get protocol(): string;
|
|
2649
|
-
|
|
3215
|
+
/**
|
|
3216
|
+
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final `':'`.
|
|
3217
|
+
*
|
|
3218
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
3219
|
+
*/
|
|
2650
3220
|
set protocol(value: string);
|
|
2651
|
-
|
|
3221
|
+
/**
|
|
3222
|
+
* The **`username`** property of the URL interface is a string containing the username component of the URL.
|
|
3223
|
+
*
|
|
3224
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
3225
|
+
*/
|
|
2652
3226
|
get username(): string;
|
|
2653
|
-
|
|
3227
|
+
/**
|
|
3228
|
+
* The **`username`** property of the URL interface is a string containing the username component of the URL.
|
|
3229
|
+
*
|
|
3230
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
3231
|
+
*/
|
|
2654
3232
|
set username(value: string);
|
|
2655
|
-
|
|
3233
|
+
/**
|
|
3234
|
+
* The **`password`** property of the URL interface is a string containing the password component of the URL.
|
|
3235
|
+
*
|
|
3236
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
3237
|
+
*/
|
|
2656
3238
|
get password(): string;
|
|
2657
|
-
|
|
3239
|
+
/**
|
|
3240
|
+
* The **`password`** property of the URL interface is a string containing the password component of the URL.
|
|
3241
|
+
*
|
|
3242
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
3243
|
+
*/
|
|
2658
3244
|
set password(value: string);
|
|
2659
|
-
|
|
3245
|
+
/**
|
|
3246
|
+
* 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.
|
|
3247
|
+
*
|
|
3248
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
3249
|
+
*/
|
|
2660
3250
|
get host(): string;
|
|
2661
|
-
|
|
3251
|
+
/**
|
|
3252
|
+
* 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.
|
|
3253
|
+
*
|
|
3254
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
3255
|
+
*/
|
|
2662
3256
|
set host(value: string);
|
|
2663
|
-
|
|
3257
|
+
/**
|
|
3258
|
+
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL.
|
|
3259
|
+
*
|
|
3260
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
3261
|
+
*/
|
|
2664
3262
|
get hostname(): string;
|
|
2665
|
-
|
|
3263
|
+
/**
|
|
3264
|
+
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL.
|
|
3265
|
+
*
|
|
3266
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
3267
|
+
*/
|
|
2666
3268
|
set hostname(value: string);
|
|
2667
|
-
|
|
3269
|
+
/**
|
|
3270
|
+
* The **`port`** property of the URL interface is a string containing the port number of the URL.
|
|
3271
|
+
*
|
|
3272
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
3273
|
+
*/
|
|
2668
3274
|
get port(): string;
|
|
2669
|
-
|
|
3275
|
+
/**
|
|
3276
|
+
* The **`port`** property of the URL interface is a string containing the port number of the URL.
|
|
3277
|
+
*
|
|
3278
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
3279
|
+
*/
|
|
2670
3280
|
set port(value: string);
|
|
2671
|
-
|
|
3281
|
+
/**
|
|
3282
|
+
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure.
|
|
3283
|
+
*
|
|
3284
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
3285
|
+
*/
|
|
2672
3286
|
get pathname(): string;
|
|
2673
|
-
|
|
3287
|
+
/**
|
|
3288
|
+
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure.
|
|
3289
|
+
*
|
|
3290
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
3291
|
+
*/
|
|
2674
3292
|
set pathname(value: string);
|
|
2675
|
-
|
|
3293
|
+
/**
|
|
3294
|
+
* 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.
|
|
3295
|
+
*
|
|
3296
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
3297
|
+
*/
|
|
2676
3298
|
get search(): string;
|
|
2677
|
-
|
|
3299
|
+
/**
|
|
3300
|
+
* 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.
|
|
3301
|
+
*
|
|
3302
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
3303
|
+
*/
|
|
2678
3304
|
set search(value: string);
|
|
2679
|
-
|
|
3305
|
+
/**
|
|
3306
|
+
* The **`searchParams`** read-only property of the access to the [MISSING: httpmethod('GET')] decoded query arguments contained in the URL.
|
|
3307
|
+
*
|
|
3308
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams)
|
|
3309
|
+
*/
|
|
2680
3310
|
get searchParams(): URLSearchParams;
|
|
2681
|
-
|
|
3311
|
+
/**
|
|
3312
|
+
* The **`hash`** property of the URL interface is a string containing a `'#'` followed by the fragment identifier of the URL.
|
|
3313
|
+
*
|
|
3314
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
3315
|
+
*/
|
|
2682
3316
|
get hash(): string;
|
|
2683
|
-
|
|
3317
|
+
/**
|
|
3318
|
+
* The **`hash`** property of the URL interface is a string containing a `'#'` followed by the fragment identifier of the URL.
|
|
3319
|
+
*
|
|
3320
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
3321
|
+
*/
|
|
2684
3322
|
set hash(value: string);
|
|
2685
3323
|
/*function toString() { [native code] }*/
|
|
2686
3324
|
toString(): string;
|
|
2687
|
-
|
|
3325
|
+
/**
|
|
3326
|
+
* 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.
|
|
3327
|
+
*
|
|
3328
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON)
|
|
3329
|
+
*/
|
|
2688
3330
|
toJSON(): string;
|
|
2689
3331
|
}
|
|
2690
|
-
|
|
3332
|
+
/**
|
|
3333
|
+
* The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL.
|
|
3334
|
+
*
|
|
3335
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams)
|
|
3336
|
+
*/
|
|
2691
3337
|
export declare class URLSearchParams {
|
|
2692
3338
|
constructor(
|
|
2693
3339
|
init?:
|
|
@@ -2696,45 +3342,53 @@ export declare class URLSearchParams {
|
|
|
2696
3342
|
| Record<string, string>
|
|
2697
3343
|
| [key: string, value: string][],
|
|
2698
3344
|
);
|
|
2699
|
-
|
|
3345
|
+
/**
|
|
3346
|
+
* The **`size`** read-only property of the URLSearchParams interface indicates the total number of search parameter entries.
|
|
3347
|
+
*
|
|
3348
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size)
|
|
3349
|
+
*/
|
|
2700
3350
|
get size(): number;
|
|
2701
3351
|
/**
|
|
2702
|
-
*
|
|
3352
|
+
* The **`append()`** method of the URLSearchParams interface appends a specified key/value pair as a new search parameter.
|
|
2703
3353
|
*
|
|
2704
3354
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
|
|
2705
3355
|
*/
|
|
2706
3356
|
append(name: string, value: string): void;
|
|
2707
3357
|
/**
|
|
2708
|
-
*
|
|
3358
|
+
* The **`delete()`** method of the URLSearchParams interface deletes specified parameters and their associated value(s) from the list of all search parameters.
|
|
2709
3359
|
*
|
|
2710
3360
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
2711
3361
|
*/
|
|
2712
3362
|
delete(name: string): void;
|
|
2713
3363
|
/**
|
|
2714
|
-
*
|
|
3364
|
+
* The **`get()`** method of the URLSearchParams interface returns the first value associated to the given search parameter.
|
|
2715
3365
|
*
|
|
2716
3366
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
|
|
2717
3367
|
*/
|
|
2718
3368
|
get(name: string): string | null;
|
|
2719
3369
|
/**
|
|
2720
|
-
*
|
|
3370
|
+
* The **`getAll()`** method of the URLSearchParams interface returns all the values associated with a given search parameter as an array.
|
|
2721
3371
|
*
|
|
2722
3372
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
|
|
2723
3373
|
*/
|
|
2724
3374
|
getAll(name: string): string[];
|
|
2725
3375
|
/**
|
|
2726
|
-
*
|
|
3376
|
+
* The **`has()`** method of the URLSearchParams interface returns a boolean value that indicates whether the specified parameter is in the search parameters.
|
|
2727
3377
|
*
|
|
2728
3378
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
|
|
2729
3379
|
*/
|
|
2730
3380
|
has(name: string): boolean;
|
|
2731
3381
|
/**
|
|
2732
|
-
*
|
|
3382
|
+
* The **`set()`** method of the URLSearchParams interface sets the value associated with a given search parameter to the given value.
|
|
2733
3383
|
*
|
|
2734
3384
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
2735
3385
|
*/
|
|
2736
3386
|
set(name: string, value: string): void;
|
|
2737
|
-
|
|
3387
|
+
/**
|
|
3388
|
+
* The **`URLSearchParams.sort()`** method sorts all key/value pairs contained in this object in place and returns `undefined`.
|
|
3389
|
+
*
|
|
3390
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort)
|
|
3391
|
+
*/
|
|
2738
3392
|
sort(): void;
|
|
2739
3393
|
/* Returns an array of key, value pairs for every entry in the search params. */
|
|
2740
3394
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
@@ -2751,7 +3405,7 @@ export declare class URLSearchParams {
|
|
|
2751
3405
|
) => void,
|
|
2752
3406
|
thisArg?: This,
|
|
2753
3407
|
): void;
|
|
2754
|
-
/*function toString() { [native code] }
|
|
3408
|
+
/*function toString() { [native code] }*/
|
|
2755
3409
|
toString(): string;
|
|
2756
3410
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
2757
3411
|
}
|
|
@@ -2805,26 +3459,26 @@ export interface URLPatternOptions {
|
|
|
2805
3459
|
ignoreCase?: boolean;
|
|
2806
3460
|
}
|
|
2807
3461
|
/**
|
|
2808
|
-
* A CloseEvent is sent to clients using WebSockets when the connection is closed.
|
|
3462
|
+
* A `CloseEvent` is sent to clients using WebSockets when the connection is closed.
|
|
2809
3463
|
*
|
|
2810
3464
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
|
|
2811
3465
|
*/
|
|
2812
3466
|
export declare class CloseEvent extends Event {
|
|
2813
3467
|
constructor(type: string, initializer?: CloseEventInit);
|
|
2814
3468
|
/**
|
|
2815
|
-
*
|
|
3469
|
+
* The **`code`** read-only property of the CloseEvent interface returns a WebSocket connection close code indicating the reason the connection was closed.
|
|
2816
3470
|
*
|
|
2817
3471
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/code)
|
|
2818
3472
|
*/
|
|
2819
3473
|
readonly code: number;
|
|
2820
3474
|
/**
|
|
2821
|
-
*
|
|
3475
|
+
* 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.
|
|
2822
3476
|
*
|
|
2823
3477
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/reason)
|
|
2824
3478
|
*/
|
|
2825
3479
|
readonly reason: string;
|
|
2826
3480
|
/**
|
|
2827
|
-
*
|
|
3481
|
+
* The **`wasClean`** read-only property of the CloseEvent interface returns `true` if the connection closed cleanly.
|
|
2828
3482
|
*
|
|
2829
3483
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/wasClean)
|
|
2830
3484
|
*/
|
|
@@ -2842,7 +3496,7 @@ export type WebSocketEventMap = {
|
|
|
2842
3496
|
error: ErrorEvent;
|
|
2843
3497
|
};
|
|
2844
3498
|
/**
|
|
2845
|
-
*
|
|
3499
|
+
* 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.
|
|
2846
3500
|
*
|
|
2847
3501
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2848
3502
|
*/
|
|
@@ -2859,20 +3513,20 @@ export declare var WebSocket: {
|
|
|
2859
3513
|
readonly CLOSED: number;
|
|
2860
3514
|
};
|
|
2861
3515
|
/**
|
|
2862
|
-
*
|
|
3516
|
+
* 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.
|
|
2863
3517
|
*
|
|
2864
3518
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2865
3519
|
*/
|
|
2866
3520
|
export interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
2867
3521
|
accept(): void;
|
|
2868
3522
|
/**
|
|
2869
|
-
*
|
|
3523
|
+
* 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.
|
|
2870
3524
|
*
|
|
2871
3525
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/send)
|
|
2872
3526
|
*/
|
|
2873
3527
|
send(message: (ArrayBuffer | ArrayBufferView) | string): void;
|
|
2874
3528
|
/**
|
|
2875
|
-
*
|
|
3529
|
+
* The **`WebSocket.close()`** method closes the already `CLOSED`, this method does nothing.
|
|
2876
3530
|
*
|
|
2877
3531
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/close)
|
|
2878
3532
|
*/
|
|
@@ -2880,25 +3534,25 @@ export interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
2880
3534
|
serializeAttachment(attachment: any): void;
|
|
2881
3535
|
deserializeAttachment(): any | null;
|
|
2882
3536
|
/**
|
|
2883
|
-
*
|
|
3537
|
+
* The **`WebSocket.readyState`** read-only property returns the current state of the WebSocket connection.
|
|
2884
3538
|
*
|
|
2885
3539
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/readyState)
|
|
2886
3540
|
*/
|
|
2887
3541
|
readyState: number;
|
|
2888
3542
|
/**
|
|
2889
|
-
*
|
|
3543
|
+
* The **`WebSocket.url`** read-only property returns the absolute URL of the WebSocket as resolved by the constructor.
|
|
2890
3544
|
*
|
|
2891
3545
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/url)
|
|
2892
3546
|
*/
|
|
2893
3547
|
url: string | null;
|
|
2894
3548
|
/**
|
|
2895
|
-
*
|
|
3549
|
+
* 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.
|
|
2896
3550
|
*
|
|
2897
3551
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/protocol)
|
|
2898
3552
|
*/
|
|
2899
3553
|
protocol: string | null;
|
|
2900
3554
|
/**
|
|
2901
|
-
*
|
|
3555
|
+
* The **`WebSocket.extensions`** read-only property returns the extensions selected by the server.
|
|
2902
3556
|
*
|
|
2903
3557
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
2904
3558
|
*/
|
|
@@ -2967,29 +3621,33 @@ export interface SocketInfo {
|
|
|
2967
3621
|
remoteAddress?: string;
|
|
2968
3622
|
localAddress?: string;
|
|
2969
3623
|
}
|
|
2970
|
-
|
|
3624
|
+
/**
|
|
3625
|
+
* The **`EventSource`** interface is web content's interface to server-sent events.
|
|
3626
|
+
*
|
|
3627
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource)
|
|
3628
|
+
*/
|
|
2971
3629
|
export declare class EventSource extends EventTarget {
|
|
2972
3630
|
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
2973
3631
|
/**
|
|
2974
|
-
*
|
|
3632
|
+
* The **`close()`** method of the EventSource interface closes the connection, if one is made, and sets the ```js-nolint close() ``` None.
|
|
2975
3633
|
*
|
|
2976
3634
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close)
|
|
2977
3635
|
*/
|
|
2978
3636
|
close(): void;
|
|
2979
3637
|
/**
|
|
2980
|
-
*
|
|
3638
|
+
* The **`url`** read-only property of the URL of the source.
|
|
2981
3639
|
*
|
|
2982
3640
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url)
|
|
2983
3641
|
*/
|
|
2984
3642
|
get url(): string;
|
|
2985
3643
|
/**
|
|
2986
|
-
*
|
|
3644
|
+
* The **`withCredentials`** read-only property of the the `EventSource` object was instantiated with CORS credentials set.
|
|
2987
3645
|
*
|
|
2988
3646
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials)
|
|
2989
3647
|
*/
|
|
2990
3648
|
get withCredentials(): boolean;
|
|
2991
3649
|
/**
|
|
2992
|
-
*
|
|
3650
|
+
* The **`readyState`** read-only property of the connection.
|
|
2993
3651
|
*
|
|
2994
3652
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
2995
3653
|
*/
|
|
@@ -3022,22 +3680,22 @@ export interface Container {
|
|
|
3022
3680
|
destroy(error?: any): Promise<void>;
|
|
3023
3681
|
signal(signo: number): void;
|
|
3024
3682
|
getTcpPort(port: number): Fetcher;
|
|
3683
|
+
setInactivityTimeout(durationMs: number | bigint): Promise<void>;
|
|
3025
3684
|
}
|
|
3026
3685
|
export interface ContainerStartupOptions {
|
|
3027
3686
|
entrypoint?: string[];
|
|
3028
3687
|
enableInternet: boolean;
|
|
3029
3688
|
env?: Record<string, string>;
|
|
3689
|
+
hardTimeout?: number | bigint;
|
|
3030
3690
|
}
|
|
3031
3691
|
/**
|
|
3032
|
-
*
|
|
3692
|
+
* 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.
|
|
3033
3693
|
*
|
|
3034
3694
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort)
|
|
3035
3695
|
*/
|
|
3036
3696
|
export interface MessagePort extends EventTarget {
|
|
3037
3697
|
/**
|
|
3038
|
-
*
|
|
3039
|
-
*
|
|
3040
|
-
* Throws a "DataCloneError" DOMException if transfer contains duplicate objects or port, or if message could not be cloned.
|
|
3698
|
+
* The **`postMessage()`** method of the transfers ownership of objects to other browsing contexts.
|
|
3041
3699
|
*
|
|
3042
3700
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/postMessage)
|
|
3043
3701
|
*/
|
|
@@ -3046,13 +3704,13 @@ export interface MessagePort extends EventTarget {
|
|
|
3046
3704
|
options?: any[] | MessagePortPostMessageOptions,
|
|
3047
3705
|
): void;
|
|
3048
3706
|
/**
|
|
3049
|
-
*
|
|
3707
|
+
* The **`close()`** method of the MessagePort interface disconnects the port, so it is no longer active.
|
|
3050
3708
|
*
|
|
3051
3709
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/close)
|
|
3052
3710
|
*/
|
|
3053
3711
|
close(): void;
|
|
3054
3712
|
/**
|
|
3055
|
-
*
|
|
3713
|
+
* The **`start()`** method of the MessagePort interface starts the sending of messages queued on the port.
|
|
3056
3714
|
*
|
|
3057
3715
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/start)
|
|
3058
3716
|
*/
|
|
@@ -3123,6 +3781,7 @@ export interface WorkerLoaderModule {
|
|
|
3123
3781
|
data?: ArrayBuffer;
|
|
3124
3782
|
json?: any;
|
|
3125
3783
|
py?: string;
|
|
3784
|
+
wasm?: ArrayBuffer;
|
|
3126
3785
|
}
|
|
3127
3786
|
export interface WorkerLoaderWorkerCode {
|
|
3128
3787
|
compatibilityDate: string;
|
|
@@ -6915,6 +7574,10 @@ export type AutoRagSearchRequest = {
|
|
|
6915
7574
|
ranker?: string;
|
|
6916
7575
|
score_threshold?: number;
|
|
6917
7576
|
};
|
|
7577
|
+
reranking?: {
|
|
7578
|
+
enabled?: boolean;
|
|
7579
|
+
model?: string;
|
|
7580
|
+
};
|
|
6918
7581
|
rewrite_query?: boolean;
|
|
6919
7582
|
};
|
|
6920
7583
|
export type AutoRagAiSearchRequest = AutoRagSearchRequest & {
|
|
@@ -8815,6 +9478,11 @@ export declare namespace CloudflareWorkersModule {
|
|
|
8815
9478
|
constructor(ctx: ExecutionContext, env: Env);
|
|
8816
9479
|
fetch?(request: Request): Response | Promise<Response>;
|
|
8817
9480
|
tail?(events: TraceItem[]): void | Promise<void>;
|
|
9481
|
+
tailStream?(
|
|
9482
|
+
event: TailStream.TailEvent<TailStream.Onset>,
|
|
9483
|
+
):
|
|
9484
|
+
| TailStream.TailEventHandlerType
|
|
9485
|
+
| Promise<TailStream.TailEventHandlerType>;
|
|
8818
9486
|
trace?(traces: TraceItem[]): void | Promise<void>;
|
|
8819
9487
|
scheduled?(controller: ScheduledController): void | Promise<void>;
|
|
8820
9488
|
queue?(batch: MessageBatch<unknown>): void | Promise<void>;
|
|
@@ -9193,7 +9861,14 @@ export interface VectorizeError {
|
|
|
9193
9861
|
*
|
|
9194
9862
|
* This list is expected to grow as support for more operations are released.
|
|
9195
9863
|
*/
|
|
9196
|
-
export type VectorizeVectorMetadataFilterOp =
|
|
9864
|
+
export type VectorizeVectorMetadataFilterOp =
|
|
9865
|
+
| "$eq"
|
|
9866
|
+
| "$ne"
|
|
9867
|
+
| "$lt"
|
|
9868
|
+
| "$lte"
|
|
9869
|
+
| "$gt"
|
|
9870
|
+
| "$gte";
|
|
9871
|
+
export type VectorizeVectorMetadataFilterCollectionOp = "$in" | "$nin";
|
|
9197
9872
|
/**
|
|
9198
9873
|
* Filter criteria for vector metadata used to limit the retrieved query result set.
|
|
9199
9874
|
*/
|
|
@@ -9206,6 +9881,12 @@ export type VectorizeVectorMetadataFilter = {
|
|
|
9206
9881
|
VectorizeVectorMetadataValue,
|
|
9207
9882
|
string[]
|
|
9208
9883
|
> | null;
|
|
9884
|
+
}
|
|
9885
|
+
| {
|
|
9886
|
+
[Op in VectorizeVectorMetadataFilterCollectionOp]?: Exclude<
|
|
9887
|
+
VectorizeVectorMetadataValue,
|
|
9888
|
+
string[]
|
|
9889
|
+
>[];
|
|
9209
9890
|
};
|
|
9210
9891
|
};
|
|
9211
9892
|
/**
|