# core/stores/step.store.ts

> 11 lines of code and 2 definitions.

Tree: GovLab Pipeline
Language: typescript
Layer: application
Canonical: https://banes-lab.com/anatomy/pipeline#file-pipeline-core-stores-step-store-ts
Source text: https://banes-lab.com/source/pipeline/core/stores/step.store.ts.txt

Listed in [core/stores](https://banes-lab.com/api/source/pipeline/core/stores.md).

## Definitions

- `createStepStore` (lexical_declaration, line 4, exported)
- `collected` (lexical_declaration, line 5, exported)

## Contained in

- [core/stores](https://banes-lab.com/anatomy/pipeline/folder-pipeline-core-stores.md)

## Source

```typescript
import type { StepOutput } from "#types/report.types";
import type { StepStore } from "#types/stage.types";

export const createStepStore = function createStepStore(): StepStore {
    const collected: StepOutput[] = [];
    return {
        collect: (output) => {
            collected.push(output);
        },
        outputs: () => [...collected],
    };
};
```
