fix: release "Allow URL class object as an argument for fetch()" #1696 (#1716)

This commit is contained in:
Maxim Mazurok 2023-03-11 21:47:05 +11:00 committed by GitHub
parent 8ced5b941c
commit 7b86e946b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

4
@types/index.d.ts vendored
View File

@ -147,7 +147,7 @@ export type RequestRedirect = 'error' | 'follow' | 'manual';
export type ReferrerPolicy = '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'same-origin' | 'origin' | 'strict-origin' | 'origin-when-cross-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
export type RequestInfo = string | Request;
export class Request extends BodyMixin {
constructor(input: RequestInfo | URL, init?: RequestInit);
constructor(input: URL | RequestInfo, init?: RequestInit);
/**
* Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header.
@ -216,4 +216,4 @@ export class AbortError extends Error {
}
export function isRedirect(code: number): boolean;
export default function fetch(url: RequestInfo | URL, init?: RequestInit): Promise<Response>;
export default function fetch(url: URL | RequestInfo, init?: RequestInit): Promise<Response>;