Files
vscode/extensions/copilot/test/simulation/fixtures/gen/variables/example.ts
T
kieferrmandcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> 333d9a4053 Hello Copilot
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2025-06-27 11:35:20 +02:00

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);
}