UNPKG

@eclipse-glsp/client

Version:

A sprotty-based client for GLSP

45 lines 2.02 kB
/******************************************************************************** * Copyright (c) 2023 Business Informatics Group (TU Wien) and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0. * * This Source Code may also be made available under the following Secondary * Licenses when the conditions for such availability set forth in the Eclipse * Public License v. 2.0 are satisfied: GNU General Public License, version 2 * with the GNU Classpath Exception which is available at * https://www.gnu.org/software/classpath/license.html. * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ import { Action } from '@eclipse-glsp/sprotty'; export interface HideToastAction extends Action { kind: typeof HideToastAction.KIND; options: HideToastAction.Options; } export declare namespace HideToastAction { const KIND = "hideToastMessageAction"; type Options = Pick<ToastOptions, 'id' | 'timeout'>; function is(object: any): object is HideToastAction; function create(options: Options): HideToastAction; } export interface ShowToastMessageAction extends Action { kind: typeof ShowToastMessageAction.KIND; options: ToastOptions; } export declare namespace ShowToastMessageAction { const KIND = "showToastMessageAction"; const TIMEOUT = 2000; type CreateOptions = Partial<ToastOptions> & Required<Pick<ToastOptions, 'message'>>; function is(object: any): object is ShowToastMessageAction; function create(options: CreateOptions): ShowToastMessageAction; function createWithTimeout(options: CreateOptions): ShowToastMessageAction; } export interface ToastOptions { id: symbol; timeout?: number; position: 'left' | 'center' | 'right'; message: string; } //# sourceMappingURL=toast-handler.d.ts.map