diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 619758348e87..c24caa2e4d79 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -3204,7 +3204,8 @@ export function mergeDefault(def: unknown, given: unknown): unknown; export function moveElementInArray(array: unknown[], element: unknown, newIndex: number, offset?: boolean): number; export function parseEmoji(text: string): PartialEmoji | null; export function resolveColor(color: ColorResolvable): number; -export function resolvePartialEmoji(emoji: Emoji | EmojiIdentifierResolvable): PartialEmoji | PartialEmojiOnlyId | null; +export function resolvePartialEmoji(emoji: Snowflake): PartialEmojiOnlyId; +export function resolvePartialEmoji(emoji: Emoji | EmojiIdentifierResolvable): PartialEmoji | null; export function verifyString(data: string, error?: typeof Error, errorMessage?: string, allowEmpty?: boolean): string; export function setPosition( item: T, diff --git a/packages/discord.js/typings/index.test-d.ts b/packages/discord.js/typings/index.test-d.ts index a44e8805f238..e0364a69a0cf 100644 --- a/packages/discord.js/typings/index.test-d.ts +++ b/packages/discord.js/typings/index.test-d.ts @@ -181,6 +181,10 @@ import { PartialGuildMember, PartialMessage, PartialMessageReaction, + resolvePartialEmoji, + PartialEmojiOnlyId, + Emoji, + PartialEmoji, } from '.'; import { expectAssignable, expectNotAssignable, expectNotType, expectType } from 'tsd'; import type { ContextMenuCommandBuilder, SlashCommandBuilder } from '@discordjs/builders'; @@ -2363,3 +2367,9 @@ expectType(partialUser.partial); expectType(partialUser.username); expectType(partialUser.tag); expectType(partialUser.discriminator); + +declare const emoji: Emoji; +{ + expectType(resolvePartialEmoji('12345678901234567')); + expectType(resolvePartialEmoji(emoji)); +}