Skip to content

Commit

Permalink
core(tsc): don't use index signature in simulator.js
Browse files Browse the repository at this point in the history
  • Loading branch information
brendankenny committed Aug 22, 2018
1 parent a513c51 commit 95f0327
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions lighthouse-core/gather/computed/load-simulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions lighthouse-core/lib/dependency-graph/simulator/simulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class Simulator {
this._nodeTimings = new Map();
/** @type {Map<string, number>} */
this._numberInProgressByType = new Map();
/** @type {Record<number, Set<Node>>} */
this._nodes = {};
this._dns = new DNSCache({rtt: this._rtt});
// @ts-ignore
Expand Down Expand Up @@ -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();
}
}

Expand Down

0 comments on commit 95f0327

Please sign in to comment.