Add type-alias-readonlydeep rule and make ducks mostly immutable
This commit is contained in:
parent
11ce3c3d59
commit
c58a723f45
47 changed files with 1164 additions and 871 deletions
|
@ -9,6 +9,7 @@ import { createPortal } from 'react-dom';
|
|||
import { noop } from 'lodash';
|
||||
import { useSpring, animated, to } from '@react-spring/web';
|
||||
|
||||
import type { ReadonlyDeep } from 'type-fest';
|
||||
import type {
|
||||
ConversationType,
|
||||
SaveAttachmentActionCreatorType,
|
||||
|
@ -29,7 +30,7 @@ export type PropsType = {
|
|||
getConversation?: (id: string) => ConversationType;
|
||||
i18n: LocalizerType;
|
||||
isViewOnce?: boolean;
|
||||
media: ReadonlyArray<MediaItemType>;
|
||||
media: ReadonlyArray<ReadonlyDeep<MediaItemType>>;
|
||||
saveAttachment: SaveAttachmentActionCreatorType;
|
||||
selectedIndex?: number;
|
||||
toggleForwardMessageModal: (messageId: string) => unknown;
|
||||
|
@ -682,7 +683,7 @@ function LightboxHeader({
|
|||
}: {
|
||||
getConversation: (id: string) => ConversationType;
|
||||
i18n: LocalizerType;
|
||||
message: MediaItemMessageType;
|
||||
message: ReadonlyDeep<MediaItemMessageType>;
|
||||
}): JSX.Element {
|
||||
const conversation = getConversation(message.conversationId);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue