[go: nahoru, domu]

Skip to content

Commit

Permalink
docs(eslint-plugin): [prefer-readonly-parameter-types] mention limita…
Browse files Browse the repository at this point in the history
…tions (#9260)

* docs(eslint-plugin): [prefer-readonly-parameter-types] mention limitations

* as readonly
  • Loading branch information
JoshuaKGoldberg committed Jun 5, 2024
1 parent afa8b0f commit 81fd60b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -402,3 +402,8 @@ function foo(arg: MyType) {}
## When Not To Use It

If your project does not attempt to enforce strong immutability guarantees of parameters, you can avoid this rule.

This rule is very strict on what it considers mutable.
Many types that describe themselves as readonly are considered mutable because they have mutable properties such as arrays or tuples.
To work around these limitations, you might need to use the rule's options.
In particular, the [`allow` option](#allow) can explicitly mark a type as readonly.

0 comments on commit 81fd60b

Please sign in to comment.