mirror of
https://github.com/jaandrle/deka-dom-el
synced 2026-01-11 16:26:28 +01:00
💥 WIP custom elements docs and types and utils
This commit is contained in:
12
index.d.ts
vendored
12
index.d.ts
vendored
@@ -175,6 +175,18 @@ export const scope: {
|
||||
pop(): ReturnType<Array<Scope>["pop"]>,
|
||||
};
|
||||
|
||||
export function customElementRender<
|
||||
EL extends HTMLElement,
|
||||
P extends any = Record<string, any>
|
||||
>(
|
||||
custom_element: EL,
|
||||
render: (props: P)=> SupportedElement,
|
||||
props?: P | ((...args: any[])=> P)
|
||||
): EL
|
||||
export function customElementWithDDE<EL extends HTMLElement>(custom_element: EL): EL
|
||||
export function lifecycleToEvents<EL extends HTMLElement>(custom_element: EL): EL
|
||||
export function observedAttributes(custom_element: HTMLElement): Record<string, string>
|
||||
|
||||
/* TypeScript MEH // TODO for SVG */
|
||||
type ddeAppend<el>= (...nodes: (Node | string)[])=> el;
|
||||
declare global{
|
||||
|
||||
Reference in New Issue
Block a user