In the @lauf/store examples it's common to see an explicit declaration like Immutable<AppState> but which is unnecessary when already using as const, and indeed would work even without as const.
Probably best to remove this as there are circumstances where Readonly<Readonly<T>> creates problematic situations when only one level of Readonly is removed and the remaining item is not an editable draft.
In the
@lauf/store
examples it's common to see an explicit declaration likeImmutable<AppState>
but which is unnecessary when already usingas const
, and indeed would work even withoutas const
.Probably best to remove this as there are circumstances where
Readonly<Readonly<T>>
creates problematic situations when only one level ofReadonly
is removed and the remaining item is not an editable draft.