There's no reason to type Type out again
This commit is contained in:
parent
0e174a3f9d
commit
a834cfbbfe
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue