Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
fix(heatmap): snap time bucket to calendar/fixed intervals #1462
fix(heatmap): snap time bucket to calendar/fixed intervals #1462
Changes from 8 commits
e99af4c
4f6e7c5
5c16f84
7c89a57
eb00c5d
bc0fffd
100bf5b
296d46e
500f58f
7a0d7db
4057868
f623e80
59882e3
0eb451a
ad7c7d0
985e3fc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Nice! I hope TS will fix this oversight eventually. As it's currently an abstraction that's leaking from hundreds of self-inflicted wounds,
Number.isFinite
is one of those things that should narrow types (here, tonumber
if the result is true), and this utility is a nice workaround in the meantimeThere 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.
I know, I was following your comments on the TS repo and I was thinking that, for now, can solve our cases
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.
Maybe it could be a
value: unknown
, and it can be put into common or utils, as there are many places where I temporarily used atypeof d === 'number' && Number.isFinite(d)
check whereisFiniteNumber
would be clearer. All places where we do=== 'number'
is an easy to grep candidate for a future PR. Even the name of this function is perfect 👌