Closed djmattyg007 closed 2 years ago
As the code has no need to mutate this array, it makes sense that it should accept readonly arrays. This avoids unnecessary slicing/spreading to ensure readonly arrays in calling code can be accepted.
As the code has no need to mutate this array, it makes sense that it should accept readonly arrays. This avoids unnecessary slicing/spreading to ensure readonly arrays in calling code can be accepted.