Skip to content

Commit

Permalink
fix: reverted index.d.ts to its original state (prior 3.1.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
lquixada committed Apr 1, 2021
1 parent ddfe452 commit 3fce389
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 559 deletions.
47 changes: 13 additions & 34 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,35 +1,14 @@
/// <reference no-default-lib="true"/>
/// <reference path="./lib.fetch.d.ts" />

declare function _fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;

declare var _Request: {
prototype: Request;
new(input: RequestInfo, init?: RequestInit): Request;
};

declare var _Response: {
prototype: Response;
new(body?: BodyInit | null, init?: ResponseInit): Response;
error(): Response;
redirect(url: string, status?: number): Response;
};

declare var _Headers: {
prototype: Headers;
new(init?: HeadersInit): Headers;
};

type _RequestInfo = RequestInfo
type _RequestInit = RequestInit

export {
_fetch as fetch,
_Response as Response,
_Request as Request,
_RequestInfo as RequestInfo,
_RequestInit as RequestInit,
_Headers as Headers,
/// <reference lib="dom" />

declare const _fetch: typeof fetch;
declare const _Request: typeof Request;
declare const _Response: typeof Response;
declare const _Headers: typeof Headers;

declare module "cross-fetch" {
export const fetch: typeof _fetch;
export const Request: typeof _Request;
export const Response: typeof _Response;
export const Headers: typeof _Headers;
export default fetch;
}

export default _fetch
Loading

0 comments on commit 3fce389

Please sign in to comment.