types(CategoryChannel): createChannel should default to a text channel (#7132)

This commit is contained in:
Suneet Tipirneni
2021-12-22 08:00:07 -05:00
committed by GitHub
parent b763dabaa9
commit a0a5b0e4fa
2 changed files with 11 additions and 10 deletions

View File

@@ -859,9 +859,8 @@ declare const categoryChannel: CategoryChannel;
expectType<Promise<NewsChannel>>(categoryChannel.createChannel('name', { type: 'GUILD_NEWS' }));
expectDeprecated(categoryChannel.createChannel('name', { type: 'GUILD_STORE' }));
expectType<Promise<StageChannel>>(categoryChannel.createChannel('name', { type: 'GUILD_STAGE_VOICE' }));
expectType<Promise<TextChannel | VoiceChannel | NewsChannel | StoreChannel | StageChannel>>(
categoryChannel.createChannel('name', {}),
);
expectType<Promise<Exclude<NonThreadGuildBasedChannel, CategoryChannel>>>(categoryChannel.createChannel('name', {}));
expectType<Promise<Exclude<NonThreadGuildBasedChannel, CategoryChannel>>>(categoryChannel.createChannel('name'));
}
declare const guildChannelManager: GuildChannelManager;