diff --git a/src/env/browser/fetch.ts b/src/env/browser/fetch.ts index 68dd758..f7a0389 100644 --- a/src/env/browser/fetch.ts +++ b/src/env/browser/fetch.ts @@ -1,5 +1,7 @@ -export default globalThis.fetch; +const fetch = globalThis.fetch; +export { fetch }; declare type _BodyInit = BodyInit; declare type _RequestInit = RequestInit; -export type { _BodyInit as BodyInit, _RequestInit as RequestInit }; +declare type _Response = Response; +export type { _BodyInit as BodyInit, _RequestInit as RequestInit, _Response as Response }; diff --git a/src/env/node/fetch.ts b/src/env/node/fetch.ts index 694dd0f..296f3bd 100644 --- a/src/env/node/fetch.ts +++ b/src/env/node/fetch.ts @@ -1,5 +1,4 @@ import fetch from 'node-fetch'; -// eslint-disable-next-line import/no-default-export -export default fetch; -export type { BodyInit, RequestInit } from 'node-fetch'; +export { fetch }; +export type { BodyInit, RequestInit, Response } from 'node-fetch'; diff --git a/src/premium/github/github.ts b/src/premium/github/github.ts index c4e9527..f496b1b 100644 --- a/src/premium/github/github.ts +++ b/src/premium/github/github.ts @@ -2,7 +2,7 @@ import { Octokit } from '@octokit/core'; import { GraphqlResponseError } from '@octokit/graphql'; import { RequestError } from '@octokit/request-error'; import type { Endpoints, OctokitResponse, RequestParameters } from '@octokit/types'; -import fetch from '@env/fetch'; +import { fetch } from '@env/fetch'; import { isWeb } from '@env/platform'; import { AuthenticationError,