diff --git a/gateway-js/src/make-fetch-happen.d.ts b/gateway-js/src/make-fetch-happen.d.ts deleted file mode 100644 index 88ed260e0..000000000 --- a/gateway-js/src/make-fetch-happen.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -declare module 'make-fetch-happen' { - import { - Response, - Request, - RequestInfo, - RequestInit, - } from 'apollo-server-env'; - - // If adding to these options, they should mirror those from `make-fetch-happen` - // @see: https://github.com/npm/make-fetch-happen/#extra-options - export interface FetcherOptions { - cacheManager?: string | CacheManager; - // @see: https://www.npmjs.com/package/retry#retrytimeoutsoptions - retry?: - | boolean - | number - | { - // The maximum amount of times to retry the operation. Default is 10. Seting this to 1 means do it once, then retry it once - retries?: number; - // The exponential factor to use. Default is 2. - factor?: number; - // The number of milliseconds before starting the first retry. Default is 1000. - minTimeout?: number; - // The maximum number of milliseconds between two retries. Default is Infinity. - maxTimeout?: number; - // Randomizes the timeouts by multiplying with a factor between 1 to 2. Default is false. - randomize?: boolean; - }; - onRetry?(): void; - } - - export interface CacheManager { - delete(req: Request): Promise; - put(req: Request, res: Response): Promise; - match(req: Request): Promise; - } - - /** - * This is an augmentation of the fetch function types provided by `apollo-server-env` - * @see: https://git.io/JvBwX - */ - export interface Fetcher { - (input?: RequestInfo, init?: RequestInit & FetcherOptions): Promise< - Response - >; - } - - let fetch: Fetcher & { - defaults(opts?: RequestInit & FetcherOptions): Fetcher; - }; - - export default fetch; -}