UNPKG

756 BTypeScriptView Raw
1export declare function createElement<T extends HTMLElement = HTMLElement>(element: string, className?: string | null, parent?: Element | null, attributes?: {
2 [key: string]: string | ((event: any) => void);
3}): T;
4export declare function stopPropagation(event: Event): void;
5export declare function createScriptElement<T = object>(url: string, cb: string): Promise<T>;
6export declare const cx: (...classNames: (string | undefined)[]) => string;
7export declare function addClassName(element: Element | null, className: string | string[]): void;
8export declare function removeClassName(element: Element | null, className: string | string[]): void;
9export declare function replaceClassName(element: Element, find: string, replace: string): void;