-
Notifications
You must be signed in to change notification settings - Fork 124
Simplify the type of MockActivityEnvironment.run
#1711
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
base: main
Are you sure you want to change the base?
Conversation
This improves its type inference, see temporalio#1710
Thanks! At the moment, CI isn't passing. See my comments for hints on how to resolve these. You may also add a test in
|
Thanks for the review @mjameswh, admittedly I just did a quick edit in GitHub's integrated editor, sorry for not doing it properly 😅 I've made the changes you suggested, and I think it's all good now. I tried running |
@mjameswh could I get approval for this? |
Very sorry for the delay. I'm hesitant regarding the PR as it currently stands because removing the However, the team is currently working head down on a new feature which may ripple down to that specific API. For that reason, I'd prefer to wait for those other features to get in before digging more into this proposed change. For now, I approved CI execution, so you can at least see if that resolve the build issue. |
What was changed
Simplified the type of
MockActivityEnvironment.run
Why?
Improves the type inference of the return type.
This example:
Does not currently compile with strict types because
result
is inferred asunknown
instead ofstring
. This change makes the type inference work correctly.Checklist
Closes [Feature Request] Better type inference for
MockActivityEnvironment.run
#1710How was this tested:
Made the change on my local machine and saw the red squiggly lines disappear.
I don't know, this is technically a breaking change if anyone is currently setting the type parameters.