Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert format duration to typescript #2672

Conversation

Liam-Tait
Copy link
Contributor

@Liam-Tait Liam-Tait commented Oct 7, 2021

Replace regex replace with lookup on object. This adds type safety that regex does not give
Added count variable for type safety, this allows type narrowing
Added trailing commas by running prettier

Closes date-fns/date-fns-typescriptify#36

@Liam-Tait
Copy link
Contributor Author

Hey @tan75, do I need to do anything to this to get it ready for review/merged?

@tan75
Copy link
Contributor

tan75 commented Nov 23, 2021

Hi @Liam-Tait
Thanks a lot for your help however, unfortunately, we can not accept this PR as there are some changes to the logic in it. At the moment our focus is to translate the functions to TS without any logic changes so we could release v3.
I will convert this issue to discussion so we could We can discuss the logic changes you proposed above and work on it once the v3 is out.
Thanks again 🙏

@tan75 tan75 closed this Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate formatDuration function
3 participants