From 04d405a342903274ff67c42dae51a89ee20e72dc Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Thu, 20 Jun 2019 10:34:14 -0700 Subject: [PATCH] Remove reference to GlobalFetch in Typescript (#1095) Fixes compilation of apollo-link-http-common in the upcoming Typescript 3.6. Fixes #1094 --- packages/apollo-link-http-common/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/apollo-link-http-common/src/index.ts b/packages/apollo-link-http-common/src/index.ts index 9e42a685bb..bc51b656b6 100644 --- a/packages/apollo-link-http-common/src/index.ts +++ b/packages/apollo-link-http-common/src/index.ts @@ -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. @@ -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';