{
  "id": "@typed/fx/Fx#collectUpToFork",
  "canonicalId": "@typed/fx/Fx#collectUpToFork",
  "symbol": {
    "id": "@typed/fx/Fx#collectUpToFork",
    "packageName": "@typed/fx",
    "moduleName": "Fx",
    "exportName": "collectUpToFork",
    "kind": "constant",
    "signatures": [
      "export declare const collectUpToFork: <A, E = never, R = never>(fx: Fx<A, E, R>, upTo: number) => Effect.Effect<Fiber.Fiber<ReadonlyArray<A>, E>, never, R>;"
    ],
    "summary": "Forks the collection of up to `n` values from an `Fx`.",
    "sections": {
      "Why": "A bounded collection can run concurrently while the caller keeps control through\nthe returned fiber.",
      "Ownership and lifetime": "Running the Effect starts a supervised child immediately. It retains at most\n`upTo` values, stops upstream at the bound, and is interrupted when its parent\nterminates. Source failures are reported by the child fiber."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Fiber } from \"effect\"\nimport { collectUpToFork, periodic } from \"@typed/fx/Fx\"\n\nconst program = Effect.gen(function* () {\n  const fiber = yield* collectUpToFork(periodic(\"10 millis\"), 2)\n  return yield* Fiber.join(fiber)\n})"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/run/collect.ts",
      "line": 161
    },
    "since": "1.0.0",
    "category": "Collecting values"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Fx#collectUpToFork",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": "Fx",
    "consumerSpecifier": "@typed/fx/Fx",
    "exportName": "collectUpToFork",
    "qualifiedName": "collectUpToFork",
    "declarationKey": "declaration:61334ed34c704988ba9db3ab",
    "family": "variable",
    "signatures": [
      "export declare const collectUpToFork: <A, E = never, R = never>(fx: Fx<A, E, R>, upTo: number) => Effect.Effect<Fiber.Fiber<ReadonlyArray<A>, E>, never, R>;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/run/collect.ts",
        "start": {
          "line": 161,
          "column": 14
        },
        "end": {
          "line": 168,
          "column": 5
        }
      }
    ],
    "aliases": [
      "@typed/fx#Fx.collectUpToFork"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:61334ed34c704988ba9db3ab",
    "name": "collectUpToFork",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const collectUpToFork: <A, E = never, R = never>(fx: Fx<A, E, R>, upTo: number) => Effect.Effect<Fiber.Fiber<ReadonlyArray<A>, E>, never, R>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/run/collect.ts",
            "start": {
              "line": 161,
              "column": 14
            },
            "end": {
              "line": 168,
              "column": 5
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const collectUpToFork: <A, E = never, R = never>(fx: Fx<A, E, R>, upTo: number) => Effect.Effect<Fiber.Fiber<ReadonlyArray<A>, E>, never, R>;"
    ],
    "typeParameters": [],
    "summary": "Forks the collection of up to `n` values from an `Fx`.",
    "sections": {
      "Why": "A bounded collection can run concurrently while the caller keeps control through\nthe returned fiber.",
      "Ownership and lifetime": "Running the Effect starts a supervised child immediately. It retains at most\n`upTo` values, stops upstream at the bound, and is interrupted when its parent\nterminates. Source failures are reported by the child fiber."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Fiber } from \"effect\"\nimport { collectUpToFork, periodic } from \"@typed/fx/Fx\"\n\nconst program = Effect.gen(function* () {\n  const fiber = yield* collectUpToFork(periodic(\"10 millis\"), 2)\n  return yield* Fiber.join(fiber)\n})"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/run/collect.ts",
        "start": {
          "line": 161,
          "column": 14
        },
        "end": {
          "line": 168,
          "column": 5
        }
      }
    ],
    "since": "1.0.0",
    "category": "Collecting values"
  }
}
