Skip to content

Commit

Permalink
fix(GuildChannel): overload permissionsFor and BaseManager#resolve[id] (
Browse files Browse the repository at this point in the history
#5260)

* fix(GuildChannel): overload permissionsFor and BaseManager#resolve[id]

* fix(GuildChannel): GuildMessage and Role trigger non-null return
  • Loading branch information
kyranet committed Jan 27, 2021
1 parent 9ffcd83 commit 41bd6c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions typings/index.d.ts
Expand Up @@ -765,6 +765,7 @@ declare module 'discord.js' {
overwrites: readonly OverwriteResolvable[] | Collection<Snowflake, OverwriteResolvable>,
reason?: string,
): Promise<this>;
public permissionsFor(memberOrRole: GuildMember | Role): Readonly<Permissions>;
public permissionsFor(memberOrRole: GuildMemberResolvable | RoleResolvable): Readonly<Permissions> | null;
public setName(name: string, reason?: string): Promise<this>;
public setParent(
Expand Down Expand Up @@ -1873,7 +1874,9 @@ declare module 'discord.js' {
public cacheType: Collection<K, Holds>;
public readonly client: Client;
public add(data: any, cache?: boolean, { id, extras }?: { id: K; extras: any[] }): Holds;
public resolve(resolvable: Holds): Holds;
public resolve(resolvable: R): Holds | null;
public resolveID(resolvable: Holds): K;
public resolveID(resolvable: R): K | null;
public valueOf(): Collection<K, Holds>;
}
Expand Down

0 comments on commit 41bd6c2

Please sign in to comment.