types(Shard): eval returns a promise resolving with T instead of T[] (#6901)

This commit is contained in:
SpaceEEC
2021-10-29 00:47:18 +02:00
committed by GitHub
parent ee93a27e15
commit 14d9a9901b
2 changed files with 6 additions and 1 deletions

View File

@@ -76,6 +76,7 @@ import {
Typing,
User,
VoiceChannel,
Shard,
} from '.';
import type { ApplicationCommandOptionTypes } from './enums';
@@ -1050,3 +1051,7 @@ client.on('interactionCreate', async interaction => {
assertType<string | null>(interaction.options.getSubcommandGroup(false));
}
});
declare const shard: Shard;
assertType<Promise<number | null>>(shard.eval(c => c.readyTimestamp));