From 27a72a12b772cfa74b519714aca6e3b6fdaa5eeb Mon Sep 17 00:00:00 2001 From: ayame113 <40050810+ayame113@users.noreply.github.com> Date: Wed, 20 Jul 2022 19:30:41 +0900 Subject: chore: align some Web API type definitions to lib.dom.d.ts (#15219) --- ext/fetch/lib.deno_fetch.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/fetch') diff --git a/ext/fetch/lib.deno_fetch.d.ts b/ext/fetch/lib.deno_fetch.d.ts index 18c39c866..79d435468 100644 --- a/ext/fetch/lib.deno_fetch.d.ts +++ b/ext/fetch/lib.deno_fetch.d.ts @@ -252,7 +252,7 @@ interface RequestInit { /** This Fetch API interface represents a resource request. */ declare class Request implements Body { - constructor(input: RequestInfo, init?: RequestInit); + constructor(input: RequestInfo | URL, init?: RequestInit); /** * Returns the cache mode associated with request, which is a string @@ -385,7 +385,7 @@ declare class Response implements Body { constructor(body?: BodyInit | null, init?: ResponseInit); static json(data: unknown, init?: ResponseInit): Response; static error(): Response; - static redirect(url: string, status?: number): Response; + static redirect(url: string | URL, status?: number): Response; readonly headers: Headers; readonly ok: boolean; -- cgit v1.2.3