mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 19:13:31 +01:00
fix(Typing): change NodeJS.Timer into NodeJS.Timeout (#4755)
This commit is contained in:
committed by
GitHub
parent
b48b782c87
commit
405b487dc3
@@ -121,7 +121,7 @@ class WebSocketShard extends EventEmitter {
|
|||||||
/**
|
/**
|
||||||
* The HELLO timeout
|
* The HELLO timeout
|
||||||
* @name WebSocketShard#helloTimeout
|
* @name WebSocketShard#helloTimeout
|
||||||
* @type {?NodeJS.Timer}
|
* @type {?NodeJS.Timeout}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
Object.defineProperty(this, 'helloTimeout', { value: undefined, writable: true });
|
Object.defineProperty(this, 'helloTimeout', { value: undefined, writable: true });
|
||||||
@@ -145,7 +145,7 @@ class WebSocketShard extends EventEmitter {
|
|||||||
/**
|
/**
|
||||||
* The ready timeout
|
* The ready timeout
|
||||||
* @name WebSocketShard#readyTimeout
|
* @name WebSocketShard#readyTimeout
|
||||||
* @type {?NodeJS.Timer}
|
* @type {?NodeJS.Timeout}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
Object.defineProperty(this, 'readyTimeout', { value: undefined, writable: true });
|
Object.defineProperty(this, 'readyTimeout', { value: undefined, writable: true });
|
||||||
|
|||||||
16
typings/index.d.ts
vendored
16
typings/index.d.ts
vendored
@@ -103,8 +103,8 @@ declare module 'discord.js' {
|
|||||||
|
|
||||||
export class BaseClient extends EventEmitter {
|
export class BaseClient extends EventEmitter {
|
||||||
constructor(options?: ClientOptions);
|
constructor(options?: ClientOptions);
|
||||||
private _timeouts: Set<NodeJS.Timer>;
|
private _timeouts: Set<NodeJS.Timeout>;
|
||||||
private _intervals: Set<NodeJS.Timer>;
|
private _intervals: Set<NodeJS.Timeout>;
|
||||||
private _immediates: Set<NodeJS.Immediate>;
|
private _immediates: Set<NodeJS.Immediate>;
|
||||||
private readonly api: object;
|
private readonly api: object;
|
||||||
private rest: object;
|
private rest: object;
|
||||||
@@ -112,12 +112,12 @@ declare module 'discord.js' {
|
|||||||
private incrementMaxListeners(): void;
|
private incrementMaxListeners(): void;
|
||||||
|
|
||||||
public options: ClientOptions;
|
public options: ClientOptions;
|
||||||
public clearInterval(interval: NodeJS.Timer): void;
|
public clearInterval(interval: NodeJS.Timeout): void;
|
||||||
public clearTimeout(timeout: NodeJS.Timer): void;
|
public clearTimeout(timeout: NodeJS.Timeout): void;
|
||||||
public clearImmediate(timeout: NodeJS.Immediate): void;
|
public clearImmediate(timeout: NodeJS.Immediate): void;
|
||||||
public destroy(): void;
|
public destroy(): void;
|
||||||
public setInterval(fn: (...args: any[]) => void, delay: number, ...args: any[]): NodeJS.Timer;
|
public setInterval(fn: (...args: any[]) => void, delay: number, ...args: any[]): NodeJS.Timeout;
|
||||||
public setTimeout(fn: (...args: any[]) => void, delay: number, ...args: any[]): NodeJS.Timer;
|
public setTimeout(fn: (...args: any[]) => void, delay: number, ...args: any[]): NodeJS.Timeout;
|
||||||
public setImmediate(fn: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
|
public setImmediate(fn: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
|
||||||
public toJSON(...props: { [key: string]: boolean | string }[]): object;
|
public toJSON(...props: { [key: string]: boolean | string }[]): object;
|
||||||
}
|
}
|
||||||
@@ -274,8 +274,8 @@ declare module 'discord.js' {
|
|||||||
|
|
||||||
export abstract class Collector<K, V> extends EventEmitter {
|
export abstract class Collector<K, V> extends EventEmitter {
|
||||||
constructor(client: Client, filter: CollectorFilter, options?: CollectorOptions);
|
constructor(client: Client, filter: CollectorFilter, options?: CollectorOptions);
|
||||||
private _timeout: NodeJS.Timer | null;
|
private _timeout: NodeJS.Timeout | null;
|
||||||
private _idletimeout: NodeJS.Timer | null;
|
private _idletimeout: NodeJS.Timeout | null;
|
||||||
|
|
||||||
public readonly client: Client;
|
public readonly client: Client;
|
||||||
public collected: Collection<K, V>;
|
public collected: Collection<K, V>;
|
||||||
|
|||||||
Reference in New Issue
Block a user