summaryrefslogtreecommitdiff
path: root/cli/js/lib.deno.shared_globals.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/lib.deno.shared_globals.d.ts')
-rw-r--r--cli/js/lib.deno.shared_globals.d.ts21
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;
};