uhtml
Version:
A micro HTML/SVG render
68 lines (67 loc) • 1.57 kB
TypeScript
export function abc(a: any, b: any, c: any): {
a: any;
b: any;
c: any;
};
export function bc(b: any, c: any): {
b: any;
c: any;
};
export function detail(u: any, t: any, n: any, c: any): Detail;
export function cache(): Cache;
export type PersistentFragment = import("./persistent-fragment.js").PersistentFragment;
export type Hole = import("./rabbit.js").Hole;
export type Value = unknown;
export type Target = Node | Element | PersistentFragment;
export type DOMValue = null | undefined | string | number | boolean | Node | Element | PersistentFragment;
export type ArrayValue = Hole | Node;
export type Detail = {
/**
* the current value of the interpolation / hole
*/
v: any;
/**
* the callback to update the value
*/
u: Function;
/**
* the target comment node or element
*/
t: Node;
/**
* the attribute name, if any, or `null`
*/
n: string | null | Node;
/**
* the cache value for this detail
*/
c: Cache | ArrayValue[] | null;
};
export type Entry = {
/**
* the path to retrieve the node
*/
a: number[];
/**
* the update function
*/
b: Function;
/**
* the attribute name, if any, or `null`
*/
c: string | null;
};
export type Cache = {
/**
* the cached template
*/
a: null | TemplateStringsArray;
/**
* the node returned when parsing the template
*/
b: null | Node | PersistentFragment;
/**
* the list of updates to perform
*/
c: Detail[];
};