types: Move Submessage to submessage.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2024-05-29 17:02:16 -07:00 committed by Anders Kaseorg
parent 48fc0bc750
commit ec199082fd
3 changed files with 10 additions and 11 deletions

View File

@ -2,7 +2,8 @@ import _ from "lodash";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip";
import * as people from "./people"; 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"; import type {UserStatusEmojiInfo} from "./user_status";
const stored_messages = new Map<number, Message>(); const stored_messages = new Map<number, Message>();

View File

@ -5,9 +5,16 @@ import * as channel from "./channel";
import type {MessageList} from "./message_lists"; import type {MessageList} from "./message_lists";
import * as message_store from "./message_store"; import * as message_store from "./message_store";
import type {Message} from "./message_store"; import type {Message} from "./message_store";
import type {Submessage} from "./types";
import * as widgetize from "./widgetize"; 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 export const zform_widget_extra_data_schema = z
.object({ .object({
choices: z.array( choices: z.array(

View File

@ -1,14 +1,5 @@
import type {ExternalAccountFieldData} from "./settings_components"; 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 // TODO/typescript: Move this to server_events
export type TopicLink = { export type TopicLink = {
text: string; text: string;