types/element.types.ts

types/element.types.ts is a file in Bane's Lab Site. 8 lines of code and 3 definitions.

export type ElementChild = Element | string;

export interface ElementSpec {
    readonly attributes?: Readonly<Record<string, string>>;
    readonly children?: readonly ElementChild[];
    readonly className?: string;
    readonly text?: string;
}

export type ElementTag = keyof HTMLElementTagNameMap;