Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/base/browser/ui/list/splice.ts
3296 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { ISpliceable } from '../../../common/sequence.js';
7
8
export interface ISpreadSpliceable<T> {
9
splice(start: number, deleteCount: number, ...elements: T[]): void;
10
}
11
12
export class CombinedSpliceable<T> implements ISpliceable<T> {
13
14
constructor(private spliceables: ISpliceable<T>[]) { }
15
16
splice(start: number, deleteCount: number, elements: T[]): void {
17
this.spliceables.forEach(s => s.splice(start, deleteCount, elements));
18
}
19
}
20