Prefer const vs let for variables that are only declared once
Requires that variable declarations use `const` instead of `let` and `var` if possible. This is mostly for code readability, performance wins are debatable.
This commit is contained in:
@@ -179,7 +179,7 @@ export class SelectionManager extends EventEmitter implements ISelectionManager
|
||||
|
||||
// Get first row
|
||||
const startRowEndCol = start[1] === end[1] ? end[0] : null;
|
||||
let result: string[] = [];
|
||||
const result: string[] = [];
|
||||
result.push(this._buffer.translateBufferLineToString(start[1], true, start[0], startRowEndCol));
|
||||
|
||||
// Get middle rows
|
||||
@@ -586,7 +586,7 @@ export class SelectionManager extends EventEmitter implements ISelectionManager
|
||||
* @param event The mouseup event.
|
||||
*/
|
||||
private _onMouseUp(event: MouseEvent): void {
|
||||
let timeElapsed = event.timeStamp - this._mouseDownTimeStamp;
|
||||
const timeElapsed = event.timeStamp - this._mouseDownTimeStamp;
|
||||
|
||||
this._removeMouseDownListeners();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user