Files
vscode/extensions/copilot/test/simulation/fixtures/gen/variables/example.ts
T
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);
}