Skip to content

Commit

Permalink
test: add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiralite committed Aug 18, 2023
1 parent a878516 commit 6843bdf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/discord.js/typings/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1319,8 +1319,8 @@ declare const user: User;
declare const guildMember: GuildMember;

// Test thread channels' parent inference
expectType<TextChannel | NewsChannel | ForumChannel | null>(threadChannel.parent);
expectType<ForumChannel | null>(threadChannelFromForum.parent);
expectType<TextChannel | NewsChannel | ForumChannel | MediaChannel | null>(threadChannel.parent);
expectType<ForumChannel | MediaChannel | null>(threadChannelFromForum.parent);
expectType<TextChannel | NewsChannel | null>(threadChannelNotFromForum.parent);

// Test whether the structures implement send
Expand Down Expand Up @@ -1600,7 +1600,7 @@ declare const threadManager: ThreadManager;
}

declare const guildForumThreadManager: GuildForumThreadManager;
expectType<ForumChannel>(guildForumThreadManager.channel);
expectType<ForumChannel | MediaChannel>(guildForumThreadManager.channel);

declare const guildTextThreadManager: GuildTextThreadManager<
ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread
Expand Down Expand Up @@ -2113,7 +2113,7 @@ expectType<
>(TextBasedChannelTypes);
expectType<StageChannel | VoiceChannel>(VoiceBasedChannel);
expectType<GuildBasedChannel>(GuildBasedChannel);
expectType<CategoryChannel | NewsChannel | StageChannel | TextChannel | VoiceChannel | ForumChannel>(
expectType<CategoryChannel | NewsChannel | StageChannel | TextChannel | VoiceChannel | ForumChannel | MediaChannel>(
NonThreadGuildBasedChannel,
);
expectType<GuildTextBasedChannel>(GuildTextBasedChannel);
Expand Down

0 comments on commit 6843bdf

Please sign in to comment.