fix(core): update

This commit is contained in:
2018-11-23 18:29:38 +01:00
parent 6bca8557f9
commit d720b8b084
7 changed files with 52 additions and 40 deletions

View File

@@ -70,6 +70,14 @@ export class Timer {
this.currentTimeout = setTimeout(() => {
this.completedDeferred.resolve();
}, this.timeLeft);
} else {
throw new Error('timer has NOT been started before. Please use .start() instead');
}
}
public reset() {
this.pause();
this.startedAt = null;
this.pausedAt = null;
}
}