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

withSuffix should be optional in the type for humanize #1064

Closed
Axnyff opened this issue Sep 21, 2020 · 2 comments
Closed

withSuffix should be optional in the type for humanize #1064

Axnyff opened this issue Sep 21, 2020 · 2 comments

Comments

@Axnyff
Copy link
Contributor

Axnyff commented Sep 21, 2020

Describe the bug
In this function
https://github.com/iamkun/dayjs/blob/dev/src/plugin/duration/index.js#L151
and in the website: https://day.js.org/docs/en/durations/humanize
we can see that humanize does not require an argument.

However, in the type declaration, it is mandatory:
https://github.com/iamkun/dayjs/blob/dev/types/plugin/duration.d.ts#L14

Expected behavior
The withSuffix parameters should be declared optional

I can do the fix if needed,
Thanks for your time

@iamkun
Copy link
Owner

iamkun commented Sep 21, 2020

Thanks. PR is most welcomed.

@iamkun
Copy link
Owner

iamkun commented Sep 21, 2020

fixed in #1065

@iamkun iamkun closed this as completed Sep 21, 2020
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

No branches or pull requests

2 participants