jonaskello / tslint-immutable

TSLint rules to disable mutation in TypeScript.
MIT License
417 stars 14 forks source link

[readonly-array] Nested arrays aren't allowed to be mutable with ignore-prefix. #132

Closed RebeccaStevens closed 5 years ago

RebeccaStevens commented 5 years ago

I can't define a multidimensional array to be mutable using ignore-prefix, only the outer most array is ignored.

const mutable2DArray: number[][] = [[0], [1], [2]];
                      ~~~~~~~~                      [Only ReadonlyArray allowed.]