refactor: fix type

This commit is contained in:
syuilo
2023-02-01 17:29:28 +09:00
parent ebc6437977
commit 387fcd5c5d
5 changed files with 6 additions and 12 deletions

View File

@@ -4,7 +4,7 @@ import { unique } from '@/misc/prelude/array.js';
export function extractCustomEmojisFromMfm(nodes: mfm.MfmNode[]): string[] {
const emojiNodes = mfm.extract(nodes, (node) => {
return (node.type === 'emojiCode' && node.props.name.length <= 100);
});
}) as mfm.MfmEmojiCode[];
return unique(emojiNodes.map(x => x.props.name));
}