Skip to content

Commit 1ddacc6

Browse files
committed
fix: correct augment typings of vue.js
1 parent 9f81742 commit 1ddacc6

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"typescript": "5.1.*"
4444
},
4545
"files": [
46-
"dist",
47-
"vue-kuzzle.d.ts"
46+
"dist"
4847
]
4948
}

src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import '../vue-kuzzle.d';
21
export * from './composables';
32
export * from './helpers';
43
export * from './types';

src/plugin.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
11
import { PluginFunction } from 'vue';
2+
import type { Kuzzle } from 'kuzzle-sdk';
3+
24
import { instantiateKuzzleSDK } from './helpers';
3-
import { Backends, SDKOptions } from './types';
5+
import type { Backends, SDKOptions } from './types';
46

57
export interface VueKuzzleOptions {
68
backends: Backends;
79
sdkOptions: SDKOptions;
810
}
911

12+
/**
13+
* Augment the typings of Vue.js
14+
*
15+
* ? Needed to add type for `$kuzzle` on Vue type
16+
*/
17+
declare module 'vue/types/vue' {
18+
interface Vue {
19+
$kuzzle: Kuzzle;
20+
}
21+
}
22+
1023
/**
1124
* The VueKuzzle plugin. Makes the Kuzzle SDK available in Vue components as
1225
* `this.$kuzzle`.

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
},
3232
"include": [
3333
"./src/**/*.ts",
34-
"./vue-kuzzle.d.ts"
3534
],
3635
"exclude": [
3736
"node_modules"

vue-kuzzle.d.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)