diff options
author | Jose <jose@zeroc.com> | 2018-03-27 12:32:02 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2018-03-27 12:32:02 +0200 |
commit | c21ef10cef69a8549491ce0bf324da6c4412399a (patch) | |
tree | b4de3c62defbaf4028a3431234df44914366a1e5 /js/src/Ice/browser/TimerUtil.js | |
parent | Extra fixes for hold test to break loops in case of error (diff) | |
download | ice-c21ef10cef69a8549491ce0bf324da6c4412399a.tar.bz2 ice-c21ef10cef69a8549491ce0bf324da6c4412399a.tar.xz ice-c21ef10cef69a8549491ce0bf324da6c4412399a.zip |
JavaScript ESLINT prefer const usage
https://eslint.org/docs/rules/prefer-const
Diffstat (limited to 'js/src/Ice/browser/TimerUtil.js')
-rw-r--r-- | js/src/Ice/browser/TimerUtil.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/js/src/Ice/browser/TimerUtil.js b/js/src/Ice/browser/TimerUtil.js index 4429ce16fee..f34b1c35010 100644 --- a/js/src/Ice/browser/TimerUtil.js +++ b/js/src/Ice/browser/TimerUtil.js @@ -23,7 +23,7 @@ const Ice = require("../Ice/ModuleRegistry").Ice; // function createTimerObject() { - let Timer = class + const Timer = class { static setTimeout(cb, ms) { @@ -68,16 +68,16 @@ const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; const _timers = new Map(); -const _SetTimeoutType = 0, - _SetIntervalType = 1, - _SetImmediateType = 2, - _ClearTimeoutType = 3, - _ClearIntervalType = 4; +const _SetTimeoutType = 0; +const _SetIntervalType = 1; +const _SetImmediateType = 2; +const _ClearTimeoutType = 3; +const _ClearIntervalType = 4; let worker; let _nextId = 0; -var nextId = function() +const nextId = function() { if(_nextId == MAX_SAFE_INTEGER) { @@ -146,11 +146,11 @@ const workerCode = function() // // jshint worker: true // - const _wSetTimeoutType = 0, - _wSetIntervalType = 1, - _wSetImmediateType = 2, - _wClearTimeoutType = 3, - _wClearIntervalType = 4; + const _wSetTimeoutType = 0; + const _wSetIntervalType = 1; + const _wSetImmediateType = 2; + const _wClearTimeoutType = 3; + const _wClearIntervalType = 4; const timers = {}; |