@surface/custom-element
Version:
Provides support of directives and data binding on custom elements.
10 lines (9 loc) • 508 B
TypeScript
import type { Constructor } from "@surface/core";
import type ICustomElement from "../interfaces/custom-element";
import type CustomElementDefinitionOptions from "../types/custom-element-definition-options.js";
/**
* Defines a new custom element.
* @param tagname tag name to be registered.
* @param options definition options.
*/
export default function element(tagname: `${string}-${string}`, options?: CustomElementDefinitionOptions): <T extends Constructor<ICustomElement>>(target: T) => T;