Files
apollo/types/apollo-provider.d.ts
T
joe-re 2cbf10db78 Update typed apollo provider (#273)
* upgrade @types/graphql

* refactor type definition

* remove unused property

* update apollo-provider type definition

ref: #66504309599ce9d4a31feb8fd5f065d790349c86
2018-05-21 19:44:50 +02:00

15 lines
706 B
TypeScript

/* eslint no-unused-vars: 0 */
import { ApolloClient, ApolloQueryResult } from 'apollo-client'
import Vue, { PluginFunction, AsyncComponent } from 'vue'
import { VueApolloComponentOption } from './options'
export type VueApolloComponent<V extends Vue = Vue> = VueApolloComponentOption<V> | typeof Vue | AsyncComponent;
export class ApolloProvider {
provide: (key?: string) => this
prefetchAll: (context: any, components: VueApolloComponent[], options?: { includeGlobal?: boolean }) => Promise<ApolloQueryResult<any>[]>
getStates(options?: { exportNamespace?: string }): { [key: string]: any }
exportStates(oprions?: { globalName?: string, attachTo?: string, exportNamespace?: string}): string
}