{
  "id": "@typed/fx/Fx#prepend",
  "canonicalId": "@typed/fx/Fx#prepend",
  "symbol": {
    "id": "@typed/fx/Fx#prepend",
    "packageName": "@typed/fx",
    "moduleName": "Fx",
    "exportName": "prepend",
    "kind": "constant",
    "signatures": [
      "export declare const prepend: {\n    <B>(value: B): <A, E, R>(fx: Fx<A, E, R>) => Fx<B | A, E, R>;\n    <A, E, R, B>(fx: Fx<A, E, R>, value: B): Fx<B | A, E, R>;\n};"
    ],
    "summary": "Prepends a value to the beginning of an Fx.",
    "sections": {
      "Why": "`prepend` emits an initial marker through the same Sink before the source is\nobserved, without allocating a separate collection or state holder.",
      "Ownership and lifetime": "The value is emitted exactly once before the source run starts, then every\nsource success or failure is delivered. Interruption or a defect in the Sink's\nprepended-value handler prevents the source from starting. The operation\nacquires no resource and retains source failure, services, and lifetime."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Fx } from \"@typed/fx\"\nimport { Effect } from \"effect\"\n\nconst framed = Fx.prepend(Fx.fromIterable([1, 2]), \"start\")\nEffect.runPromise(Fx.collectAll(framed)).then(console.log)\n// [\"start\", 1, 2]"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Fx/combinators/continueWith.ts",
      "line": 136
    },
    "since": "1.0.0",
    "category": "Combining sources"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Fx#prepend",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": "Fx",
    "consumerSpecifier": "@typed/fx/Fx",
    "exportName": "prepend",
    "qualifiedName": "prepend",
    "declarationKey": "declaration:23b4e351b0379127f35efc6a",
    "family": "variable",
    "signatures": [
      "export declare const prepend: {\n    <B>(value: B): <A, E, R>(fx: Fx<A, E, R>) => Fx<B | A, E, R>;\n    <A, E, R, B>(fx: Fx<A, E, R>, value: B): Fx<B | A, E, R>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/continueWith.ts",
        "start": {
          "line": 136,
          "column": 14
        },
        "end": {
          "line": 144,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/continueWith.ts",
        "start": {
          "line": 137,
          "column": 3
        },
        "end": {
          "line": 137,
          "column": 64
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/continueWith.ts",
        "start": {
          "line": 139,
          "column": 3
        },
        "end": {
          "line": 139,
          "column": 60
        }
      }
    ],
    "aliases": [
      "@typed/fx#Fx.prepend"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:23b4e351b0379127f35efc6a",
    "name": "prepend",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const prepend: {\n    <B>(value: B): <A, E, R>(fx: Fx<A, E, R>) => Fx<B | A, E, R>;\n    <A, E, R, B>(fx: Fx<A, E, R>, value: B): Fx<B | A, E, R>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/continueWith.ts",
            "start": {
              "line": 136,
              "column": 14
            },
            "end": {
              "line": 144,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<B>(value: B): <A, E, R>(fx: Fx<A, E, R>) => Fx<B | A, E, R>;",
          "<A, E, R, B>(fx: Fx<A, E, R>, value: B): Fx<B | A, E, R>;"
        ],
        "typeParameters": [
          "B",
          "A",
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Fx/combinators/continueWith.ts",
            "start": {
              "line": 137,
              "column": 3
            },
            "end": {
              "line": 137,
              "column": 64
            }
          },
          {
            "file": "packages/fx/src/Fx/combinators/continueWith.ts",
            "start": {
              "line": 139,
              "column": 3
            },
            "end": {
              "line": 139,
              "column": 60
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const prepend: {\n    <B>(value: B): <A, E, R>(fx: Fx<A, E, R>) => Fx<B | A, E, R>;\n    <A, E, R, B>(fx: Fx<A, E, R>, value: B): Fx<B | A, E, R>;\n};"
    ],
    "typeParameters": [
      "B",
      "A",
      "E",
      "R"
    ],
    "summary": "Prepends a value to the beginning of an Fx.",
    "sections": {
      "Why": "`prepend` emits an initial marker through the same Sink before the source is\nobserved, without allocating a separate collection or state holder.",
      "Ownership and lifetime": "The value is emitted exactly once before the source run starts, then every\nsource success or failure is delivered. Interruption or a defect in the Sink's\nprepended-value handler prevents the source from starting. The operation\nacquires no resource and retains source failure, services, and lifetime."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Fx } from \"@typed/fx\"\nimport { Effect } from \"effect\"\n\nconst framed = Fx.prepend(Fx.fromIterable([1, 2]), \"start\")\nEffect.runPromise(Fx.collectAll(framed)).then(console.log)\n// [\"start\", 1, 2]"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Fx/combinators/continueWith.ts",
        "start": {
          "line": 136,
          "column": 14
        },
        "end": {
          "line": 144,
          "column": 2
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/continueWith.ts",
        "start": {
          "line": 137,
          "column": 3
        },
        "end": {
          "line": 137,
          "column": 64
        }
      },
      {
        "file": "packages/fx/src/Fx/combinators/continueWith.ts",
        "start": {
          "line": 139,
          "column": 3
        },
        "end": {
          "line": 139,
          "column": 60
        }
      }
    ],
    "since": "1.0.0",
    "category": "Combining sources"
  }
}
