import ProgressState type to d.ts

This commit is contained in:
Jörg Breitbart
2025-01-07 18:22:27 +01:00
parent a1e85a4eb5
commit 5badbd3a6f
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ import type { Terminal, ITerminalAddon, IDisposable } from '@xterm/xterm';
import type { ProgressAddon as IProgressApi, IProgress, ProgressHandler } from '@xterm/addon-progress';
const enum ProgressState {
export const enum ProgressState {
REMOVE = 0,
SET = 1,
ERROR = 2,
+3 -2
View File
@@ -4,6 +4,7 @@
*/
import { Terminal, ITerminalAddon, IDisposable } from '@xterm/xterm';
import type { ProgressState } from '../src/ProgressAddon';
declare module '@xterm/addon-progress' {
/** xterm.js addon providing an interface for ConEmu's progress sequence */
@@ -21,10 +22,10 @@ declare module '@xterm/addon-progress' {
/** progress object interface */
export interface IProgress {
state: 0 | 1 | 2 | 3 | 4;
state: ProgressState;
value: number;
}
/** Progress handler type */
export type ProgressHandler = (state: 0 | 1 | 2 | 3 | 4, value: number) => void;
export type ProgressHandler = (state: ProgressState, value: number) => void;
}