mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-17 20:44:27 +01:00
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
9 lines
283 B
TypeScript
9 lines
283 B
TypeScript
/**
|
|
* Insert `insertArr` inside `target` at `insertIndex`.
|
|
*/
|
|
export function arrayInsert<T>(target: T[], insertIndex: number, insertArr: T[]): T[] {
|
|
const before = target.slice(0, insertIndex);
|
|
const after = target.slice(insertIndex);
|
|
return before.concat(insertArr, after);
|
|
}
|