interface Action<T> {
    description?: string;
    forUser?: boolean;
    handler: ActionHandler<T>;
    keys?: null | (string | number)[];
    name: T;
    when?: (() => boolean);
}

Type Parameters

  • T extends string = string

Properties

description?: string

Description

forUser?: boolean

user can set keybinding or list in action manager

handler: ActionHandler<T>

Handler

keys?: null | (string | number)[]

Associate shortcuts

name: T

Name

when?: (() => boolean)

When should execute handler