ice icon indicating copy to clipboard operation
ice copied to clipboard

Cleanup var usage in JavaScript

Open pepone opened this issue 1 year ago • 0 comments

We should not use var in modern JavaScript, it should be either let or const

jose@mac js % rg "var "
test/Slice/escape/Key.ice
54:    optional(2) var goto;
63:    optional(1) break for(optional(2) var goto,
70:    optional(1) break continue(optional(2) var goto,
76:    optional(1) break in(out optional(2) var goto,
83:    optional(1) break foreach(out optional(2) var goto,
122:    var in(break internal, delete is, explicit* lock, case* namespace, typeof* new, delete null,

src/Ice/IncomingRequest.js
35:        var identity = new Identity();
55:        var encoding = new EncodingVersion();

src/Ice/Properties.js
64:        var defaultValue = 0;
86:        var defaultPropertyList = StringUtil.splitString(Properties.getDefaultProperty(key), ", \t\r\n");
140:        var prop = Properties.findIceProperty(key, true);
440:        var propertyArray = null;

src/Ice/Reference.js
1030:        var handler = new ConnectRequestHandler(this);

test/Ice/middleware/Server.ts
17:            var response = await this._next.dispatch(request);

src/Ice/ConnectionI.js
1439:                var request = new IncomingRequest(requestId, this, adapter, stream);

test/Ice/timeout/Client.ts
45:            var properties = communicator.getProperties().clone();

src/Ice/OutgoingAsync.js
275:        var retryIntervals = instance._retryIntervals;

src/Ice/OutputStream.js
492:        var instance = null;

pepone avatar Oct 09 '24 08:10 pepone