UNPKG

sussudio

Version:

An unofficial VS Code Internal API

15 lines (14 loc) 696 B
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { Emitter } from "./event.mjs"; export class Sequence { elements = []; _onDidSplice = new Emitter(); onDidSplice = this._onDidSplice.event; splice(start, deleteCount, toInsert = []) { this.elements.splice(start, deleteCount, ...toInsert); this._onDidSplice.fire({ start, deleteCount, toInsert }); } }