export function useTargetElement<T extends GlobalTarget>(
target: Getterable<T>,
options?: UseTargetElementOptions,
): RefObject<T>
export function useTargetElement<T extends Element | null>(
target: Getterable<T>,
options?: UseTargetElementOptions,
): RefObject<T>
export function useTargetElement<T extends keyof HTMLElementTagNameMap>(
target: Getterable<T>,
options?: UseTargetElementOptions,
): RefObject<HTMLElementTagNameMap[T]>
export function useTargetElement<T extends keyof SVGElementTagNameMap>(
target: Getterable<T>,
options?: UseTargetElementOptions,
): RefObject<SVGElementTagNameMap[T]>
export function useTargetElement<A extends AtomBaseTarget, T extends ElementTarget<A> = ElementTarget<A>>(
target: Getterable<T>,
options?: UseTargetElementOptions,
): RefObject<A>
export function useTargetElement<
R extends GlobalTarget | Element,
T extends string | null | undefined | false | MutableRefObject<AtomBaseTarget | undefined> | R,
>(target: Getterable<T>, options?: UseTargetElementOptions): RefObject<R>