Skip to content

Commit

Permalink
[types] Improved exposed typings
Browse files Browse the repository at this point in the history
  • Loading branch information
xbill82 committed Feb 10, 2022
1 parent 3585919 commit 629a798
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ declare module 'vue/types/vue' {
}
}

export interface Backends {
[name: string]: Backend
}

export interface Backend {
host: string;
options: {
port: number;
sslConnection: boolean
}
}

/**
* The VueKuzzle plugin. Makes the Kuzzle SDK available in Vue components as
* `this.$kuzzle`.
Expand All @@ -18,3 +30,11 @@ declare module 'vue/types/vue' {
* @see https://docs.kuzzle.io/sdk/js/7/core-classes/kuzzle/constructor/#options
*/
export declare function VueKuzzle(Vue: typeof _Vue, options: any): void;

/**
* Instantiates the Kuzzle SDK by resolving the backend from the given config.
*
* @param backendsConfig
* @param sdkOptions
*/
export declare function instantiateKuzzleSDK(backendsConfig: Backends, sdkOptions: any): Kuzzle

0 comments on commit 629a798

Please sign in to comment.