types(GuildAuditLog): Strengthen types (#7090)

This commit is contained in:
Jiralite
2021-12-10 09:07:57 +00:00
committed by GitHub
parent de61fe4854
commit 5a5c045534
2 changed files with 12 additions and 12 deletions

View File

@@ -1154,10 +1154,10 @@ expectType<Promise<null | undefined>>(
expectType<Promise<null | undefined>>(
guild.fetchAuditLogs({ type: AuditLogEvent.MemberKick }).then(al => al.entries.first()?.extra),
);
expectType<Promise<GuildChannel | { id: Snowflake } | undefined>>(
expectType<Promise<StageChannel | { id: Snowflake } | undefined>>(
guild.fetchAuditLogs({ type: 'STAGE_INSTANCE_CREATE' }).then(al => al.entries.first()?.extra),
);
expectType<Promise<{ channel: GuildChannel | { id: Snowflake }; count: number } | undefined>>(
expectType<Promise<{ channel: GuildTextBasedChannel | { id: Snowflake }; count: number } | undefined>>(
guild.fetchAuditLogs({ type: 'MESSAGE_DELETE' }).then(al => al.entries.first()?.extra),
);