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
Subtracting Date objects shows a TypeScript error, but actually works. #58400
Labels
Duplicate
An existing issue was already created
Comments
+1 |
If you want to subtract date objects - please cast them to numbers first. |
Duplicate of #5710. |
See also #2361 (comment) |
This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
π Search Terms
"Date arithmetic"
π Version & Regression Information
β― Playground Link
No response
π» Code
π Actual behavior
TypeScript shows error: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.ts(2362)
π Expected behavior
No error because the operation works.
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: