You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Every step.run function returns unknown instead of the correct type.
I don't know the reason. I suspect it has something to do with unions or complex types.
I'm currently using effect and happens with Option, Either or Effect types.
I believe my problem come from the incorrect assumption that step.run is a HOF and returns the return value of the parameter function. Upon reviewing the documentation, it seems that the result is expected to be or can be serialized.
Currently, I have mitigated the issue by using Schema.encode (where Schema serves as a decoder or encoder for data transmission over the wire) before returning the value. I have also updated the example with a working implementation.
If this is working as expected, it might be helpful to include more details in the documentation on why serialization is necessary or make it more explicit. For instance, Date are not serializable by default, so I assume there is a default "serializer" for common types (such as Date, BigInt, and so on).
Describe the bug
Every
step.run
function returnsunknown
instead of the correct type.I don't know the reason. I suspect it has something to do with unions or complex types.
I'm currently using effect and happens with
Option
,Either
orEffect
types.To Reproduce
https://codesandbox.io/p/sandbox/inngest-run-returns-unknown-c49kdd
Expected behavior
It should return the same type as the
step.run
callback returns.Code snippets / Logs / Screenshots
https://codesandbox.io/p/sandbox/inngest-run-returns-unknown-c49kdd
System info (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: