Skip to content

Commit

Permalink
chore: improved index.d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
lquixada committed Mar 28, 2021
1 parent d7210dc commit 4e32613
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions index.d.ts
@@ -1,12 +1,27 @@
/// <reference no-default-lib="true"/>
/// <reference path="./lib.fetch.d.ts" />

type _fetch = typeof fetch
type _Response = Response
type _Request = Request
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
type _Headers = Headers

export {
_fetch as fetch,
Expand Down

1 comment on commit 4e32613

@xenjke
Copy link

@xenjke xenjke commented on 4e32613 Mar 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it is resolving #102

Please sign in to comment.