Mapped object type returns from step.run()
are oversimplified
#98
Labels
⬆️ improvement
Performance, reliability, or usability improvements
📦 inngest
Affects the `inngest` package
Describe the bug
Mapped object types with property overrides lose those overrides when output from
step.run()
.This affects a user using the plaid/plaid-node package, where many of the types returned from client methods are these mapped object types with overrides.
It looks like this project uses OpenAPITools/openapi-generator to create these types, so it's likely that any project using that will suffer the same fate.
To Reproduce
Expected behavior
The object type should be maintained.
System info (please complete the following information):
1.0.0
Additional context
The issue is caused because we use a
Jsonify<>
type from sindresorhus/type-fest to simulate the (de)serialization of data as it moves to/from Inngest, which is stripping the extra properties.Need to investigate whether this is a conscious choice and, if not, whether the behaviour of the object type being maintained is reasonable.
The text was updated successfully, but these errors were encountered: