types(Test): fix overloads for channel create

This commit is contained in:
iCrawl
2021-07-08 22:46:26 +02:00
parent 637c8e0fdf
commit 5b6be0cebc

View File

@@ -560,12 +560,12 @@ declare const guildChannelManager: GuildChannelManager;
{
type AnyChannel = TextChannel | VoiceChannel | CategoryChannel | NewsChannel | StoreChannel | StageChannel;
assertType<Promise<VoiceChannel>>(guildChannelManager.create('name', { type: 'voice' }));
assertType<Promise<CategoryChannel>>(guildChannelManager.create('name', { type: 'category' }));
assertType<Promise<TextChannel>>(guildChannelManager.create('name', { type: 'text' }));
assertType<Promise<NewsChannel>>(guildChannelManager.create('name', { type: 'news' }));
assertType<Promise<StoreChannel>>(guildChannelManager.create('name', { type: 'store' }));
assertType<Promise<StageChannel>>(guildChannelManager.create('name', { type: 'stage' }));
assertType<Promise<VoiceChannel>>(guildChannelManager.create('name', { type: 'GUILD_VOICE' }));
assertType<Promise<CategoryChannel>>(guildChannelManager.create('name', { type: 'GUILD_CATEGORY' }));
assertType<Promise<TextChannel>>(guildChannelManager.create('name', { type: 'GUILD_TEXT' }));
assertType<Promise<NewsChannel>>(guildChannelManager.create('name', { type: 'GUILD_NEWS' }));
assertType<Promise<StoreChannel>>(guildChannelManager.create('name', { type: 'GUILD_STORE' }));
assertType<Promise<StageChannel>>(guildChannelManager.create('name', { type: 'GUILD_STAGE_VOICE' }));
assertType<Promise<Collection<Snowflake, AnyChannel>>>(guildChannelManager.fetch());
assertType<Promise<Collection<Snowflake, AnyChannel>>>(guildChannelManager.fetch(undefined, {}));