feat(Channel): add isThread typeguard for better TS support (#5978)

This commit is contained in:
Shubham Parihar
2021-06-30 20:49:59 +05:30
committed by GitHub
parent 788d58e5a3
commit b7ed6752ac
2 changed files with 10 additions and 1 deletions

1
typings/index.d.ts vendored
View File

@@ -438,6 +438,7 @@ declare module 'discord.js' {
public delete(reason?: string): Promise<Channel>;
public fetch(force?: boolean): Promise<Channel>;
public isText(): this is TextChannel | DMChannel | NewsChannel | ThreadChannel;
public isThread(): this is ThreadChannel;
public toString(): string;
}