-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: reverted index.d.ts to its original state (prior 3.1.0)
- Loading branch information
Showing
5 changed files
with
18 additions
and
559 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.