4 lines
197 B
TypeScript
Raw Normal View History

2024-01-29 09:26:07 +08:00
declare type GetElement = () => HTMLElement;
declare function unwrapElement<T>(target: T | string | GetElement): T extends HTMLElement ? HTMLElement : HTMLElement | null;
export { unwrapElement };