summaryrefslogtreecommitdiff
path: root/js/dom_types.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/dom_types.ts')
-rw-r--r--js/dom_types.ts25
1 files changed, 13 insertions, 12 deletions
diff --git a/js/dom_types.ts b/js/dom_types.ts
index 817f91abf..7e4198506 100644
--- a/js/dom_types.ts
+++ b/js/dom_types.ts
@@ -254,6 +254,7 @@ export interface ReadableStream {
readonly locked: boolean;
cancel(): Promise<void>;
getReader(): ReadableStreamReader;
+ tee(): [ReadableStream, ReadableStream];
}
export interface EventListenerObject {
@@ -434,16 +435,16 @@ export interface Request extends Body {
* indicating how the the request will interact with the browser's cache when
* fetching.
*/
- readonly cache: RequestCache;
+ readonly cache?: RequestCache;
/** Returns the credentials mode associated with request, which is a string
* indicating whether credentials will be sent with the request always, never,
* or only when sent to a same-origin URL.
*/
- readonly credentials: RequestCredentials;
+ readonly credentials?: RequestCredentials;
/** Returns the kind of resource requested by request, (e.g., `document` or
* `script`).
*/
- readonly destination: RequestDestination;
+ readonly destination?: RequestDestination;
/** Returns a Headers object consisting of the headers associated with
* request.
*
@@ -455,32 +456,32 @@ export interface Request extends Body {
* hash of the resource being fetched. Its value consists of multiple hashes
* separated by whitespace. [SRI]
*/
- readonly integrity: string;
+ readonly integrity?: string;
/** Returns a boolean indicating whether or not request is for a history
* navigation (a.k.a. back-forward navigation).
*/
- readonly isHistoryNavigation: boolean;
+ readonly isHistoryNavigation?: boolean;
/** Returns a boolean indicating whether or not request is for a reload
* navigation.
*/
- readonly isReloadNavigation: boolean;
+ readonly isReloadNavigation?: boolean;
/** Returns a boolean indicating whether or not request can outlive the global
* in which it was created.
*/
- readonly keepalive: boolean;
+ readonly keepalive?: boolean;
/** Returns request's HTTP method, which is `GET` by default. */
readonly method: string;
/** Returns the mode associated with request, which is a string indicating
* whether the request will use CORS, or will be restricted to same-origin
* URLs.
*/
- readonly mode: RequestMode;
+ readonly mode?: RequestMode;
/** Returns the redirect mode associated with request, which is a string
* indicating how redirects for the request will be handled during fetching.
*
* A request will follow redirects by default.
*/
- readonly redirect: RequestRedirect;
+ readonly redirect?: RequestRedirect;
/** Returns the referrer of request. Its value can be a same-origin URL if
* explicitly set in init, the empty string to indicate no referrer, and
* `about:client` when defaulting to the global's default.
@@ -488,16 +489,16 @@ export interface Request extends Body {
* This is used during fetching to determine the value of the `Referer`
* header of the request being made.
*/
- readonly referrer: string;
+ readonly referrer?: string;
/** Returns the referrer policy associated with request. This is used during
* fetching to compute the value of the request's referrer.
*/
- readonly referrerPolicy: ReferrerPolicy;
+ readonly referrerPolicy?: ReferrerPolicy;
/** Returns the signal associated with request, which is an AbortSignal object
* indicating whether or not request has been aborted, and its abort event
* handler.
*/
- readonly signal: AbortSignal;
+ readonly signal?: AbortSignal;
/** Returns the URL of request as a string. */
readonly url: string;
clone(): Request;