Open tzlAsTom opened 7 years ago
This should be: if(!(seconds > 0)) return Promise.resolve(0);
Mixing return types in an un-typed language like JS is just asking for maintainability and debugging nightmares. By returning a synchronous Promise, you keep the structure of the code relatively the same and don't introduce any sort of type-handling (was I returned a Promise or a primitive?)
Will get:
Expect: