Make explicit use of TypeScript's ReadonlySet and ReadonlyMap types. Fixes #494.
Before adoption: this commit came in with the history the project adopted, so no landing records it.
TypeScript provides the ReadonlySet and ReadonlyMap types which match their normal counterparts but without any methods that mutate their data. This change makes Immutable<Map> and Immutable<Set> map to those types directly. Worth noting that Map extends ReadonlyMap so we only need to check for one to know what the resulting type is, the same goes for Set and ReadonlySet. This also removes the intermediate Set/Map types since TypeScript no longer seems to need those (likely since TypeScript 3.7, see #448).
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
3 files+68 added−20 removed
- tests:+50 added−0 removed
- other:+18 added−20 removed