Use ReadonlyArrays in conversation model and redux

This commit is contained in:
Fedor Indutny
2022-12-21 16:07:02 -08:00
committed by GitHub
parent ecbf84638d
commit dec23725e5
55 changed files with 173 additions and 162 deletions

View File

@@ -32,7 +32,7 @@ export type LightboxStateType =
| {
isShowingLightbox: true;
isViewOnce: boolean;
media: Array<MediaItemType>;
media: ReadonlyArray<MediaItemType>;
selectedAttachmentPath: string | undefined;
};
@@ -47,7 +47,7 @@ type ShowLightboxActionType = {
type: typeof SHOW_LIGHTBOX;
payload: {
isViewOnce: boolean;
media: Array<MediaItemType>;
media: ReadonlyArray<MediaItemType>;
selectedAttachmentPath: string | undefined;
};
};
@@ -89,7 +89,7 @@ function closeLightbox(): ThunkAction<
function showLightboxWithMedia(
selectedAttachmentPath: string | undefined,
media: Array<MediaItemType>
media: ReadonlyArray<MediaItemType>
): ShowLightboxActionType {
return {
type: SHOW_LIGHTBOX,