ShortcutHandler<T, O>
Extends
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends Shortcut | Shortcut |
O extends ShortcutHandlerOptions | ShortcutHandlerOptions |
Constructors
Constructor
new ShortcutHandler<T, O>(options): ShortcutHandler<T, O>;
Parameters
| Parameter | Type |
|---|---|
options | O |
Returns
ShortcutHandler<T, O>
Overrides
Properties
| Property | Type | Inherited from |
|---|---|---|
deserialized | boolean | AbstractSetting.deserialized |
logger | Logger | AbstractSetting.logger |
options | O | AbstractSetting.options |
Accessors
initialized
Inherited from
Methods
addShortcut()
addShortcut(shortcut): void;
Parameters
| Parameter | Type |
|---|---|
shortcut | T |
Returns
void
deserialize()
deserialize(data): Promise<void>;
Parameters
| Parameter | Type |
|---|---|
data | ShortcutHandlerSerialized |
Returns
Promise<void>
Overrides
AbstractSetting.deserialize
dispose()
dispose(): void;
Returns
void
doDeserialize()
doDeserialize(data): void;
FYI: This is called after init()
Parameters
| Parameter | Type |
|---|---|
data | any |
Returns
void
Inherited from
doSerialize()
doSerialize(): any;
Returns
any
Inherited from
generateShortcut()
abstract generateShortcut(action): T;
Parameters
| Parameter | Type |
|---|---|
action | ShortcutHandlerAction |
Returns
T
getMetaForAction()
abstract getMetaForAction(id): ShortcutHandlerAction;
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
getPossibleActions()
abstract getPossibleActions(): ShortcutHandlerAction<ShortcutHandler<Shortcut<ShortcutHandler<any, ShortcutHandlerOptions>>, ShortcutHandlerOptions>>[];
Returns
ShortcutHandlerAction<ShortcutHandler<Shortcut<ShortcutHandler<any, ShortcutHandlerOptions>>, ShortcutHandlerOptions>>[]
getShortcuts()
getShortcuts(): T[];
Returns
T[]
getShortcutsForAction()
getShortcutsForAction(action): T[];
Parameters
| Parameter | Type |
|---|---|
action | ShortcutHandlerAction |
Returns
T[]
init()
init(): Promise<void>;
Returns
Promise<void>
Inherited from
reset()
reset(): Promise<void>;
Returns
Promise<void>
Overrides
save()
save(): void;
Returns
void
Inherited from
serialize()
serialize(): ShortcutHandlerSerialized;
Returns
Overrides
AbstractSetting.serialize
updateOptions()
updateOptions(options): void;
Parameters
| Parameter | Type |
|---|---|
options | Partial<T> |
Returns
void
Inherited from
v2Patch()
v2Patch(data): ShortcutHandlerSerialized;
Parameters
| Parameter | Type |
|---|---|
data | ShortcutHandlerSerialized |
Returns
waitForReady()
waitForReady(): Promise<ShortcutHandler<T, O>>;
Returns
Promise<ShortcutHandler<T, O>>