* Executes `fn` after `delay`, clearing any previously scheduled call.
(delay: number, fn: Function)
| 13 | * Executes `fn` after `delay`, clearing any previously scheduled call. |
| 14 | */ |
| 15 | start(delay: number, fn: Function) { |
| 16 | this.clear(); |
| 17 | this.currentId = setTimeout(() => { |
| 18 | this.currentId = null; |
| 19 | fn(); |
| 20 | }, delay); |
| 21 | } |
| 22 | |
| 23 | clear = () => { |
| 24 | if (this.currentId !== null) { |
no test coverage detected