---
displayed_sidebar: workflowsSidebar
---

import ParameterTypes from "@site/src/components/ParameterTypes"

# StepFunctionResult

 **StepFunctionResult**: (`this`: [CreateWorkflowComposerContext](workflows.CreateWorkflowComposerContext.mdx)) => `TOutput` extends [] ? [...WorkflowData&#60;&#123; [K in keyof TOutput]: TOutput[number][K] &#125;&#62;[]] : [WorkflowData](workflows.WorkflowData.mdx)&#60;&#123; [K in keyof TOutput]: TOutput[K] &#125;&#62;

## Type Parameters

<ParameterTypes parameters={[
  {
    "name": "TOutput",
    "type": "`unknown` \\| `unknown`[]",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  }
]} />

## Type declaration

### Parameters

<ParameterTypes parameters={[
  {
    "name": "this",
    "type": "[CreateWorkflowComposerContext](workflows.CreateWorkflowComposerContext.mdx)",
    "description": "",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "flow",
        "type": "`OrchestratorBuilder`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "handlers",
        "type": "`WorkflowHandler`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "hookBinder",
        "type": "`<TOutput>`(`name`: `string`, `fn`: `Function`) => [WorkflowData](workflows.WorkflowData.mdx)&#60;TOutput&#62;",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "hooksCallback_",
        "type": "`Record<string, Function[]>`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "hooks_",
        "type": "`string`[]",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "parallelizeBinder",
        "type": "`<TOutput>`(`fn`: (`this`: [CreateWorkflowComposerContext](workflows.CreateWorkflowComposerContext.mdx)) => `TOutput`) => `TOutput`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "stepBinder",
        "type": "`<TOutput>`(`fn`: [StepFunctionResult](workflows.StepFunctionResult.mdx)) => [WorkflowData](workflows.WorkflowData.mdx)&#60;TOutput&#62;",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "workflowId",
        "type": "`string`",
        "description": "",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  }
]} />

### Returns

<ParameterTypes parameters={[
  {
    "name": "TOutput extends [] ? [...WorkflowData&#60;&#123; [K in keyof TOutput]: TOutput[number][K] &#125;&#62;[]] : WorkflowData&#60;&#123; [K in keyof TOutput]: TOutput[K] &#125;&#62;",
    "type": "`TOutput` extends [] ? [...WorkflowData&#60;&#123; [K in keyof TOutput]: TOutput[number][K] &#125;&#62;[]] : [WorkflowData](workflows.WorkflowData.mdx)&#60;&#123; [K in keyof TOutput]: TOutput[K] &#125;&#62;",
    "optional": true,
    "defaultValue": "",
    "description": "",
    "expandable": false,
    "children": []
  }
]} />
