{
  "id": "@typed/fx#Push.Push",
  "canonicalId": "@typed/fx/Push#Push",
  "symbol": {
    "id": "@typed/fx#Push.Push",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Push.Push",
    "kind": "interface",
    "signatures": [
      "export interface Push<in A, in E, out R, out B, out E2, out R2> extends Sink.Sink<A, E, R>, Fx.Fx<B, E2, R2> {\n}",
      "export declare namespace Push {\n    type Any = Push<any, any, any, any, any, any>;\n    interface Service<Self, Id extends string, A, E, B, E2> extends Push<A, E, Self, B, E2, Self> {\n        readonly id: Id;\n        readonly service: Context.Service<Self, Push<A, E, never, B, E2, never>>;\n        readonly make: <R = never, R2 = never>(sink: Sink.Sink<A, E, R>, fx: Fx.Fx<B, E2, R2>) => Layer.Layer<Self, never, Exclude<R | R2, Scope.Scope>>;\n    }\n    interface Class<Self, Id extends string, A, E, B, E2> extends Service<Self, Id, A, E, B, E2> {\n        new (): Service<Self, Id, A, E, B, E2>;\n    }\n}"
    ],
    "summary": "A bidirectional value that is both a `Sink<A, E, R>` and an `Fx<B, E2, R2>`.\n\nCalling `onSuccess` or `onFailure` sends exactly one input notification to the\nwrapped Sink. The returned `Effect` is the acknowledgment: a producer that runs\nand awaits it waits for the consumer callback to finish. `Push` adds no queue,\nbuffering, replay, or demand protocol of its own.\n\nRunning the Fx side preserves that Fx's cardinality and ordering. Input values\nare not automatically forwarded to the output; any relationship between the\ntwo sides belongs to the supplied Sink and Fx (for example, a shared `Subject`).",
    "sections": {
      "Why": "Interactive systems often need one value for sending work and another for\nobserving results. Keeping both directions in one Effect-native value makes the\nboundary composable without pretending that commands and events are the same\nstream.",
      "Ownership and lifetime": "Constructing a `Push` starts no work and allocates no fiber or Scope. Each input\ncallback runs in the caller's fiber with the Sink's `R` requirements. Running\nthe output side follows the wrapped Fx's Scope, interruption, finalizers, `E2`\nfailures, and `R2` services; `Push` does not change them."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as Push from \"@typed/fx/Push\"\nimport { Fx } from \"@typed/fx\"\nimport * as Sink from \"@typed/fx/Sink\"\n\nconst program = Effect.gen(function* () {\n  // Create a Push that accepts numbers and emits strings\n  const push = Push.make(\n    Sink.make(\n      (cause) => Effect.sync(() => console.log(\"Error:\", cause)),\n      (value) => Effect.sync(() => console.log(\"Received:\", value))\n    ),\n    Fx.succeed(\"Hello\")\n  )\n\n  // Push a value to the sink\n  yield* push.onSuccess(42)\n  // Output: \"Received: 42\"\n\n  // Observe the Fx output\n  yield* Fx.observe(push, (value) =>\n    Effect.sync(() => console.log(\"Emitted:\", value))\n  )\n  // Output: \"Emitted: Hello\"\n})"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Push/Push.ts",
      "line": 89
    },
    "since": "1.0.0",
    "category": "Bidirectional contracts"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Push.Push",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Push",
    "qualifiedName": "Push.Push",
    "declarationKey": "declaration:bdc22915360b28f60e4b89ad",
    "family": "interface",
    "signatures": [
      "export interface Push<in A, in E, out R, out B, out E2, out R2> extends Sink.Sink<A, E, R>, Fx.Fx<B, E2, R2> {\n}",
      "export declare namespace Push {\n    type Any = Push<any, any, any, any, any, any>;\n    interface Service<Self, Id extends string, A, E, B, E2> extends Push<A, E, Self, B, E2, Self> {\n        readonly id: Id;\n        readonly service: Context.Service<Self, Push<A, E, never, B, E2, never>>;\n        readonly make: <R = never, R2 = never>(sink: Sink.Sink<A, E, R>, fx: Fx.Fx<B, E2, R2>) => Layer.Layer<Self, never, Exclude<R | R2, Scope.Scope>>;\n    }\n    interface Class<Self, Id extends string, A, E, B, E2> extends Service<Self, Id, A, E, B, E2> {\n        new (): Service<Self, Id, A, E, B, E2>;\n    }\n}"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 89,
          "column": 1
        },
        "end": {
          "line": 90,
          "column": 50
        }
      },
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 92,
          "column": 1
        },
        "end": {
          "line": 295,
          "column": 2
        }
      }
    ],
    "aliases": [
      "@typed/fx/Push#Push"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Push",
    "static": false,
    "importedFrom": "declaration:bdc22915360b28f60e4b89ad"
  },
  "declaration": {
    "declarationKey": "declaration:bdc22915360b28f60e4b89ad",
    "name": "Push",
    "family": "interface",
    "facets": [
      {
        "family": "interface",
        "syntaxKind": "InterfaceDeclaration",
        "signatures": [
          "export interface Push<in A, in E, out R, out B, out E2, out R2> extends Sink.Sink<A, E, R>, Fx.Fx<B, E2, R2> {\n}"
        ],
        "typeParameters": [
          "in A",
          "in E",
          "out R",
          "out B",
          "out E2",
          "out R2"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Push/Push.ts",
            "start": {
              "line": 89,
              "column": 1
            },
            "end": {
              "line": 90,
              "column": 50
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "namespace",
        "syntaxKind": "ModuleDeclaration",
        "signatures": [
          "export declare namespace Push {\n    type Any = Push<any, any, any, any, any, any>;\n    interface Service<Self, Id extends string, A, E, B, E2> extends Push<A, E, Self, B, E2, Self> {\n        readonly id: Id;\n        readonly service: Context.Service<Self, Push<A, E, never, B, E2, never>>;\n        readonly make: <R = never, R2 = never>(sink: Sink.Sink<A, E, R>, fx: Fx.Fx<B, E2, R2>) => Layer.Layer<Self, never, Exclude<R | R2, Scope.Scope>>;\n    }\n    interface Class<Self, Id extends string, A, E, B, E2> extends Service<Self, Id, A, E, B, E2> {\n        new (): Service<Self, Id, A, E, B, E2>;\n    }\n}"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Push/Push.ts",
            "start": {
              "line": 92,
              "column": 1
            },
            "end": {
              "line": 295,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export interface Push<in A, in E, out R, out B, out E2, out R2> extends Sink.Sink<A, E, R>, Fx.Fx<B, E2, R2> {\n}",
      "export declare namespace Push {\n    type Any = Push<any, any, any, any, any, any>;\n    interface Service<Self, Id extends string, A, E, B, E2> extends Push<A, E, Self, B, E2, Self> {\n        readonly id: Id;\n        readonly service: Context.Service<Self, Push<A, E, never, B, E2, never>>;\n        readonly make: <R = never, R2 = never>(sink: Sink.Sink<A, E, R>, fx: Fx.Fx<B, E2, R2>) => Layer.Layer<Self, never, Exclude<R | R2, Scope.Scope>>;\n    }\n    interface Class<Self, Id extends string, A, E, B, E2> extends Service<Self, Id, A, E, B, E2> {\n        new (): Service<Self, Id, A, E, B, E2>;\n    }\n}"
    ],
    "typeParameters": [
      "in A",
      "in E",
      "out R",
      "out B",
      "out E2",
      "out R2"
    ],
    "summary": "A bidirectional value that is both a `Sink<A, E, R>` and an `Fx<B, E2, R2>`.\n\nCalling `onSuccess` or `onFailure` sends exactly one input notification to the\nwrapped Sink. The returned `Effect` is the acknowledgment: a producer that runs\nand awaits it waits for the consumer callback to finish. `Push` adds no queue,\nbuffering, replay, or demand protocol of its own.\n\nRunning the Fx side preserves that Fx's cardinality and ordering. Input values\nare not automatically forwarded to the output; any relationship between the\ntwo sides belongs to the supplied Sink and Fx (for example, a shared `Subject`).",
    "sections": {
      "Why": "Interactive systems often need one value for sending work and another for\nobserving results. Keeping both directions in one Effect-native value makes the\nboundary composable without pretending that commands and events are the same\nstream.",
      "Ownership and lifetime": "Constructing a `Push` starts no work and allocates no fiber or Scope. Each input\ncallback runs in the caller's fiber with the Sink's `R` requirements. Running\nthe output side follows the wrapped Fx's Scope, interruption, finalizers, `E2`\nfailures, and `R2` services; `Push` does not change them."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as Push from \"@typed/fx/Push\"\nimport { Fx } from \"@typed/fx\"\nimport * as Sink from \"@typed/fx/Sink\"\n\nconst program = Effect.gen(function* () {\n  // Create a Push that accepts numbers and emits strings\n  const push = Push.make(\n    Sink.make(\n      (cause) => Effect.sync(() => console.log(\"Error:\", cause)),\n      (value) => Effect.sync(() => console.log(\"Received:\", value))\n    ),\n    Fx.succeed(\"Hello\")\n  )\n\n  // Push a value to the sink\n  yield* push.onSuccess(42)\n  // Output: \"Received: 42\"\n\n  // Observe the Fx output\n  yield* Fx.observe(push, (value) =>\n    Effect.sync(() => console.log(\"Emitted:\", value))\n  )\n  // Output: \"Emitted: Hello\"\n})"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 89,
          "column": 1
        },
        "end": {
          "line": 90,
          "column": 50
        }
      },
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 92,
          "column": 1
        },
        "end": {
          "line": 295,
          "column": 2
        }
      }
    ],
    "since": "1.0.0",
    "category": "Bidirectional contracts"
  }
}
