Skip to main content

ShortcutHandler<T, O>

Extends

Type Parameters

Type ParameterDefault type
T extends ShortcutShortcut
O extends ShortcutHandlerOptionsShortcutHandlerOptions

Constructors

Constructor

new ShortcutHandler<T, O>(options): ShortcutHandler<T, O>;

Parameters

ParameterType
optionsO

Returns

ShortcutHandler<T, O>

Overrides

AbstractSetting.constructor

Properties

PropertyTypeInherited from
deserializedbooleanAbstractSetting.deserialized
loggerLoggerAbstractSetting.logger
optionsOAbstractSetting.options

Accessors

initialized

Inherited from

AbstractSetting.initialized

Methods

addShortcut()

addShortcut(shortcut): void;

Parameters

ParameterType
shortcutT

Returns

void


deserialize()

deserialize(data): Promise<void>;

Parameters

ParameterType
dataShortcutHandlerSerialized

Returns

Promise<void>

Overrides

AbstractSetting.deserialize

dispose()

dispose(): void;

Returns

void


doDeserialize()

doDeserialize(data): void;

FYI: This is called after init()

Parameters

ParameterType
dataany

Returns

void

Inherited from

AbstractSetting.doDeserialize


doSerialize()

doSerialize(): any;

Returns

any

Inherited from

AbstractSetting.doSerialize


generateShortcut()

abstract generateShortcut(action): T;

Parameters

ParameterType
actionShortcutHandlerAction

Returns

T


getMetaForAction()

abstract getMetaForAction(id): ShortcutHandlerAction;

Parameters

ParameterType
idstring

Returns

ShortcutHandlerAction


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

ParameterType
actionShortcutHandlerAction

Returns

T[]


init()

init(): Promise<void>;

Returns

Promise<void>

Inherited from

AbstractSetting.init


reset()

reset(): Promise<void>;

Returns

Promise<void>

Overrides

AbstractSetting.reset


save()

save(): void;

Returns

void

Inherited from

AbstractSetting.save


serialize()

serialize(): ShortcutHandlerSerialized;

Returns

ShortcutHandlerSerialized

Overrides

AbstractSetting.serialize

updateOptions()

updateOptions(options): void;

Parameters

ParameterType
optionsPartial<T>

Returns

void

Inherited from

AbstractSetting.updateOptions


v2Patch()

v2Patch(data): ShortcutHandlerSerialized;

Parameters

ParameterType
dataShortcutHandlerSerialized

Returns

ShortcutHandlerSerialized


waitForReady()

waitForReady(): Promise<ShortcutHandler<T, O>>;

Returns

Promise<ShortcutHandler<T, O>>

Inherited from

AbstractSetting.waitForReady