File size: 976 Bytes
7421850 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | /**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { EventEmitter } from 'node:events';
export enum TransientMessageType {
Warning = 'warning',
Hint = 'hint',
}
export interface TransientMessagePayload {
message: string;
type: TransientMessageType;
}
export enum AppEvent {
OpenDebugConsole = 'open-debug-console',
Flicker = 'flicker',
SelectionWarning = 'selection-warning',
PasteTimeout = 'paste-timeout',
TerminalBackground = 'terminal-background',
TransientMessage = 'transient-message',
ScrollToBottom = 'scroll-to-bottom',
}
export interface AppEvents {
[AppEvent.OpenDebugConsole]: never[];
[AppEvent.Flicker]: never[];
[AppEvent.SelectionWarning]: never[];
[AppEvent.PasteTimeout]: never[];
[AppEvent.TerminalBackground]: [string];
[AppEvent.TransientMessage]: [TransientMessagePayload];
[AppEvent.ScrollToBottom]: never[];
}
export const appEvents = new EventEmitter<AppEvents>();
|