E0313: 'readonly' only works with array types and tuple types
In TypeScript, array types and tuple types can be marked readonly
, which
prevents methods like .push
from being called on the array. It is a syntax
error to use readonly
on something which is not an array or tuple type:
To fix this error, replace readonly Type
with Readonly<Type>
:
Alternatively, make the type an array type by adding []
:
Introduced in quick-lint-js version 2.10.0.