type HtmlTag = keyof HTMLElementTagNameMap;
type HtmlElement = HTMLElementTagNameMap[T];
type HtmlAttributes = Partial<
Omit, 'style' | 'children'> & {
style?: string | Partial;
class?: string;
onclick?: (event: MouseEvent) => void;
}
>;
declare global {
const fs: {
exec(
command: string,
args?: string[],
env?: Record,
): Promise<{
stdout: string;
stderr: string;
code?: number;
}>;
};
const E: (
type: T,
attr?: HtmlAttributes | null,
children?: (Node | string)[] | Node | string,
) => HTMLElementTagNameMap[T];
const uci: {
load: (packages: string | string[]) => Promise;
sections: (conf: string, type?: string, cb?: () => void) => Promise;
};
const _ = (_key: string) => string;
const ui = {
showModal: (_title: stirng, _content: HtmlElement) => undefined,
hideModal: () => undefined,
addNotification: (
_title: string,
_children: HtmlElement | HtmlElement[],
_className?: string,
) => undefined,
};
}
export {};