Rename `ReadonlyDeep` to `Immutable`
The ReadonlyDeep type does more than just make types readonly, it fully makes them immutable.
There's been a bit of discussion over at typescript-eslint about "Readonly" vs "Immutable". This is in regard to eslint rules such as prefer-readonly-parameter-types. I've made a library that can calculate type immutability (is-immutable-type) in a way consistent with this and this library will be used in the next release of eslint-plugin-functional. It would be nice if this utility type was also consistent with these definitions.
Other issues of note: #396
Upvote & Fund
- We're using Polar.sh so you can upvote and help fund this issue.
- The funding will be given to active contributors.
- Thank you in advance for helping prioritize & fund our backlog.
I think we need both types.
ReadonlyDeep: The data is deeply immutable but methods are not.
Disagree. Readonly means readonly, even for methods.
There is "Readonly" built-in type in TS, so name ReadonlyDeep is quite intuitive when you need "Readonly" but not shallow.