Skip to content

Commit

Permalink
core(tsc): don't use index signature in simulator.js (#5897)
Browse files Browse the repository at this point in the history
  • Loading branch information
brendankenny authored Aug 22, 2018
1 parent 846bb1c commit 23eca9d
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 23eca9d

Please sign in to comment.