Alireza Safaierad

Results 12 comments of Alireza Safaierad

Seems it's not possible for now: https://github.com/microsoft/TypeScript/issues/34974

Hi @mikoloism, thanks for your contribution. We must ensure that the functions we introduce are free from side effects, which is the main motivation behind this library. Also, manipulating the...

Fixed by https://github.com/microsoft/TypeScript/pull/55613

Just check the git history. https://github.com/geekyouth/moodist/commits/main/?after=9647f519682aef925ee863b02a7ac2441fb0e865+104

Hey @gooddevil79, thanks for the proposal. I have a few comments on the current implementation: 1. We should avoid using `window` in our functions as it couples the implementation to...

Thanks @gooddevil79 for your contribution. I'd suggest extending the function to handle hours also. ```js function formatTime(seconds: number): string {} formatTime(120); // "02:00" formatTime(3661); // "01:01:01" ```

What happens if we use `{ hours: true, minutes: false, seconds: true }` 🤔

I'd suggest this signature: ```ts format( seconds: number, format: 'hh:mm:ss' | 'hh:mm' | 'mm:ss' ): string {} ```