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
|
@ -4,6 +4,7 @@
|
|||
import React from 'react';
|
||||
import { useSelector } from 'react-redux';
|
||||
|
||||
import type { ReadonlyDeep } from 'type-fest';
|
||||
import type { GetConversationByIdType } from '../selectors/conversations';
|
||||
import type { LocalizerType } from '../../types/Util';
|
||||
import type { MediaItemType } from '../../types/MediaItem';
|
||||
|
@ -33,7 +34,10 @@ export function SmartLightbox(): JSX.Element | null {
|
|||
|
||||
const isShowingLightbox = useSelector<StateType, boolean>(shouldShowLightbox);
|
||||
const isViewOnce = useSelector<StateType, boolean>(getIsViewOnce);
|
||||
const media = useSelector<StateType, ReadonlyArray<MediaItemType>>(getMedia);
|
||||
const media = useSelector<
|
||||
StateType,
|
||||
ReadonlyArray<ReadonlyDeep<MediaItemType>>
|
||||
>(getMedia);
|
||||
const selectedIndex = useSelector<StateType, number>(getSelectedIndex);
|
||||
|
||||
if (!isShowingLightbox) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue