refactor: added TextBasedChannels type (#6286)

This commit is contained in:
Antonio Román
2021-08-04 00:12:51 +02:00
committed by GitHub
parent a72b5a355e
commit 61db5f7618
12 changed files with 42 additions and 45 deletions

View File

@@ -49,6 +49,7 @@ import {
StageChannel,
StoreChannel,
TextBasedChannelFields,
TextBasedChannels,
TextChannel,
ThreadChannel,
Typing,
@@ -662,7 +663,7 @@ declare const typing: Typing;
assertType<PartialUser>(typing.user);
if (typing.user.partial) assertType<null>(typing.user.username);
assertType<TextChannel | PartialDMChannel | NewsChannel | ThreadChannel>(typing.channel);
assertType<TextBasedChannels>(typing.channel);
if (typing.channel.partial) assertType<undefined>(typing.channel.lastMessageId);
assertType<GuildMember | null>(typing.member);