UNPKG

@stackend/api

Version:

JS bindings to api.stackend.com

25 lines 768 B
import { LikeDataMap } from './index'; export declare const UPDATE_LIKE = "UPDATE_LIKE"; export declare const RECEIVE_LIKES = "RECEIVE_LIKES"; export declare const CLEAR_LIKES = "CLEAR_LIKES"; export interface LikeState { likes: number; likedByCurrentUser?: boolean; } export interface LikesState { [obfuscatedReference: string]: LikeState; } export declare type LikeActions = { type: typeof CLEAR_LIKES; } | { type: typeof UPDATE_LIKE; obfuscatedReference: string; likes?: number; likedByCurrentUser?: boolean; } | { type: typeof RECEIVE_LIKES; likes?: LikeDataMap; }; export declare function Likes(state: LikesState | undefined, action: LikeActions): LikesState; export default Likes; //# sourceMappingURL=likeReducer.d.ts.map