Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing Headers interface augmentation from lib.dom.iterable.d.ts #97

Merged
merged 1 commit into from Mar 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions index.d.ts
@@ -1,13 +1,15 @@
import {
import type {
BodyInit,
Headers,
Headers as BaseHeaders,
HeadersInit,
Request,
RequestInfo,
RequestInit,
Response,
ResponseInit,
} from "./lib.fetch"
import type { Headers as IterHeaders } from "./lib.fetch.iterable";
type Headers = BaseHeaders & IterHeaders;

export const fetch: (input: RequestInfo, init?: RequestInit) => Promise<Response>;

Expand Down
16 changes: 16 additions & 0 deletions lib.fetch.iterable.d.ts
@@ -0,0 +1,16 @@
// Generated by resolving typescript/lib/lib.dom.iterable.d.ts from typescript@4.2.3
export interface Headers {
[Symbol.iterator](): IterableIterator<[string, string]>;
/**
* Returns an iterator allowing to go through all key/value pairs contained in this object.
*/
entries(): IterableIterator<[string, string]>;
/**
* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object.
*/
keys(): IterableIterator<string>;
/**
* Returns an iterator allowing to go through all values of the key/value pairs contained in this object.
*/
values(): IterableIterator<string>;
}
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -86,7 +86,8 @@
"dist",
"polyfill",
"index.d.ts",
"lib.fetch.d.ts"
"lib.fetch.d.ts",
"lib.fetch.iterable.d.ts"
],
"keywords": [
"fetch",
Expand Down