Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

progress-addon #5251

Merged
merged 17 commits into from
Jan 9, 2025
Prev Previous commit
Next Next commit
Update addons/addon-progress/typings/addon-progress.d.ts
Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
  • Loading branch information
jerch and Tyriar authored Jan 9, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 75e5cc19e02684ea4311d1db76f9edc8806a4a71
29 changes: 26 additions & 3 deletions addons/addon-progress/typings/addon-progress.d.ts
Original file line number Diff line number Diff line change
@@ -8,19 +8,42 @@ import type { Event } from 'vs/base/common/event';
import type { ProgressState } from '../src/ProgressAddon';

declare module '@xterm/addon-progress' {
/** xterm.js addon providing an interface for ConEmu's progress sequence */
/**
* An xterm.js addon that provides an interface for ConEmu's progress
* sequence.
*/
export class ProgressAddon implements ITerminalAddon, IDisposable {

/**
* Creates a new progress addon
*/
constructor();

/**
* Activates the addon
* @param terminal The terminal the addon is being loaded in.
*/
public activate(terminal: Terminal): void;

/**
* Disposes the addon.
*/
public dispose(): void;

/**
* An event that fires when the tracked progress changes.
*/
public readonly onChange: Event<IProgress> | undefined;

/** getter / setter for current progress */
/**
* Gets or sets the current progress tracked by the addon.
*/
public progress: IProgress;
}

/** progress object interface */
/**
* Progress tracked by the addon.
*/
export interface IProgress {
state: ProgressState;
value: number;
Loading