Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jerch committed Jan 11, 2025
1 parent 543fefa commit 05a2bfb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 24 deletions.
2 changes: 1 addition & 1 deletion addons/addon-progress/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
alias: {
common: path.resolve('../../out/common'),
browser: path.resolve('../../out/browser'),
vs: path.resolve('../../out/vs'),
vs: path.resolve('../../out/vs')
}
},
output: {
Expand Down
1 change: 0 additions & 1 deletion demo/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ function createTerminal(): void {
addons.serialize.instance = new SerializeAddon();
addons.fit.instance = new FitAddon();
addons.image.instance = new ImageAddon();
//addons.progress.instance = new ProgressAddon(Terminal as unknown as IXtermSharedImports);
addons.progress.instance = new ProgressAddon(sharedExports);
addons.unicodeGraphemes.instance = new UnicodeGraphemesAddon();
addons.clipboard.instance = new ClipboardAddon();
Expand Down
44 changes: 22 additions & 22 deletions typings/xterm-headless.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1363,26 +1363,26 @@ declare module '@xterm/headless' {
* EXPERIMENTAL:
* Module exposure of certain building blocks to be used at runtime in addons.
*/
export interface ISharedExports {
readonly DisposableStore: new() => IDisposableStore;
readonly Emitter: new<T>() => IEmitter<T>;
readonly toDisposable: (fn: () => void) => IDisposable;
}
export const sharedExports: ISharedExports;
// FIXME: @Tyriar - plz have a look at the following interfaces and
// to what degree those should be exposed or get stripped down
export interface IEmitter<T> extends IDisposable {
event: IEvent<T>;
fire(event: T): void;
hasListeners(): boolean;
}
export interface IDisposableStore extends IDisposable {
isDisposed: boolean;
clear(): void;
add<T extends IDisposable>(o: T): T;
delete<T extends IDisposable>(o: T): void;
deleteAndLeak<T extends IDisposable>(o: T): void;
}
export interface ISharedExports {
readonly DisposableStore: new() => IDisposableStore;
readonly Emitter: new<T>() => IEmitter<T>;
readonly toDisposable: (fn: () => void) => IDisposable;
}

export const sharedExports: ISharedExports;

// FIXME: @Tyriar - plz have a look at the following interfaces and
// to what degree those should be exposed or get stripped down
export interface IEmitter<T> extends IDisposable {
event: IEvent<T>;
fire(event: T): void;
hasListeners(): boolean;
}
export interface IDisposableStore extends IDisposable {
isDisposed: boolean;
clear(): void;
add<T extends IDisposable>(o: T): T;
delete<T extends IDisposable>(o: T): void;
deleteAndLeak<T extends IDisposable>(o: T): void;
}
}

0 comments on commit 05a2bfb

Please # to comment.