feat(Channel): add isText() type guard (#4745)

This commit is contained in:
Jan
2020-08-31 09:59:17 +02:00
committed by GitHub
parent 3141f7cb04
commit b0ab37ddc0
2 changed files with 10 additions and 0 deletions

2
typings/index.d.ts vendored
View File

@@ -187,6 +187,7 @@ declare module 'discord.js' {
public type: keyof typeof ChannelType;
public delete(reason?: string): Promise<Channel>;
public fetch(force?: boolean): Promise<Channel>;
public isText(): this is TextChannel | DMChannel | NewsChannel;
public toString(): string;
}
@@ -826,6 +827,7 @@ declare module 'discord.js' {
options: PermissionOverwriteOption,
reason?: string,
): Promise<this>;
public isText(): this is TextChannel | NewsChannel;
}
export class GuildEmoji extends BaseGuildEmoji {