From 08f74e1f6a180e83e13f5570811b8b7fcec90e9f Mon Sep 17 00:00:00 2001 From: Marcos Casagrande Date: Mon, 25 May 2020 18:55:16 +0200 Subject: fix(cli/web/fetch): Make Response constructor standard (#5787) --- cli/js/lib.deno.shared_globals.d.ts | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (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 ed1c1ac0b..f3a565668 100644 --- a/cli/js/lib.deno.shared_globals.d.ts +++ b/cli/js/lib.deno.shared_globals.d.ts @@ -922,6 +922,12 @@ declare const Request: { new (input: RequestInfo, init?: RequestInit): Request; }; +interface ResponseInit { + headers?: HeadersInit; + status?: number; + statusText?: string; +} + type ResponseType = | "basic" | "cors" @@ -945,20 +951,7 @@ interface Response extends Body { declare const Response: { prototype: Response; - - // TODO(#4667) Response constructor is non-standard. - // new(body?: BodyInit | null, init?: ResponseInit): Response; - new ( - url: string, - status: number, - statusText: string, - headersList: Array<[string, string]>, - rid: number, - redirected_: boolean, - type_?: null | ResponseType, - body_?: null | Body - ): Response; - + new (body?: BodyInit | null, init?: ResponseInit): Response; error(): Response; redirect(url: string, status?: number): Response; }; -- cgit v1.2.3