mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
Add comments for skin_tone
in emoji_utils.ts
This commit adds detailed comments explaining the usage of `skin_tone` in emoji_utils.ts, noting its absence in the type definition link and the need for a separate type with DefinitelyTyped. It also highlights potential mismatch issues between versions of `@types/emoji-mart` and `emoji-mart`, given they have different maintainers and packages.
This commit is contained in:
parent
2236a16d55
commit
a603a353d4
1 changed files with 6 additions and 0 deletions
|
@ -52,6 +52,12 @@ function unifiedToNative(unified: Emoji['unified']) {
|
|||
return String.fromCodePoint(...codePoints);
|
||||
}
|
||||
|
||||
/*
|
||||
* `skin_tone` is used [here]{@link node_modules/emoji-mart/dist-es/utils/index.js#19}, but is not found in the [type definition]{@link node_modules/@types/emoji-mart/dist-es/utils/emoji-index/nimble-emoji-index.d.ts}.
|
||||
* `emoji-mart` does not come with a built-in type, so you need to add a separate type with DefinitelyTyped.
|
||||
* The type and implementation have different maintainers and packages, so the installed versions of `@types/emoji-mart` and `emoji-mart` may not match.
|
||||
*/
|
||||
|
||||
function sanitize(
|
||||
emoji: BaseEmoji &
|
||||
CustomEmoji &
|
||||
|
|
Loading…
Reference in a new issue