import { App , Plugin } from 'vue' ; export const install = < T > ( component , alias ? ) => { const C = component as any ; C . install = ( app ) => { app . component ( C . name , component ) ; if ( alias ) app . config . globalProperties [ alias ] = component ; } ; return component as T & Plugin ; } ;