* Splice arguments on top of a sliced array, to break top-level === * this is useful for change-detection
( original: T[], start: number, deleteCount: number, ...args: T[] )
| 80 | * this is useful for change-detection |
| 81 | */ |
| 82 | function sliceAndSplice<T>( |
| 83 | original: T[], |
| 84 | start: number, |
| 85 | deleteCount: number, |
| 86 | ...args: T[] |
| 87 | ): T[] { |
| 88 | const returnArray = original.slice(); |
| 89 | returnArray.splice(start, deleteCount, ...args); |
| 90 | return returnArray; |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * Creates a new sorted array from a new change. |