| 1 |
// The little of the vscode module the bridge and the model use, for the |
| 2 |
// smoke test under plain Node. |
| 3 |
export class EventEmitter { |
| 4 |
constructor() { this.listeners = []; this.event = (l) => { this.listeners.push(l); return { dispose: () => {} }; }; } |
| 5 |
fire(v) { for (const l of this.listeners) l(v); } |
| 6 |
dispose() { this.listeners = []; } |
| 7 |
} |
| 8 |
export class Disposable { constructor(f) { this.f = f; } dispose() { this.f?.(); } } |
| 9 |
export const workspace = { getConfiguration: () => ({ get: (k) => (k === "path" ? process.env.SPECTRA_BIN || "" : undefined) }), workspaceFolders: undefined }; |
| 10 |
export const window = {}; |