8 lines
347 B
TypeScript
8 lines
347 B
TypeScript
import { VueGlobal } from "@/types/Basics";
|
|
import { ComponentInternalInstance, getCurrentInstance } from "vue";
|
|
export default function useCurrentInstance(): VueGlobal {
|
|
const { appContext } = getCurrentInstance() as ComponentInternalInstance;
|
|
const proxy = appContext.config.globalProperties;
|
|
return proxy as unknown as VueGlobal;
|
|
}
|