mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 03:11:54 +00:00
todo_widget: Convert module to TypeScript.
This commit is contained in:
@@ -5,6 +5,7 @@ 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 {todo_widget_extra_data_schema} from "./todo_widget";
|
||||
import * as widgetize from "./widgetize";
|
||||
|
||||
export type Submessage = {
|
||||
@@ -37,13 +38,6 @@ const poll_widget_extra_data_schema = z
|
||||
})
|
||||
.nullable();
|
||||
|
||||
export const todo_widget_extra_data_schema = z
|
||||
.object({
|
||||
task_list_title: z.string().optional(),
|
||||
tasks: z.array(z.object({task: z.string(), desc: z.string()})).optional(),
|
||||
})
|
||||
.nullable();
|
||||
|
||||
const widget_data_event_schema = z.object({
|
||||
sender_id: z.number(),
|
||||
data: z.discriminatedUnion("widget_type", [
|
||||
|
||||
Reference in New Issue
Block a user