diff --git a/lighthouse-core/gather/computed/load-simulator.js b/lighthouse-core/gather/computed/load-simulator.js index 36339e6feb71..46d53698ac51 100644 --- a/lighthouse-core/gather/computed/load-simulator.js +++ b/lighthouse-core/gather/computed/load-simulator.js @@ -23,6 +23,7 @@ class LoadSimulatorArtifact extends ComputedArtifact { const {throttlingMethod, throttling} = data.settings; const networkAnalysis = await artifacts.requestNetworkAnalysis(data.devtoolsLog); + /** @type {LH.Gatherer.Simulation.Options} */ const options = { additionalRttByOrigin: networkAnalysis.additionalRttByOrigin, serverResponseTimeByOrigin: networkAnalysis.serverResponseTimeByOrigin, diff --git a/lighthouse-core/lib/dependency-graph/simulator/simulator.js b/lighthouse-core/lib/dependency-graph/simulator/simulator.js index 8a4c5f4ba6ee..18ed0f2d7161 100644 --- a/lighthouse-core/lib/dependency-graph/simulator/simulator.js +++ b/lighthouse-core/lib/dependency-graph/simulator/simulator.js @@ -66,6 +66,7 @@ class Simulator { this._nodeTimings = new Map(); /** @type {Map} */ this._numberInProgressByType = new Map(); + /** @type {Record>} */ this._nodes = {}; this._dns = new DNSCache({rtt: this._rtt}); // @ts-ignore @@ -95,8 +96,8 @@ class Simulator { this._numberInProgressByType = new Map(); this._nodes = {}; - for (const key of Object.keys(NodeState)) { - this._nodes[NodeState[key]] = new Set(); + for (const state of Object.values(NodeState)) { + this._nodes[state] = new Set(); } }