poll_widget: Rename type to be more relevant.

This commit is contained in:
Varun Singh 2024-04-11 00:48:21 +05:30 committed by Tim Abbott
parent 2d4bed4ab4
commit 4985363bd7
2 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@ import * as people from "./people";
export type Event = {sender_id: number; data: InboundData};
export type ExtraData = {
export type PollWidgetExtraData = {
question?: string;
options?: string[];
};
@ -40,7 +40,7 @@ export function activate({
callback: (
data: NewOptionOutboundData | QuestionOutboundData | VoteOutboundData | undefined,
) => void;
extra_data: ExtraData;
extra_data: PollWidgetExtraData;
message: Message;
}): void {
const is_my_poll = people.is_my_user_id(message.sender_id);

View File

@ -3,7 +3,7 @@ import $ from "jquery";
import * as blueslip from "./blueslip";
import * as message_lists from "./message_lists";
import type {Message} from "./message_store";
import type {Event, ExtraData as PollWidgetExtraData} from "./poll_widget";
import type {Event, PollWidgetExtraData} from "./poll_widget";
// TODO: This ZFormExtraData type should be moved to web/src/zform.js when it will be migrated
type ZFormExtraData = {