-
Notifications
You must be signed in to change notification settings - Fork 119
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
allow a union in Interval of #652
allow a union in Interval of #652
Conversation
Seems to be caused by microsoft/TypeScript#14107. Another, slightly simpler example of code that doesn't compile: const start = Instant.EPOCH;
const endExclusiveOrDuration = Math.random() < 0.5 ? Instant.EPOCH : Duration.ZERO;
const interval = Interval.of(start, endExclusiveOrDuration); |
Hi and thank you for contributing. I have a couple of comments:
|
yeah I thought of this. wasn't sure how you'd want to deal with it. Basically I did as little as possible
do you have typescript tests? I didn't see them
isn't that what I called it? I think you typo-ed your suggestion. I thinking you want |
I see. I think deleting the other two is very likely safe, but better ensure that with some tests.
Here. The file is just type-checked, it never runs.
I think you called it just |
Thanks @InExtremaRes for jumping in ! |
@xenoterracide I must've misscopied the filepath, but the file is easy to find inside the project. |
sorry it took so long, busy little bee... this work? |
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.
Beside the one comment, LGTM.
@InExtremaRes do you have any further objections ?
Hi! I'm currently out of city and without any computer to really test it right now. I'll be back in a couple of days. However, if this PR is urgent, I feel very confident in the change it proposes and the tests can (if needed) be improved later. |
ok, I moved things around, better? |
p.s. it's not urgent. I think I worked around it, or realized something else needed doing anyways. Sorry that it took yet another 2 days. I've come down with covid, yay! |
@xenoterracide thanks for contributing and sorry for the delay |
And get well soon |
this is needed for code like this to compile