-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
TypeScript Definition: Make isSame
accept quarter
as unit with quarterOfYear
imported
#588
Conversation
Make `isSame` accept `quarter` as the unit
Codecov Report
@@ Coverage Diff @@
## dev #588 +/- ##
===================================
Coverage 100% 100%
===================================
Files 154 154
Lines 983 983
Branches 140 140
===================================
Hits 983 983 Continue to review full report at Codecov.
|
Thanks. You are right. And we should update isAfter isBefore as well. Plus, add a blank line, please. |
Fixed. |
types/plugin/quarterOfYear.d.ts
Outdated
@@ -16,5 +16,11 @@ declare module 'dayjs' { | |||
startOf(unit: QUnitType): Dayjs | |||
|
|||
endOf(unit: QUnitType): Dayjs | |||
|
|||
isSame(date: dayjs.ConfigType, unit?: QUnitType): Dayjs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you import { ConfigType } at top of the code, please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Thanks
types/plugin/quarterOfYear.d.ts
Outdated
@@ -16,5 +16,11 @@ declare module 'dayjs' { | |||
startOf(unit: QUnitType): Dayjs | |||
|
|||
endOf(unit: QUnitType): Dayjs | |||
|
|||
isSame(date: ConfigType, unit?: QUnitType): Dayjs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should return a boolean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Fix wrong return types
🎉 This PR is included in version 1.8.14 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Make
isSame
acceptquarter
as unit