vue-plugin-kuzzle
Version:
A Vuejs plugin shipping the Kuzzle SDK in your components
28 lines (27 loc) • 781 B
TypeScript
import { PluginFunction } from 'vue';
import type { Kuzzle } from 'kuzzle-sdk';
import type { Backends, SDKOptions } from './types';
export interface VueKuzzleOptions {
backends: Backends;
sdkOptions?: SDKOptions;
}
/**
* Augment the typings of Vue.js
*
* ? Needed to add type for `$kuzzle` on Vue type
*/
declare module 'vue/types/vue' {
interface Vue {
$kuzzle: Kuzzle;
}
}
/**
* The VueKuzzle plugin. Makes the Kuzzle SDK available in Vue components as
* `this.$kuzzle`.
*
* @param Vue The Vue application to apply the plugin to
* @param options Options passed to the Kuzzle SDK constructor
*
* @see https://docs.kuzzle.io/sdk/js/7/core-classes/kuzzle/constructor/#options
*/
export declare const VueKuzzle: PluginFunction<VueKuzzleOptions>;