-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
188 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* Copyright (c) 2024 The xterm.js authors. All rights reserved. | ||
* @license MIT | ||
*/ | ||
|
||
import { IDisposable, IDisposableStore, DisposableStoreCtorType, EmitterCtorType } from '@xterm/xterm'; | ||
|
||
export { DisposableStore, toDisposable } from 'vs/base/common/lifecycle'; | ||
export { Emitter } from 'vs/base/common/event'; | ||
|
||
export class DisposableAddon implements IDisposable { | ||
protected readonly _store: IDisposableStore; | ||
|
||
constructor(storeCtor: DisposableStoreCtorType) { | ||
this._store = new storeCtor(); | ||
} | ||
|
||
dispose(): void { | ||
this._store.dispose(); | ||
} | ||
} | ||
|
||
|
||
export class EmitterAddon { | ||
constructor( | ||
protected readonly emitterCtor: EmitterCtorType | ||
) {} | ||
} | ||
|
||
|
||
export class DisposableEmitterAddon implements IDisposable { | ||
protected readonly _store: IDisposableStore; | ||
|
||
constructor( | ||
readonly storeCtor: DisposableStoreCtorType, | ||
protected readonly emitterCtor: EmitterCtorType | ||
) { | ||
this._store = new storeCtor(); | ||
} | ||
|
||
dispose(): void { | ||
this._store.dispose(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"extends": "../tsconfig-library-base", | ||
"compilerOptions": { | ||
"lib": [ | ||
"es2015", | ||
"es2016.Array.Include" | ||
], | ||
"outDir": "../../out", | ||
"types": [ | ||
"../../node_modules/@types/mocha" | ||
], | ||
"baseUrl": "..", | ||
"paths": { | ||
"vs/*": [ "./vs/*" ] | ||
} | ||
}, | ||
"include": [ | ||
"./**/*", | ||
"../../typings/xterm.d.ts" | ||
], | ||
"references": [ | ||
{ "path": "../vs" } | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters