StepResponse

This class is used to create the response returned by a step. A step return its data by returning an instance of StepResponse.

Type parameters#

TOutputobjectOptional
The type of the output of the step.
TCompensateInputobjectOptional
The type of the compensation input. If the step doesn't specify any compensation input, then the type of TCompensateInput is the same as that of TOutput.

Constructors#

Methods#

constructor#

The constructor of the StepResponse

Type Parameters#

TOutputobjectOptional
The type of the output of the step.
TCompensateInputobjectOptional
The type of the compensation input. If the step doesn't specify any compensation input, then the type of TCompensateInput is the same as that of TOutput.

Parameters#

outputTOutputOptional
The output of the step.
compensateInputTCompensateInputOptional
The input to be passed as a parameter to the step's compensation function. If not provided, the output will be provided instead.
Was this page helpful?
Edit this page
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break