import {BaseAction} from "./BaseAction"; import {AppAction} from "./AppAction"; export const USER_ACTIVE_COLOR = "USER_ACTIVE_COLOR" export interface UserActiveColorAction extends BaseAction { readonly type: typeof USER_ACTIVE_COLOR /** The hex color that the user will begin painting with. */ readonly color: string } export function isUserActiveColorAction(action: AppAction): action is UserActiveColorAction { return action.type === USER_ACTIVE_COLOR } export function isUserAction(action: AppAction): action is UserAction { return isUserActiveColorAction(action) } export type UserAction = UserActiveColorAction;