From ff8159ee434bf26ecf8c67f7de7f67752dce29f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Kalici=C5=84ski?= Date: Wed, 15 Jan 2025 12:28:03 +0100 Subject: [PATCH] Review feedback --- src/jsMain/resources/index.d.ts | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/jsMain/resources/index.d.ts b/src/jsMain/resources/index.d.ts index e697272e..4cc85eef 100644 --- a/src/jsMain/resources/index.d.ts +++ b/src/jsMain/resources/index.d.ts @@ -6,7 +6,7 @@ declare class Membership { private chat; readonly channel: Channel; readonly user: User; - readonly custom: AppContext.CustomData | null | undefined; + readonly custom?: AppContext.CustomData | null; readonly updated: string; readonly eTag: string; update({ custom }: { @@ -247,14 +247,10 @@ type SendTextOptionParams = Omit["file"][]; + files?: FileList | File[] | FileSharing.SendFileParameters["file"][]; }; -type EnhancedMessageEvent = Subscription.MessageEvent & { - userMetadata?: { - [key: string]: any; - }; -}; -type MessageDTOParams = History.FetchMessagesResponse["channels"]["channel"][0] | EnhancedMessageEvent; +type EnhancedMessageEvent = Subscription.Message; +type MessageDTOParams = History.FetchMessagesForChannelsResponse['channels'][string][number] | History.FetchMessagesWithActionsResponse['channels'][string][number] | EnhancedMessageEvent; type ThreadMessageDTOParams = MessageDTOParams & { parentChannelId: string; }; @@ -427,7 +423,7 @@ export declare class MessageDraftV2 { get value(): string; quotedMessage: Message | undefined; readonly config: MessageDraftConfig; - files?: FileList | File[] | FileSharing.SendFileParameters["file"][]; + files?: FileList | File[] | FileSharing.SendFileParameters["file"][]; addQuote(message: Message): void; removeQuote(): void; addLinkedText(params: AddLinkedTextParams): void; @@ -463,7 +459,7 @@ declare class MessageDraft { value: string; quotedMessage: Message | undefined; readonly config: MessageDraftConfig; - files?: FileList | File[] | FileSharing.SendFileParameters["file"][]; + files?: FileList | File[] | FileSharing.SendFileParameters["file"][]; onChange(text: string): Promise<{ users: { nameOccurrenceIndex: number;