UNPKG

@guruhotel/aura-hooks

Version:

🪝 Hooks library designed by the Guruhotel team for Aura UI

8 lines (7 loc) 517 B
import type { MutableRefObject } from "react"; export declare const isFunction: (value: unknown) => value is Function; declare type TargetValue<T> = T | undefined | null; declare type TargetType = HTMLElement | Element | Window | Document; export declare type BasicTarget<T extends TargetType = Element> = (() => TargetValue<T>) | TargetValue<T> | MutableRefObject<TargetValue<T>>; export declare function getTargetElement<T extends TargetType>(target: BasicTarget<T>, defaultElement?: T): TargetValue<T>; export {};