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

TypeScript Definition: Make isSame accept quarter as unit with quarterOfYear imported #588

Merged
merged 4 commits into from
May 6, 2019
Merged

Conversation

Cryrivers
Copy link
Contributor

Make isSame accept quarter as unit

Make `isSame` accept `quarter` as the unit
@codecov-io
Copy link

codecov-io commented May 6, 2019

Codecov Report

Merging #588 into dev will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@         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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 225bbf9...8e42976. Read the comment docs.

@iamkun
Copy link
Owner

iamkun commented May 6, 2019

Thanks. You are right. And we should update isAfter isBefore as well. Plus, add a blank line, please.

@Cryrivers
Copy link
Contributor Author

Fixed.

@@ -16,5 +16,11 @@ declare module 'dayjs' {
startOf(unit: QUnitType): Dayjs

endOf(unit: QUnitType): Dayjs

isSame(date: dayjs.ConfigType, unit?: QUnitType): Dayjs
Copy link
Owner

@iamkun iamkun May 6, 2019

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Thanks

@@ -16,5 +16,11 @@ declare module 'dayjs' {
startOf(unit: QUnitType): Dayjs

endOf(unit: QUnitType): Dayjs

isSame(date: ConfigType, unit?: QUnitType): Dayjs
Copy link
Owner

Choose a reason for hiding this comment

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

should return a boolean

Copy link
Contributor Author

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
@iamkun iamkun merged commit de14682 into iamkun:dev May 6, 2019
@iamkun
Copy link
Owner

iamkun commented May 7, 2019

🎉 This PR is included in version 1.8.14 🎉

The release is available on:

Your semantic-release bot 📦🚀

@iamkun iamkun added the released label May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants