import type { AnyProps, AttributeDictionary, HTMLElementTagName } from "@knyt/weaver"; import type { KnytElement } from "../KnytElement.ts"; import type { ElementDefinition, HTMLElementConstructor, PropertiesDefinition } from "../types.ts"; import { type DefineElementDefinitionOptions } from "./defineElementDefinition.ts"; import { type DefineElementOptions } from "./defineKnytElement.ts"; /** * Creates a custom element with the given tagname and options. * * This is a shorthand function for defining a custom element without having * to use the class interface. * * @param tagName The name of the custom element. * @param options The options for the custom element. * @returns A element definition for the custom element. * * @public */ export declare function defineElement(tagName: TN, options: Omit, "tagName">): ElementDefinition.FromPropertiesDefinition>; /** * Creates a custom element with the given options. * * This is a shorthand function for defining a custom element without having * to use the class interface. * * @param options The options for the custom element. * @returns A element definition for the custom element. * * @public * * @deprecated */ export declare function defineElement(options: DefineElementOptions): ElementDefinition.FromPropertiesDefinition>; /** * Defines a custom element with the given tagname and constructor. * * @param tagName The name of the custom element. * @param ElementConstructor The constructor of the custom element. * @returns A element definition for the custom element. * * @public */ export declare function defineElement, A extends AnyProps = KnytElement.ToAttributes>(tagName: U, ElementConstructor: T, options?: DefineElementDefinitionOptions): ElementDefinition; /** * Defines a custom element with the given tagname and constructor. * * This overload is for non-KnytElement constructors (arbitrary elements). * * @param tagName The name of the custom element. * @param ElementConstructor The constructor of the custom element. * @param options Additional options for defining the element. * @returns A element definition for the custom element. * * @public */ export declare function defineElement, A extends AnyProps = AttributeDictionary>(tagName: U, ElementConstructor: T, options?: DefineElementDefinitionOptions): ElementDefinition.Arbitrary; //# sourceMappingURL=defineElement.d.ts.map