types: remove any in useExpose

This commit is contained in:
chenjiahan 2020-09-25 10:55:19 +08:00
parent dffa6eb083
commit f28bce200f

View File

@ -2,6 +2,8 @@ import { getCurrentInstance } from 'vue';
// expose public api
export function useExpose(apis: Record<string, any>) {
const vm = (getCurrentInstance() as any).ctx;
Object.assign(vm, apis);
const instance = getCurrentInstance();
if (instance) {
Object.assign(instance.proxy, apis);
}
}