From a7d21ebb8e2f6f40d710e21d3721a382da96f723 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 17 Jan 2019 10:43:01 +0100 Subject: [PATCH] re-apply Timer linting fixes that happened in the tiled ui PR --- src/UserActivity.js | 1 + src/utils/Timer.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/UserActivity.js b/src/UserActivity.js index 4e3667274c..145b23e36e 100644 --- a/src/UserActivity.js +++ b/src/UserActivity.js @@ -44,6 +44,7 @@ class UserActivity { * Can be called multiple times with the same already running timer, which is a NO-OP. * Can be called before the user becomes active, in which case it is only started * later on when the user does become active. + * @param {Timer} timer the timer to use */ timeWhileActive(timer) { // important this happens first diff --git a/src/utils/Timer.js b/src/utils/Timer.js index aeac0887c9..6d6dbb0996 100644 --- a/src/utils/Timer.js +++ b/src/utils/Timer.js @@ -70,6 +70,7 @@ export default class Timer { /** * if not started before, starts the timer. + * @returns {Timer} the same timer */ start() { if (!this.isRunning()) { @@ -81,6 +82,7 @@ export default class Timer { /** * (re)start the timer. If it's running, reset the timeout. If not, start it. + * @returns {Timer} the same timer */ restart() { if (this.isRunning()) { @@ -98,6 +100,7 @@ export default class Timer { /** * if the timer is running, abort it, * and reject the promise for this timer. + * @returns {Timer} the same timer */ abort() { if (this.isRunning()) {