Rule prefer-immutable-types doesn't work with fp-ts Types #525
Labels
Resolution: External
It was a real bug, but not in the code in this repo.
Type: Bug
Inconsistencies or issues which will cause a problem for users or implementors.
Bug Report
If you use fp-ts ReadonlyNonEmptyArray (https://gcanti.github.io/fp-ts/modules/ReadonlyNonEmptyArray.ts.html) like this:
Expected behavior
The parameter
values: RNEA.ReadonlyNonEmptyArray<number>
should be detected as being immutable.Actual behavior
The parameter
values: RNEA.ReadonlyNonEmptyArray<number>
gets marked as being mutable.Rewriting the above to somehow fixes the error, but looks not quite right:
Steps to reproduce
use above sample
Proposed changes
Maybe, as I don't know the details, somehow check, if the Type is a superior Type of immutable types?
The text was updated successfully, but these errors were encountered: