@stackend/api
Version:
JS bindings to api.stackend.com
30 lines • 865 B
TypeScript
import { Poll } from './index';
export declare const UPDATE_POLL = "UPDATE_POLL";
export declare const UPDATE_POLLS = "UPDATE_POLLS";
export declare const CLEAR_POLL = "CLEAR_POLL";
export declare const CLEAR_POLLS = "CLEAR_POLLS";
export declare type PollContextState = {
[referenceId: number]: Poll;
};
export declare type PollsState = {
[context: string]: PollContextState;
};
declare type PollActions = {
type: typeof UPDATE_POLL;
context: string;
poll: Poll;
} | {
type: typeof UPDATE_POLLS;
context: string;
polls: Array<Poll>;
} | {
type: typeof CLEAR_POLL;
context: string;
referenceId: number;
} | {
type: typeof CLEAR_POLLS;
context: string;
};
export declare function polls(state: PollsState | undefined, action: PollActions): PollsState;
export default polls;
//# sourceMappingURL=pollReducer.d.ts.map