linkmore-design
Version:
π πlmη»δ»ΆεΊγπ
8 lines (7 loc) β’ 504 B
TypeScript
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): T;
export {};