@benev/nubs
Version:
user-input system for web games
79 lines (78 loc) • 3.1 kB
TypeScript
import { Bindings } from "../elements/context/bindings/types/bindings.js";
declare const NubBindingsEvent_base: {
new (name: string, options: CustomEventInit<{
bindings: Bindings;
}> & {
detail: {
bindings: Bindings;
};
}): {
readonly detail: {
bindings: Bindings;
};
initCustomEvent(type: string, bubbles?: boolean | undefined, cancelable?: boolean | undefined, detail?: {
bindings: Bindings;
} | undefined): void;
readonly bubbles: boolean;
cancelBubble: boolean;
readonly cancelable: boolean;
readonly composed: boolean;
readonly currentTarget: EventTarget | null;
readonly defaultPrevented: boolean;
readonly eventPhase: number;
readonly isTrusted: boolean;
returnValue: boolean;
readonly srcElement: EventTarget | null;
readonly target: EventTarget | null;
readonly timeStamp: number;
readonly type: string;
composedPath(): EventTarget[];
initEvent(type: string, bubbles?: boolean | undefined, cancelable?: boolean | undefined): void;
preventDefault(): void;
stopImmediatePropagation(): void;
stopPropagation(): void;
readonly NONE: 0;
readonly CAPTURING_PHASE: 1;
readonly AT_TARGET: 2;
readonly BUBBLING_PHASE: 3;
};
readonly type: string;
readonly target: (target: EventTarget) => {
dispatch(detail: {
bindings: Bindings;
}, options?: Partial<import("@chasemoskal/magical").DispatchOptions> | undefined): void;
listen(listener: (event: {
readonly detail: {
bindings: Bindings;
};
initCustomEvent(type: string, bubbles?: boolean | undefined, cancelable?: boolean | undefined, detail?: {
bindings: Bindings;
} | undefined): void;
readonly bubbles: boolean;
cancelBubble: boolean;
readonly cancelable: boolean;
readonly composed: boolean;
readonly currentTarget: EventTarget | null;
readonly defaultPrevented: boolean;
readonly eventPhase: number;
readonly isTrusted: boolean;
returnValue: boolean;
readonly srcElement: EventTarget | null;
readonly target: EventTarget | null;
readonly timeStamp: number;
readonly type: string;
composedPath(): EventTarget[];
initEvent(type: string, bubbles?: boolean | undefined, cancelable?: boolean | undefined): void;
preventDefault(): void;
stopImmediatePropagation(): void;
stopPropagation(): void;
readonly NONE: 0;
readonly CAPTURING_PHASE: 1;
readonly AT_TARGET: 2;
readonly BUBBLING_PHASE: 3;
}) => void, options?: boolean | AddEventListenerOptions | undefined): () => void;
};
};
export declare class NubBindingsEvent extends NubBindingsEvent_base {
}
export {};