Skip to content

Commit

Permalink
Add optional url property to ResponseInit
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnwalraven committed Jul 16, 2018
1 parent cd1a463 commit a59167d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/apollo-server-env/src/fetch.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ export type ReferrerPolicy =
| 'unsafe-url';

export declare class Response extends Body {
// node-fetch accepts options as the second argument instead of a pure ResponseInit
constructor(body?: BodyInit, options?: ResponseOptions);
constructor(body?: BodyInit, init?: ResponseInit);
static error(): Response;
static redirect(url: string, status?: number): Response;

Expand All @@ -97,9 +96,7 @@ export interface ResponseInit {
headers?: HeadersInit;
status?: number;
statusText?: string;
}

export interface ResponseOptions extends ResponseInit {
// Although this isn't part of the spec, `node-fetch` accepts a `url` property
url?: string;
}

Expand Down

0 comments on commit a59167d

Please sign in to comment.