Array.isArray works bad with ReadonlyArray #43247
Labels
Fix Available
A PR has been opened for this issue
Working as Intended
The behavior described is the intended behavior; this is not a bug
TypeScript Version: 4.3.0-dev.20210315
Search Terms: array isArray readonly
The first problem is that
Array.isArray
lets us violatereadonly
modifier and push values toReadonlyArray
:The second problem is that
Array.isArray
doesn't filter outReadonlyArray
type:The text was updated successfully, but these errors were encountered: