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

intlFormatDistance: refactor options #3796

Merged
merged 3 commits into from May 13, 2024

Conversation

Renegade334
Copy link
Contributor

@Renegade334 Renegade334 commented May 6, 2024

This small change refactors the options interface in intlFormatDistance to inherit from Intl.RelativeTimeFormatOptions, similar to how the equivalent options interface works in intlFormat.

This has the advantage of keeping the RelativeTimeFormat options up-to-date with any TypeScript library changes, as well as simplifying the declarations somewhat.

Unit tests are unaffected.

Copy link
Member

@kossnocorp kossnocorp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I also added some more type changes.

@kossnocorp kossnocorp merged commit 8345ba1 into date-fns:main May 13, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants