UNPKG

asciitorium

Version:
28 lines (27 loc) 842 B
import { Component, ComponentProps } from '../core/Component.js'; import { State } from '../core/State.js'; export interface KeybindOptions extends ComponentProps { keyBinding: string; action: () => void; description?: string; disabled?: State<boolean> | boolean; priority?: number; } export declare class Keybind extends Component { readonly keyBinding: string; readonly action: () => void; readonly description?: string; readonly priority: number; private disabledState?; private staticDisabled; private registrationAttempted; private timeoutId?; private destroyed; constructor(options: KeybindOptions); get disabled(): boolean; setParent(parent: Component): void; private registerWithApp; destroy(): void; private unregisterWithApp; draw(): string[][]; }