UNPKG

@sussudio/base

Version:

Internal APIs for VS Code's utilities and user interface building blocks.

29 lines (28 loc) 770 B
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { Emitter } from './event.mjs'; export class IMEImpl { _onDidChange = new Emitter(); onDidChange = this._onDidChange.event; _enabled = true; get enabled() { return this._enabled; } /** * Enable IME */ enable() { this._enabled = true; this._onDidChange.fire(); } /** * Disable IME */ disable() { this._enabled = false; this._onDidChange.fire(); } } export const IME = new IMEImpl();