-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
Use same types for return and arg #501
Comments
Hi @Techn1x, I have the same issue on my side, I could create a sample reproduction:
Let me know If I can help here. |
Hi @Techn1x, I think this is a limit of typescript... I did a lot of trial and error on the typescript playground, and here is a workaround that could work (forcing the type manually on the task).
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to build a typed task that returns the same type that it was performed with
For example;
I've come up with this as the task definition;
But I can't seem to get the return type from the perform call to be generic, it seems stuck as
unknown
. Is there a way to do what I am trying to acheive?It's probably got something to do with writing a Task type like this, but I can't quite figure out how to apply it to the task definition..
The text was updated successfully, but these errors were encountered: