import type { App, Component, Plugin } from 'vue' export let VueInstance: App /** set the global vue instance */ export const setVueInstance = (Vue: App): void => { VueInstance = Vue } /** register a plugin to the vue app instance */ export const registerPlugin = (app: App, plugin: Plugin): void => { app.use(plugin) } /** register a component to the vue app instance */ export const registerComponent = (app: App, componentName: string, component: Component): void => { app.component(componentName, component) }