Skip to content

Commit 405b487

Browse files
authored
fix(Typing): change NodeJS.Timer into NodeJS.Timeout (#4755)
1 parent b48b782 commit 405b487

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/client/websocket/WebSocketShard.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class WebSocketShard extends EventEmitter {
121121
/**
122122
* The HELLO timeout
123123
* @name WebSocketShard#helloTimeout
124-
* @type {?NodeJS.Timer}
124+
* @type {?NodeJS.Timeout}
125125
* @private
126126
*/
127127
Object.defineProperty(this, 'helloTimeout', { value: undefined, writable: true });
@@ -145,7 +145,7 @@ class WebSocketShard extends EventEmitter {
145145
/**
146146
* The ready timeout
147147
* @name WebSocketShard#readyTimeout
148-
* @type {?NodeJS.Timer}
148+
* @type {?NodeJS.Timeout}
149149
* @private
150150
*/
151151
Object.defineProperty(this, 'readyTimeout', { value: undefined, writable: true });

typings/index.d.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,21 +103,21 @@ declare module 'discord.js' {
103103

104104
export class BaseClient extends EventEmitter {
105105
constructor(options?: ClientOptions);
106-
private _timeouts: Set<NodeJS.Timer>;
107-
private _intervals: Set<NodeJS.Timer>;
106+
private _timeouts: Set<NodeJS.Timeout>;
107+
private _intervals: Set<NodeJS.Timeout>;
108108
private _immediates: Set<NodeJS.Immediate>;
109109
private readonly api: object;
110110
private rest: object;
111111
private decrementMaxListeners(): void;
112112
private incrementMaxListeners(): void;
113113

114114
public options: ClientOptions;
115-
public clearInterval(interval: NodeJS.Timer): void;
116-
public clearTimeout(timeout: NodeJS.Timer): void;
115+
public clearInterval(interval: NodeJS.Timeout): void;
116+
public clearTimeout(timeout: NodeJS.Timeout): void;
117117
public clearImmediate(timeout: NodeJS.Immediate): void;
118118
public destroy(): void;
119-
public setInterval(fn: (...args: any[]) => void, delay: number, ...args: any[]): NodeJS.Timer;
120-
public setTimeout(fn: (...args: any[]) => void, delay: number, ...args: any[]): NodeJS.Timer;
119+
public setInterval(fn: (...args: any[]) => void, delay: number, ...args: any[]): NodeJS.Timeout;
120+
public setTimeout(fn: (...args: any[]) => void, delay: number, ...args: any[]): NodeJS.Timeout;
121121
public setImmediate(fn: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
122122
public toJSON(...props: { [key: string]: boolean | string }[]): object;
123123
}
@@ -274,8 +274,8 @@ declare module 'discord.js' {
274274

275275
export abstract class Collector<K, V> extends EventEmitter {
276276
constructor(client: Client, filter: CollectorFilter, options?: CollectorOptions);
277-
private _timeout: NodeJS.Timer | null;
278-
private _idletimeout: NodeJS.Timer | null;
277+
private _timeout: NodeJS.Timeout | null;
278+
private _idletimeout: NodeJS.Timeout | null;
279279

280280
public readonly client: Client;
281281
public collected: Collection<K, V>;

0 commit comments

Comments
 (0)