mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
import ProgressState type to d.ts
This commit is contained in:
@@ -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
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user