hyperspace-desktop-client-w.../src/types/Poll.tsx

31 lines
513 B
TypeScript
Raw Normal View History

2019-03-25 21:23:04 +01:00
/**
* Basic type for a Poll on Mastodon
*/
export type Poll = {
id: string;
expires_at: string | null;
expired: boolean;
multiple: boolean;
votes_count: number;
options: [PollOption];
voted: boolean | null;
};
2019-03-25 21:23:04 +01:00
/**
* Basic type for a Poll option in a Poll
*/
export type PollOption = {
title: string;
votes_count: number | null;
};
2019-04-04 02:01:54 +02:00
export type PollWizard = {
expires_at: string;
multiple: boolean;
options: PollWizardOption[];
};
2019-04-04 02:01:54 +02:00
export type PollWizardOption = {
title: string;
};