You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flags [nfc]: Fix some read-only vs. read-write object types in reducer
We've been breaching here the read-only markers on the properties
of FlagsState and of its per-flag subtrees. The reason Flow hasn't
complained seems to be related to the use of computed properties
here; when we make these `flag` variables have a union type that
enumerates the actual expected flags, rather than just `string`,
it would start complaining. Get ahead of that by fixing the issue.
As a tiny bonus, we make fewer lookups into these `newState` objects.
(Though this code could use some deeper data structures / algorithms
improvements than that. Some other time.)
0 commit comments