From 2b0cf74a8f6335ae4e8ef2dfe1010d2695b1c518 Mon Sep 17 00:00:00 2001 From: serverhiccups Date: Tue, 4 Feb 2020 03:54:47 +1300 Subject: Make fetch API more standards compliant (#3667) --- cli/js/lib.deno.shared_globals.d.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cli/js/lib.deno.shared_globals.d.ts') 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; @@ -1104,6 +1106,7 @@ declare namespace __fetch { text(): Promise; readonly ok: boolean; clone(): __domTypes.Response; + redirect(url: URL | string, status: number): __domTypes.Response; } /** Fetch a resource from the network. */ export function fetch( -- cgit v1.2.3