diff --git a/cli/sentry-prompt.js b/cli/sentry-prompt.js index a22c4ed8acad..534f47a53bc1 100644 --- a/cli/sentry-prompt.js +++ b/cli/sentry-prompt.js @@ -26,7 +26,7 @@ function prompt() { return Promise.resolve(false); } - /** @type {NodeJS.Timer|undefined} */ + /** @type {NodeJS.Timeout|undefined} */ let timeout; const prompt = new Confirm.Confirm({ @@ -47,7 +47,7 @@ function prompt() { return Promise.race([ prompt.run().then(result => { - clearTimeout(/** @type {NodeJS.Timer} */ (timeout)); + clearTimeout(/** @type {NodeJS.Timeout} */ (timeout)); return result; }), timeoutPromise, diff --git a/core/gather/driver/wait-for-condition.js b/core/gather/driver/wait-for-condition.js index b110f686c12a..ac5b57f18b14 100644 --- a/core/gather/driver/wait-for-condition.js +++ b/core/gather/driver/wait-for-condition.js @@ -126,7 +126,7 @@ function waitForFcp(session, pauseAfterFcpMs, maxWaitForFcpMs) { */ function waitForNetworkIdle(session, networkMonitor, networkQuietOptions) { let hasDCLFired = false; - /** @type {NodeJS.Timer|undefined} */ + /** @type {NodeJS.Timeout|undefined} */ let idleTimeout; /** @type {(() => void)} */ let cancel = () => { @@ -225,7 +225,7 @@ function waitForCPUIdle(session, waitForCPUQuiet) { }; } - /** @type {NodeJS.Timer|undefined} */ + /** @type {NodeJS.Timeout|undefined} */ let lastTimeout; let canceled = false; @@ -355,7 +355,7 @@ function waitForLoadEvent(session, pauseAfterLoadMs) { }; const promise = new Promise((resolve, reject) => { - /** @type {NodeJS.Timer|undefined} */ + /** @type {NodeJS.Timeout|undefined} */ let loadTimeout; const loadListener = function() { loadTimeout = setTimeout(resolve, pauseAfterLoadMs); @@ -420,7 +420,7 @@ async function waitForFullyLoaded(session, networkMonitor, options) { cpuQuietThresholdMs, maxWaitForLoadedMs, maxWaitForFcpMs} = options; const {waitForFcp, waitForLoadEvent, waitForNetworkIdle, waitForCPUIdle} = options._waitForTestOverrides || DEFAULT_WAIT_FUNCTIONS; - /** @type {NodeJS.Timer|undefined} */ + /** @type {NodeJS.Timeout|undefined} */ let maxTimeoutHandle; // Listener for FCP. Resolves pauseAfterFcpMs ms after first FCP event. diff --git a/core/gather/session.js b/core/gather/session.js index b15938c9bd14..8d9bd24ad7af 100644 --- a/core/gather/session.js +++ b/core/gather/session.js @@ -113,7 +113,7 @@ class ProtocolSession extends CrdpEventEmitter { const timeoutMs = this.getNextProtocolTimeout(); this._nextProtocolTimeout = undefined; - /** @type {NodeJS.Timer|undefined} */ + /** @type {NodeJS.Timeout|undefined} */ let timeout; const timeoutPromise = new Promise((resolve, reject) => { // Unexpected setTimeout invocation to preserve the error stack. https://github.com/GoogleChrome/lighthouse/issues/13332