UNPKG

@sussudio/platform

Version:

Internal APIs for VS Code's service injection the base services.

30 lines (28 loc) 1.64 kB
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { Chord, SingleModifierChord, ResolvedKeybinding, ResolvedChord } from '@sussudio/base/common/keybindings.mjs'; import { OperatingSystem } from '@sussudio/base/common/platform.mjs'; export declare abstract class BaseResolvedKeybinding<T extends Chord> extends ResolvedKeybinding { protected readonly _os: OperatingSystem; protected readonly _chords: readonly T[]; constructor(os: OperatingSystem, chords: readonly T[]); getLabel(): string | null; getAriaLabel(): string | null; getElectronAccelerator(): string | null; getUserSettingsLabel(): string | null; isWYSIWYG(): boolean; hasMultipleChords(): boolean; getChords(): ResolvedChord[]; private _getChord; getDispatchChords(): (string | null)[]; getSingleModifierDispatchChords(): (SingleModifierChord | null)[]; protected abstract _getLabel(keybinding: T): string | null; protected abstract _getAriaLabel(keybinding: T): string | null; protected abstract _getElectronAccelerator(keybinding: T): string | null; protected abstract _getUserSettingsLabel(keybinding: T): string | null; protected abstract _isWYSIWYG(keybinding: T): boolean; protected abstract _getChordDispatch(keybinding: T): string | null; protected abstract _getSingleModifierChordDispatch(keybinding: T): SingleModifierChord | null; }