typings(DataStore): correct return types for resolve, resolveID and remove (#3448)

* fix(typings): DataStore#resolve & DataStore#resolveID can also return null.

* fix(typings): DataStore#remove returns a boolean, not void.

Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>
This commit is contained in:
didinele
2019-08-28 12:11:15 +03:00
committed by SpaceEEC
parent 4c08812302
commit 745a0ea942

6
typings/index.d.ts vendored
View File

@@ -1715,9 +1715,9 @@ declare module 'discord.js' {
public client: Client;
public holds: VConstructor;
public add(data: any, cache?: boolean, { id, extras }?: { id: K, extras: any[] }): V;
public remove(key: K): void;
public resolve(resolvable: R): V;
public resolveID(resolvable: R): K;
public remove(key: K): boolean;
public resolve(resolvable: R): V | null;
public resolveID(resolvable: R): K | null;
}
export class GuildEmojiRoleStore extends OverridableDataStore<Snowflake, Role, typeof Role, RoleResolvable> {