mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Typings for apollo-upload-client (#27094)
* Typings for apollo-upload-client * Update package.json * Triggering build
This commit is contained in:
parent
fb6990cd4d
commit
4a4db6d249
16
types/apollo-upload-client/apollo-upload-client-tests.ts
Normal file
16
types/apollo-upload-client/apollo-upload-client-tests.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { createUploadLink, ReactNativeFile } from "apollo-upload-client";
|
||||
|
||||
new ReactNativeFile({
|
||||
name: "its coming home",
|
||||
type: "its coming",
|
||||
uri: "football's coming home",
|
||||
});
|
||||
|
||||
createUploadLink({
|
||||
fetch: (uri, options) => fetch(`http://localhost/${uri}`, options),
|
||||
fetchOptions: { method: "GET" },
|
||||
headers: { special: "Special header value" },
|
||||
includeExtensions: true,
|
||||
uri: "http://localhost",
|
||||
credentials: "beepboop",
|
||||
});
|
||||
16
types/apollo-upload-client/index.d.ts
vendored
Normal file
16
types/apollo-upload-client/index.d.ts
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
// 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: 2.2
|
||||
|
||||
import { ApolloLink } from "apollo-link";
|
||||
import { HttpOptions } from "apollo-link-http-common";
|
||||
|
||||
export { ReactNativeFile } from "extract-files";
|
||||
|
||||
/**
|
||||
* `createUploadLink` options match `createHttpLink` options
|
||||
* @param linkOptions `HttpOptions`
|
||||
*/
|
||||
export function createUploadLink(linkOptions?: HttpOptions): ApolloLink;
|
||||
7
types/apollo-upload-client/package.json
Normal file
7
types/apollo-upload-client/package.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"apollo-link": "^1.0.0",
|
||||
"apollo-link-http-common": "^0.2.4"
|
||||
}
|
||||
}
|
||||
23
types/apollo-upload-client/tsconfig.json
Normal file
23
types/apollo-upload-client/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6", "dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"apollo-upload-client-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/apollo-upload-client/tslint.json
Normal file
1
types/apollo-upload-client/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user