refactor: fix type
This commit is contained in:
parent
ebc6437977
commit
387fcd5c5d
5 changed files with 6 additions and 12 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue