mirror of https://github.com/rancher/dashboard.git
Update return type of `useStore`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
This commit is contained in:
parent
6fbc8668a7
commit
c4721774a6
|
|
@ -1,4 +1,5 @@
|
||||||
import { getCurrentInstance } from 'vue';
|
import { getCurrentInstance } from 'vue';
|
||||||
|
import { Store } from 'vuex';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* useStore allows for accessing Vuex stores from within a setup function. This is a temporary measure for working with
|
* useStore allows for accessing Vuex stores from within a setup function. This is a temporary measure for working with
|
||||||
|
|
@ -6,7 +7,7 @@ import { getCurrentInstance } from 'vue';
|
||||||
*
|
*
|
||||||
* TODO: #9541 Remove for Vue 3 migration
|
* TODO: #9541 Remove for Vue 3 migration
|
||||||
*/
|
*/
|
||||||
export const useStore = ():unknown => {
|
export const useStore = ():Store<any> => {
|
||||||
const vm = getCurrentInstance();
|
const vm = getCurrentInstance();
|
||||||
|
|
||||||
if (!vm) throw new Error('useStore() must be called from setup()');
|
if (!vm) throw new Error('useStore() must be called from setup()');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue