File tree Expand file tree Collapse file tree 11 files changed +23
-23
lines changed
Expand file tree Collapse file tree 11 files changed +23
-23
lines changed Original file line number Diff line number Diff line change @@ -914,7 +914,7 @@ function getExistingPeekInfo(
914914}
915915
916916function removeConversationFromState (
917- state : CallingStateType ,
917+ state : Readonly < CallingStateType > ,
918918 conversationId : string
919919) : CallingStateType {
920920 return {
@@ -926,8 +926,8 @@ function removeConversationFromState(
926926}
927927
928928export function reducer (
929- state : CallingStateType = getEmptyState ( ) ,
930- action : CallingActionType
929+ state : Readonly < CallingStateType > = getEmptyState ( ) ,
930+ action : Readonly < CallingActionType >
931931) : CallingStateType {
932932 const { callsByConversation } = state ;
933933
Original file line number Diff line number Diff line change @@ -811,8 +811,8 @@ function hasMessageHeightChanged(
811811}
812812
813813export function reducer (
814- state : ConversationsStateType = getEmptyState ( ) ,
815- action : ConversationActionType
814+ state : Readonly < ConversationsStateType > = getEmptyState ( ) ,
815+ action : Readonly < ConversationActionType >
816816) : ConversationsStateType {
817817 if ( action . type === 'CONVERSATION_ADDED' ) {
818818 const { payload } = action ;
Original file line number Diff line number Diff line change @@ -62,8 +62,8 @@ function getEmptyState(): EmojisStateType {
6262}
6363
6464export function reducer (
65- state : EmojisStateType = getEmptyState ( ) ,
66- action : EmojisActionType
65+ state : Readonly < EmojisStateType > = getEmptyState ( ) ,
66+ action : Readonly < EmojisActionType >
6767) : EmojisStateType {
6868 if ( action . type === 'emojis/USE_EMOJI' ) {
6969 const { payload } = action ;
Original file line number Diff line number Diff line change @@ -40,8 +40,8 @@ function getEmptyState(): ExpirationStateType {
4040}
4141
4242export function reducer (
43- state : ExpirationStateType = getEmptyState ( ) ,
44- action : ExpirationActionType
43+ state : Readonly < ExpirationStateType > = getEmptyState ( ) ,
44+ action : Readonly < ExpirationActionType >
4545) : ExpirationStateType {
4646 if ( action . type === HYDRATE_EXPIRATION_STATUS ) {
4747 return {
Original file line number Diff line number Diff line change @@ -109,8 +109,8 @@ function getEmptyState(): ItemsStateType {
109109}
110110
111111export function reducer (
112- state : ItemsStateType = getEmptyState ( ) ,
113- action : ItemsActionType
112+ state : Readonly < ItemsStateType > = getEmptyState ( ) ,
113+ action : Readonly < ItemsActionType >
114114) : ItemsStateType {
115115 if ( action . type === 'items/PUT_EXTERNAL' ) {
116116 const { payload } = action ;
Original file line number Diff line number Diff line change @@ -83,8 +83,8 @@ function getEmptyState(): NetworkStateType {
8383}
8484
8585export function reducer (
86- state : NetworkStateType = getEmptyState ( ) ,
87- action : NetworkActionType
86+ state : Readonly < NetworkStateType > = getEmptyState ( ) ,
87+ action : Readonly < NetworkActionType >
8888) : NetworkStateType {
8989 if ( action . type === CHECK_NETWORK_STATUS ) {
9090 const { isOnline, socketStatus } = action . payload ;
Original file line number Diff line number Diff line change @@ -163,8 +163,8 @@ function getEmptyState(): SafetyNumberStateType {
163163}
164164
165165export function reducer (
166- state : SafetyNumberStateType = getEmptyState ( ) ,
167- action : SafetyNumberActionType
166+ state : Readonly < SafetyNumberStateType > = getEmptyState ( ) ,
167+ action : Readonly < SafetyNumberActionType >
168168) : SafetyNumberStateType {
169169 if ( action . type === TOGGLE_VERIFIED_PENDING ) {
170170 const { contact } = action . payload ;
Original file line number Diff line number Diff line change @@ -337,8 +337,8 @@ function getEmptyState(): SearchStateType {
337337}
338338
339339export function reducer (
340- state : SearchStateType = getEmptyState ( ) ,
341- action : SearchActionType
340+ state : Readonly < SearchStateType > = getEmptyState ( ) ,
341+ action : Readonly < SearchActionType >
342342) : SearchStateType {
343343 if ( action . type === 'SHOW_ARCHIVED_CONVERSATIONS' ) {
344344 return getEmptyState ( ) ;
Original file line number Diff line number Diff line change @@ -373,8 +373,8 @@ function getEmptyState(): StickersStateType {
373373}
374374
375375export function reducer (
376- state : StickersStateType = getEmptyState ( ) ,
377- action : StickersActionType
376+ state : Readonly < StickersStateType > = getEmptyState ( ) ,
377+ action : Readonly < StickersActionType >
378378) : StickersStateType {
379379 if ( action . type === 'stickers/STICKER_PACK_ADDED' ) {
380380 // ts complains due to `stickers: {}` being overridden by the payload
Original file line number Diff line number Diff line change @@ -111,8 +111,8 @@ function getEmptyState(): UpdatesStateType {
111111}
112112
113113export function reducer (
114- state : UpdatesStateType = getEmptyState ( ) ,
115- action : UpdatesActionType
114+ state : Readonly < UpdatesStateType > = getEmptyState ( ) ,
115+ action : Readonly < UpdatesActionType >
116116) : UpdatesStateType {
117117 if ( action . type === SHOW_UPDATE_DIALOG ) {
118118 return {
You can’t perform that action at this time.
0 commit comments