diff options
author | Marcos Casagrande <marcoscvp90@gmail.com> | 2020-05-25 18:55:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-25 12:55:16 -0400 |
commit | 08f74e1f6a180e83e13f5570811b8b7fcec90e9f (patch) | |
tree | bad2721de533bc6eb80c029754b88a6c3fb15444 /cli/js/lib.deno.shared_globals.d.ts | |
parent | aef9f22462d287a5d18e517aabd8f03210d159b8 (diff) |
fix(cli/web/fetch): Make Response constructor standard (#5787)
Diffstat (limited to 'cli/js/lib.deno.shared_globals.d.ts')
-rw-r--r-- | cli/js/lib.deno.shared_globals.d.ts | 21 |
1 files changed, 7 insertions, 14 deletions
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; }; |