vue-hooks-plus
Version:
Vue hooks library
7 lines (6 loc) • 444 B
TypeScript
import type { Ref, ComponentPublicInstance } from 'vue';
type TargetValue<T> = T | undefined | null;
type TargetType = HTMLElement | Element | Window | Document | ComponentPublicInstance;
export type BasicTarget<T extends TargetType = Element> = (() => TargetValue<T>) | TargetValue<T> | Ref<TargetValue<T>>;
export declare function getTargetElement<T extends TargetType>(target: BasicTarget<T>, defaultElement?: T): TargetValue<T>;
export {};