Skip to content

Commit 222fe19

Browse files
committed
[js] Minor tweaks for type checking
1 parent 4e77374 commit 222fe19

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

javascript/node/selenium-webdriver/lib/events.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,9 @@ class Listener {
2828
* @param {boolean} oneshot Whether this listener should only be used once.
2929
*/
3030
constructor(fn, scope, oneshot) {
31-
Object.defineProperties(this, {
32-
fn: {value: fn},
33-
scope: {value: scope},
34-
oneshot: {value: oneshot}
35-
});
31+
this.fn = fn;
32+
this.scope = scope;
33+
this.oneshot = oneshot;
3634
}
3735
}
3836

javascript/node/selenium-webdriver/safari.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,9 @@ class CommandExecutor {
363363
this.server_ = new Server();
364364

365365
this.safari_ = this.server_.start().then(function(address) {
366-
var tasks = cleanSession(
366+
var tasks = /** @type {!Array<!IThenable>} */(cleanSession(
367367
/** @type {!Object} */(
368-
command.getParameters()['desiredCapabilities']));
368+
command.getParameters()['desiredCapabilities'])));
369369
tasks.push(
370370
findSafariExecutable(),
371371
createConnectFile(

0 commit comments

Comments
 (0)