summaryrefslogtreecommitdiff
path: root/cli/js/lib.deno.shared_globals.d.ts
diff options
context:
space:
mode:
authorserverhiccups <hiccup@hiccup01.com>2020-02-04 03:54:47 +1300
committerGitHub <noreply@github.com>2020-02-03 15:54:47 +0100
commit2b0cf74a8f6335ae4e8ef2dfe1010d2695b1c518 (patch)
treed2d725273149dc17e10c306fa4aeaa1a02685530 /cli/js/lib.deno.shared_globals.d.ts
parentfba40d86c4cbb8ff406175820ea9a2d9eb2b40cd (diff)
Make fetch API more standards compliant (#3667)
Diffstat (limited to 'cli/js/lib.deno.shared_globals.d.ts')
-rw-r--r--cli/js/lib.deno.shared_globals.d.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/cli/js/lib.deno.shared_globals.d.ts b/cli/js/lib.deno.shared_globals.d.ts
index c8dfc833d..722bc6a49 100644
--- a/cli/js/lib.deno.shared_globals.d.ts
+++ b/cli/js/lib.deno.shared_globals.d.ts
@@ -1083,7 +1083,7 @@ declare namespace __fetch {
readonly url: string;
readonly status: number;
statusText: string;
- readonly type = "basic";
+ readonly type: __domTypes.ResponseType;
readonly redirected: boolean;
headers: __domTypes.Headers;
readonly trailer: Promise<__domTypes.Headers>;
@@ -1092,9 +1092,11 @@ declare namespace __fetch {
constructor(
url: string,
status: number,
+ statusText: string,
headersList: Array<[string, string]>,
rid: number,
redirected_: boolean,
+ type_?: null | __domTypes.ResponseType,
body_?: null | Body
);
arrayBuffer(): Promise<ArrayBuffer>;
@@ -1104,6 +1106,7 @@ declare namespace __fetch {
text(): Promise<string>;
readonly ok: boolean;
clone(): __domTypes.Response;
+ redirect(url: URL | string, status: number): __domTypes.Response;
}
/** Fetch a resource from the network. */
export function fetch(