Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reduxTypes: Mark
GlobalState
's properties as read-only.
We already treat them as read-only everywhere except for one case, touched in this commit, where we've had to suppress several different Flow errors [0]. So, mark them as read-only with `$ReadOnly` [1]. Treating `GlobalState`'s properties as read-only (except for that one exceptional case) is likely to be very stable: we treat them as read-only because the Redux state is a tree of objects that are all treated as immutable; see the Redux docs [2] and our architecture doc [3]. [0] See Greg's comments on this at zulip#4709 (comment) [1] https://flow.org/en/docs/types/utilities/#toc-readonly [2] http://redux.js.org [3] ./docs/architecture.md
- Loading branch information