From ec199082fd9317171d2ed26a514aee56566dfb60 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 29 May 2024 17:02:16 -0700 Subject: [PATCH] types: Move Submessage to submessage. Signed-off-by: Anders Kaseorg --- web/src/message_store.ts | 3 ++- web/src/submessage.ts | 9 ++++++++- web/src/types.ts | 9 --------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/web/src/message_store.ts b/web/src/message_store.ts index 2074dac1ba..7c12f44513 100644 --- a/web/src/message_store.ts +++ b/web/src/message_store.ts @@ -2,7 +2,8 @@ import _ from "lodash"; import * as blueslip from "./blueslip"; import * as people from "./people"; -import type {Submessage, TopicLink} from "./types"; +import type {Submessage} from "./submessage"; +import type {TopicLink} from "./types"; import type {UserStatusEmojiInfo} from "./user_status"; const stored_messages = new Map(); diff --git a/web/src/submessage.ts b/web/src/submessage.ts index 1e2500bf51..9433c4faf5 100644 --- a/web/src/submessage.ts +++ b/web/src/submessage.ts @@ -5,9 +5,16 @@ import * as channel from "./channel"; import type {MessageList} from "./message_lists"; import * as message_store from "./message_store"; import type {Message} from "./message_store"; -import type {Submessage} from "./types"; import * as widgetize from "./widgetize"; +export type Submessage = { + id: number; + sender_id: number; + message_id: number; + content: string; + msg_type: string; +}; + export const zform_widget_extra_data_schema = z .object({ choices: z.array( diff --git a/web/src/types.ts b/web/src/types.ts index 9be2333df0..a94924f9ab 100644 --- a/web/src/types.ts +++ b/web/src/types.ts @@ -1,14 +1,5 @@ import type {ExternalAccountFieldData} from "./settings_components"; -// TODO/typescript: Move this to submessage.js -export type Submessage = { - id: number; - sender_id: number; - message_id: number; - content: string; - msg_type: string; -}; - // TODO/typescript: Move this to server_events export type TopicLink = { text: string;