diff --git a/src.ts/providers/abstract-provider.ts b/src.ts/providers/abstract-provider.ts index 6924e17a5..2d4a98bd3 100644 --- a/src.ts/providers/abstract-provider.ts +++ b/src.ts/providers/abstract-provider.ts @@ -51,6 +51,8 @@ import type { TransactionRequest } from "./provider.js"; +type Timer = ReturnType; + // Constants const BN_2 = BigInt(2); @@ -341,7 +343,7 @@ export class AbstractProvider implements Provider { #lastBlockNumber: number; #nextTimer: number; - #timers: Map void, time: number }>; + #timers: Map void, time: number }>; #disableCcipRead: boolean; @@ -983,7 +985,7 @@ export class AbstractProvider implements Provider { if (confirms === 0) { return this.getTransactionReceipt(hash); } return new Promise(async (resolve, reject) => { - let timer: null | NodeJS.Timer = null; + let timer: null | Timer = null; const listener = (async (blockNumber: number) => { try { diff --git a/src.ts/providers/provider-jsonrpc.ts b/src.ts/providers/provider-jsonrpc.ts index bb162476d..d330c93f8 100644 --- a/src.ts/providers/provider-jsonrpc.ts +++ b/src.ts/providers/provider-jsonrpc.ts @@ -32,6 +32,8 @@ import type { Networkish } from "./network.js"; import type { Provider, TransactionRequest, TransactionResponse } from "./provider.js"; import type { Signer } from "./signer.js"; +type Timer = ReturnType; + const Primitive = "bigint,boolean,function,number,string,symbol".split(/,/g); //const Methods = "getAddress,then".split(/,/g); @@ -358,7 +360,7 @@ export abstract class JsonRpcApiProvider extends AbstractProvider { // Payloads are queued and triggered in batches using the drainTimer #payloads: Array; - #drainTimer: null | NodeJS.Timer; + #drainTimer: null | Timer; #notReady: null | { promise: Promise,