DefinitelyTyped/types/apollo-upload-client/index.d.ts
Nathan Shively-Sanders 984e42db6f
Fixes for early June TS3.6 DOM update (#36294)
* Fixes for early June TS3.6 DOM update

1. Apollo-link used GlobalFetch, which has been removed. Until my PR
goes in (apollographql/apollo-link#1095), I added a shim in
apollo-upload-client, which uses apollo-link-http-common.
2. dom-inputevent is updated to match the spec-standard InputEvent types that
will ship with Typescript 3.6.
3. Same for webappsec-credential-management
4. Fixed to-markdown's tests to work with the new, non-nullable
definition of node.style.fontStyle.

* Fix redundant `undefined` lint

* Make fetch shim work on more versions of Typescript

* Require TS 3.1 for apollo-upload-client fix
2019-06-19 13:57:51 -07:00

23 lines
714 B
TypeScript

// Type definitions for apollo-upload-client 8.1
// Project: https://github.com/jaydenseric/apollo-upload-client#readme
// Definitions by: Edward Sammut Alessi <https://github.com/Slessi>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.1
import { ApolloLink } from "apollo-link";
import { HttpOptions } from "apollo-link-http-common";
export { ReactNativeFile } from "extract-files";
declare global {
interface GlobalFetch {
fetch: WindowOrWorkerGlobalScope["fetch"];
}
}
/**
* `createUploadLink` options match `createHttpLink` options
* @param linkOptions `HttpOptions`
*/
export function createUploadLink(linkOptions?: HttpOptions): ApolloLink;