mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 03:11:54 +00:00
message_store: Rewrite RawMessage type using Zod.
This commit rework RawMessage and it's related type to use Zod for parsing the data received from the server.
This commit is contained in:
@@ -10,13 +10,7 @@ import {todo_widget_extra_data_schema} from "./todo_widget";
|
||||
import type {TodoWidgetOutboundData} from "./todo_widget";
|
||||
import * as widgetize from "./widgetize";
|
||||
|
||||
export type Submessage = {
|
||||
id: number;
|
||||
sender_id: number;
|
||||
message_id: number;
|
||||
content: string;
|
||||
msg_type: string;
|
||||
};
|
||||
export type Submessage = z.infer<typeof message_store.submessage_schema>;
|
||||
|
||||
export const zform_widget_extra_data_schema = z
|
||||
.object({
|
||||
|
||||
Reference in New Issue
Block a user