Skip to content

Commit 629a798

Browse files
committed
[types] Improved exposed typings
1 parent 3585919 commit 629a798

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

index.d.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@ declare module 'vue/types/vue' {
88
}
99
}
1010

11+
export interface Backends {
12+
[name: string]: Backend
13+
}
14+
15+
export interface Backend {
16+
host: string;
17+
options: {
18+
port: number;
19+
sslConnection: boolean
20+
}
21+
}
22+
1123
/**
1224
* The VueKuzzle plugin. Makes the Kuzzle SDK available in Vue components as
1325
* `this.$kuzzle`.
@@ -18,3 +30,11 @@ declare module 'vue/types/vue' {
1830
* @see https://docs.kuzzle.io/sdk/js/7/core-classes/kuzzle/constructor/#options
1931
*/
2032
export declare function VueKuzzle(Vue: typeof _Vue, options: any): void;
33+
34+
/**
35+
* Instantiates the Kuzzle SDK by resolving the backend from the given config.
36+
*
37+
* @param backendsConfig
38+
* @param sdkOptions
39+
*/
40+
export declare function instantiateKuzzleSDK(backendsConfig: Backends, sdkOptions: any): Kuzzle

0 commit comments

Comments
 (0)