UNPKG

@twobirds/microcomponents

Version:

Micro Components Organization Class

36 lines 1.48 kB
import { LooseObject } from './helpers.js'; import { McEvent } from './McEvent.js'; export interface HTMLMcElement extends HTMLElement { _mc: LooseObject; } declare function addListener(domNode: Node, eventName: string, handler: EventListenerOrEventListenerObject | null, capture?: boolean, once?: boolean): void; declare function removeListener(domNode: Node, eventName: string, handler: EventListenerOrEventListenerObject | null): void; declare function trigger(target: HTMLElement, ev: McEvent | string, data?: any, bubble?: string): void; declare class McBase { #private; constructor(target?: { [key: string]: any; }, debug?: boolean); get target(): any; } declare class MC extends McBase { _mc?: LooseObject; constructor(target?: any); static trigger: typeof trigger; trigger(ev: McEvent | string, data?: any, bubble?: string): this | undefined; } declare class DC extends McBase { _mc?: LooseObject; constructor(target: HTMLElement, debug?: boolean); static add: Function; static remove: Function; static trigger: Function; trigger(ev: McEvent | string, data?: any, bubble?: string): void; parent(search?: string): any[]; ancestors(search?: string): any[]; children(search?: string): any[]; descendants(search?: string): any[]; } declare function autoload(enable?: boolean): boolean; export { addListener, removeListener, McBase, MC, DC, McEvent, autoload }; //# sourceMappingURL=MC.d.ts.map