{
  "id": "@typed/fx/Fx#collectAll",
  "canonicalId": "@typed/fx/Fx#collectAll",
  "symbol": {
    "id": "@typed/fx/Fx#collectAll",
    "packageName": "@typed/fx",
    "moduleName": "Fx",
    "exportName": "collectAll",
    "kind": "constant",
    "signatures": [
      "export declare const collectAll: <A, E = never, R = never>(fx: Fx<A, E, R>) => Effect.Effect<ReadonlyArray<A>, E, R>;"
    ],
    "summary": "Collects all values emitted by an `Fx` into an array.",
    "sections": {
      "Why": "Finite producers sometimes need to cross from push processing back to one Effect\nvalue. `collectAll` makes that buffering explicit rather than hiding it in `Fx`.",
      "Ownership and lifetime": "The array is allocated separately for each Effect run. Subscription starts when the\nEffect runs and ends on source completion, failure, or interruption. Every emitted\nvalue is retained until completion, so an infinite source never completes and can\ngrow memory without bound. Failures and services remain in `E` and `R`."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport { collectAll, fromIterable } from \"@typed/fx/Fx\"\n\nconst program = collectAll(fromIterable([1, 2, 3])).pipe(\n  Effect.map((values) => values.reduce((sum, value) => sum + value, 0))\n)"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/run/collect.ts",
      "line": 39
    },
    "since": "1.0.0",
    "category": "Collecting values"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Fx#collectAll",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": "Fx",
    "consumerSpecifier": "@typed/fx/Fx",
    "exportName": "collectAll",
    "qualifiedName": "collectAll",
    "declarationKey": "declaration:bb21337a5bee089157ec11fd",
    "family": "variable",
    "signatures": [
      "export declare const collectAll: <A, E = never, R = never>(fx: Fx<A, E, R>) => Effect.Effect<ReadonlyArray<A>, E, R>;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/run/collect.ts",
        "start": {
          "line": 39,
          "column": 14
        },
        "end": {
          "line": 49,
          "column": 5
        }
      }
    ],
    "aliases": [
      "@typed/fx#Fx.collectAll"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:bb21337a5bee089157ec11fd",
    "name": "collectAll",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const collectAll: <A, E = never, R = never>(fx: Fx<A, E, R>) => Effect.Effect<ReadonlyArray<A>, E, R>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/run/collect.ts",
            "start": {
              "line": 39,
              "column": 14
            },
            "end": {
              "line": 49,
              "column": 5
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const collectAll: <A, E = never, R = never>(fx: Fx<A, E, R>) => Effect.Effect<ReadonlyArray<A>, E, R>;"
    ],
    "typeParameters": [],
    "summary": "Collects all values emitted by an `Fx` into an array.",
    "sections": {
      "Why": "Finite producers sometimes need to cross from push processing back to one Effect\nvalue. `collectAll` makes that buffering explicit rather than hiding it in `Fx`.",
      "Ownership and lifetime": "The array is allocated separately for each Effect run. Subscription starts when the\nEffect runs and ends on source completion, failure, or interruption. Every emitted\nvalue is retained until completion, so an infinite source never completes and can\ngrow memory without bound. Failures and services remain in `E` and `R`."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport { collectAll, fromIterable } from \"@typed/fx/Fx\"\n\nconst program = collectAll(fromIterable([1, 2, 3])).pipe(\n  Effect.map((values) => values.reduce((sum, value) => sum + value, 0))\n)"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/run/collect.ts",
        "start": {
          "line": 39,
          "column": 14
        },
        "end": {
          "line": 49,
          "column": 5
        }
      }
    ],
    "since": "1.0.0",
    "category": "Collecting values"
  }
}
