@augment-vir/web
Version:
A collection of augments, helpers types, functions, and classes only for web (frontend) JavaScript environments.
13 lines (12 loc) • 635 B
TypeScript
import { type DeclarativeElementDefinition } from 'element-vir';
import { type SpecTagName } from 'html-spec-tags';
/**
* Reduce an element down to its tag name or its element definition if it's a custom element defined
* by element-vir. Note that the types for this won't work in your project if you use custom element
* tag names that aren't generated via element-vir.
*
* @category Web : Elements
* @category Package : @augment-vir/web
* @package [`@augment-vir/web`](https://www.npmjs.com/package/@augment-vir/web)
*/
export declare function toTagOrDefinition(element: Element): DeclarativeElementDefinition | SpecTagName;