*Use NodeJS.Timeout type

This commit is contained in:
Derrick Hammer 2022-07-31 21:02:27 -04:00
parent 8c95ddc07b
commit cf3853702f
1 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ export default class RpcQuery {
return;
}
return new Promise((resolve, reject) => {
let timer: number;
let timer: NodeJS.Timeout;
socket.on("data", (res: Buffer) => {
clearTimeout(timer);
socket.end();
@ -92,7 +92,7 @@ export default class RpcQuery {
socket.write(pack(this._query));
timer = setTimeout(() => {
reject("timeout");
}, this._network.relayTimeout * 1000);
}, this._network.relayTimeout * 1000) as NodeJS.Timeout;
});
}