Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Remove reference to GlobalFetch in Typescript (#1095)
Browse files Browse the repository at this point in the history
Fixes compilation of apollo-link-http-common in the upcoming Typescript 3.6.

Fixes #1094
  • Loading branch information
sandersn authored and benjamn committed Jun 20, 2019
1 parent 0d006fa commit 04d405a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/apollo-link-http-common/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export interface HttpOptions {
/**
* A `fetch`-compatible API to use when making requests.
*/
fetch?: GlobalFetch['fetch'];
fetch?: WindowOrWorkerGlobalScope['fetch'];

/**
* An object representing values to be sent as headers on the request.
Expand Down Expand Up @@ -171,7 +171,7 @@ export const parseAndCheckHttpResponse = operations => (response: Response) => {
);
};

export const checkFetcher = (fetcher: GlobalFetch['fetch']) => {
export const checkFetcher = (fetcher: WindowOrWorkerGlobalScope['fetch']) => {
if (!fetcher && typeof fetch === 'undefined') {
let library: string = 'unfetch';
if (typeof window === 'undefined') library = 'node-fetch';
Expand Down

0 comments on commit 04d405a

Please sign in to comment.