There's no reason to type Type out again

This commit is contained in:
Michcio 2022-09-15 11:49:57 +02:00
parent 0e174a3f9d
commit a834cfbbfe

View file

@ -133,7 +133,7 @@ function emojiSearch<Type extends foundkey.entities.CustomEmoji|UnicodeEmojiDef>
// discount fuzzy matching pattern
const re = new RegExp(query.split(' ').join('.*'), 'i');
const match = (str: string): boolean => !!str && re.test(str);
const aliases = (emoji: foundkey.entities.CustomEmoji|UnicodeEmojiDef): string[] => {
const aliases = (emoji: Type): string[] => {
// Custom and Unicode emojis have different fields
if ('aliases' in emoji) {
return emoji.aliases;