1 import * as vscode from "vscode";
4 * This class provides a simple wrapper around vscode.Disposable that allows
5 * for registering additional disposables.
7 export class DisposableContext implements vscode.Disposable {
8 private _disposables: vscode.Disposable[] = [];
13 for (const disposable of this._disposables) {
16 this._disposables = [];
20 * Push an additional disposable to the context.
22 * @param disposable The disposable to register.
24 public pushSubscription(disposable: vscode.Disposable) {
25 this._disposables.push(disposable);