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

Remove reference to GlobalFetch in Typescript #1095

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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