Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

types: Move Submessage to submessage.

Anders Kaseorgec199082fd93
diff --git a/web/src/message_store.ts b/web/src/message_store.ts
index 2074dac1ba2..7c12f445134 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<number, Message>();
diff --git a/web/src/submessage.ts b/web/src/submessage.ts
index 1e2500bf516..9433c4faf57 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 9be2333df0f..a94924f9abc 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;