bigbuffet-rw/app/soapbox/schemas/emoji-reaction.ts
2023-05-04 12:20:39 -05:00

14 lines
No EOL
348 B
TypeScript

import { z } from 'zod';
import { emojiSchema } from './utils';
/** Pleroma emoji reaction. */
const emojiReactionSchema = z.object({
name: emojiSchema,
count: z.number().nullable().catch(null),
me: z.boolean().catch(false),
});
type EmojiReaction = z.infer<typeof emojiReactionSchema>;
export { emojiReactionSchema, type EmojiReaction };