pl-fe: Types improvements

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-10-06 00:09:12 +02:00
parent 8bc30f18f8
commit c8b68625e1
3 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,6 @@
const makeEmojiMap = (emojis: any) => emojis.reduce((obj: any, emoji: any) => {
import type { CustomEmoji } from 'pl-api';
const makeEmojiMap = (emojis: Array<CustomEmoji>) => emojis.reduce((obj: Record<string, CustomEmoji>, emoji: CustomEmoji) => {
obj[`:${emoji.shortcode}:`] = emoji;
return obj;
}, {});