mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	poll_widget: Amalgamate 'outbound_data' types for poll-widgets.
This will help in migration of downstream JS code.
This commit is contained in:
		@@ -23,6 +23,11 @@ export type PollWidgetExtraData = {
 | 
			
		||||
    options?: string[] | undefined;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export type PollWidgetOutboundData =
 | 
			
		||||
    | NewOptionOutboundData
 | 
			
		||||
    | QuestionOutboundData
 | 
			
		||||
    | VoteOutboundData;
 | 
			
		||||
 | 
			
		||||
export function activate({
 | 
			
		||||
    $elem,
 | 
			
		||||
    callback,
 | 
			
		||||
@@ -30,9 +35,7 @@ export function activate({
 | 
			
		||||
    message,
 | 
			
		||||
}: {
 | 
			
		||||
    $elem: JQuery;
 | 
			
		||||
    callback: (
 | 
			
		||||
        data: NewOptionOutboundData | QuestionOutboundData | VoteOutboundData | undefined,
 | 
			
		||||
    ) => void;
 | 
			
		||||
    callback: (data: PollWidgetOutboundData | undefined) => void;
 | 
			
		||||
    extra_data: PollWidgetExtraData;
 | 
			
		||||
    message: Message;
 | 
			
		||||
}): (events: Event[]) => void {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user