-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Optional argument in is*
functions
#56
Comments
this comes from the date function which converts an undefined value to a new Date object with the current time. for at least the |
This would also work well with |
If it would be implemented I do think it would be best to use typescript's function overload feature to provide more jsdoc, but also prevent unexpected behaviour from being created (like Also it's maybe best to first discuss together with Justin and other contributors which function categories and/or independent functions should allow for null/undefined arguments as this could have a big impact on Tempo |
In case we are comparing with the current time, the second argument could be omitted.
It seems to work as expected, but it doesn't seem obvious from the docs.
It also causes a type error because the second argument is required.
Most likely, in functions other than
is*
you can follow the same way and not writenew Date()
in case the operation is performed with the current time.The text was updated successfully, but these errors were encountered: