import { SimpleDocument, SimpleElement, SimpleNode } from '@simple-dom/interface'; interface GenericElementTags { HTML: HTMLElement; SVG: SVGElement; ELEMENT: HTMLElement | SVGElement; } interface GenericNodeTags { NODE: Node; } declare type GenericNodeTag = keyof GenericNodeTags; interface BrowserElementTags extends HTMLElementTagNameMap, GenericElementTags { } declare type BrowserElementTag = keyof BrowserElementTags; interface BrowserTags extends BrowserElementTags, GenericNodeTags { } declare type BrowserTag = keyof BrowserTags; declare type NodeCheck = (node: Node) => node is N; declare type SugaryNodeCheck = NodeCheck | K | K[]; declare type NodeForSugaryCheck> = S extends NodeCheck ? N : S extends keyof BrowserTags ? BrowserTags[S] : S extends (keyof BrowserTags)[] ? BrowserTags[S[number]] : never; declare type BrowserNode = Element | Document | DocumentFragment | Text | Comment | Node; export declare function castToSimple(doc: Document | SimpleDocument): SimpleDocument; export declare function castToSimple(elem: Element | SimpleElement): SimpleElement; export declare function castToSimple(node: Node | SimpleNode): SimpleNode; export declare function castToBrowser(doc: Document | SimpleDocument): Document; export declare function castToBrowser>(node: BrowserNode | SimpleNode, check: S): NodeForSugaryCheck; export declare function castToBrowser>(element: BrowserNode | SimpleNode, check: S): NodeForSugaryCheck; export declare function castToBrowser(element: SimpleElement | Element, check: K): HTMLElementTagNameMap[K]; export declare function checkNode(node: Node | null, check: S): NodeForSugaryCheck; export {}; //# sourceMappingURL=simple-cast.d.ts.map