Skip to content

Commit

Permalink
fix(ts): missed readonly fix in previous PR (#386)
Browse files Browse the repository at this point in the history
* changed readonly array syntax to support older tsc

`readonly T[]` is new syntax for `ReadonlyArray` which is supported in typescript older than 3.4.
As of now everything works but throws error while compiling in angular 7

* missed readonly fix in previous PR

Similar to 4.3.1 fix, to fix `readonly` with `ReadonlyArray`
  • Loading branch information
preetham1290 authored Jun 15, 2020
1 parent 59eefd7 commit e5e9aa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ export function copyAndExtendArray<A, V>(
*
* @returns Shallow copy of arr.
*/
export function copyArray<T>(arr: readonly T[]): T[] {
export function copyArray<T>(arr: ReadonlyArray<T>): T[] {
return arr.slice();
}

Expand Down

0 comments on commit e5e9aa9

Please sign in to comment.