From ec3f62d12fab6df008f0fd694b8a65d9d36874da Mon Sep 17 00:00:00 2001 From: William Grant Date: Wed, 26 Apr 2023 17:02:14 +1000 Subject: [PATCH] fix: updated child types from PropsExpiringMessges use type and the ampersand operator instead of the interface with extends for better consistency with the rest of the code base --- ts/state/ducks/conversations.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ts/state/ducks/conversations.ts b/ts/state/ducks/conversations.ts index 8205fc521..d0cc15300 100644 --- a/ts/state/ducks/conversations.ts +++ b/ts/state/ducks/conversations.ts @@ -23,11 +23,11 @@ import { export type CallNotificationType = 'missed-call' | 'started-call' | 'answered-a-call'; -export interface PropsForCallNotification extends PropsForExpiringMessage { +export type PropsForCallNotification = PropsForExpiringMessage & { notificationType: CallNotificationType; receivedAt: number; isUnread: boolean; -} +}; export type MessageModelPropsWithoutConvoProps = { propsForMessage: PropsForMessageWithoutConvoProps; @@ -84,7 +84,7 @@ export type PropsForExpiringMessage = { isExpired?: boolean; }; -export interface PropsForExpirationTimer extends PropsForExpiringMessage { +export type PropsForExpirationTimer = PropsForExpiringMessage & { expirationType: DisappearingMessageConversationType; timespan: string; disabled: boolean; @@ -97,7 +97,7 @@ export interface PropsForExpirationTimer extends PropsForExpiringMessage { messageId: string; isUnread: boolean; receivedAt: number | undefined; -} +}; export type PropsForGroupUpdateGeneral = { type: 'general'; @@ -130,21 +130,21 @@ export type PropsForGroupUpdateType = | PropsForGroupUpdateName | PropsForGroupUpdateLeft; -export interface PropsForGroupUpdate extends PropsForExpiringMessage { +export type PropsForGroupUpdate = PropsForExpiringMessage & { change: PropsForGroupUpdateType; messageId: string; receivedAt: number | undefined; isUnread: boolean; -} +}; -export interface PropsForGroupInvitation extends PropsForExpiringMessage { +export type PropsForGroupInvitation = PropsForExpiringMessage & { serverName: string; url: string; acceptUrl: string; messageId: string; receivedAt?: number; isUnread: boolean; -} +}; export type PropsForAttachment = { id: number;