{
  "id": "@typed/fx#Push.Service",
  "canonicalId": "@typed/fx/Push#Service",
  "symbol": {
    "id": "@typed/fx#Push.Service",
    "packageName": "@typed/fx",
    "moduleName": ".",
    "exportName": "Push.Service",
    "kind": "function",
    "signatures": [
      "export declare function Service<Self, A, E = never, B = never, E2 = never>(): <const Id extends string>(id: Id) => Push.Class<Self, Id, A, E, B, E2>;"
    ],
    "summary": "Defines a named Effect service whose value is a `Push`.\n\nThe returned class exposes `onSuccess`, `onFailure`, and `run` as Effects that\nfirst resolve the service from Context. `make` captures the Sink construction\ncontext and combines it with each output subscriber's context; it does not start\nthe Fx or send an input while building the Layer.",
    "sections": {
      "Why": "A service gives a bidirectional application capability one stable identity, so\nproducers and observers can depend on it through ordinary Effect requirements.",
      "Ownership and lifetime": "The returned Layer owns service installation and captures non-Scope services\nneeded by both sides. Output runs retain the caller's Scope and interruption;\ninput acknowledgment Effects run in their caller. Layer release drops the\nservice but does not invent cleanup beyond the supplied Sink and Fx."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Layer } from \"effect\"\nimport * as Fx from \"@typed/fx/Fx\"\nimport * as Push from \"@typed/fx/Push\"\nimport * as Sink from \"@typed/fx/Sink\"\n\nclass Messages extends Push.Service<Messages, string, never, string>()(\"Messages\") {}\nconst MessagesLive = Messages.make(\n  Sink.make(() => Effect.void, (message) => Effect.log(message)),\n  Fx.succeed(\"ready\")\n)\nconst send = Messages.onSuccess(\"hello\").pipe(Effect.provide(MessagesLive))"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Push/Push.ts",
      "line": 2146
    },
    "since": "1.0.0",
    "category": "Push services"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx#Push.Service",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/fx",
    "exportName": "Push",
    "qualifiedName": "Push.Service",
    "declarationKey": "declaration:f71567641a249d9baa99d9a2",
    "family": "function",
    "signatures": [
      "export declare function Service<Self, A, E = never, B = never, E2 = never>(): <const Id extends string>(id: Id) => Push.Class<Self, Id, A, E, B, E2>;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 2146,
          "column": 1
        },
        "end": {
          "line": 2202,
          "column": 2
        }
      }
    ],
    "aliases": [
      "@typed/fx/Push#Service"
    ],
    "isAlias": true,
    "parentId": "@typed/fx#Push",
    "static": false,
    "importedFrom": "declaration:f71567641a249d9baa99d9a2"
  },
  "declaration": {
    "declarationKey": "declaration:f71567641a249d9baa99d9a2",
    "name": "Service",
    "family": "function",
    "facets": [
      {
        "family": "function",
        "syntaxKind": "FunctionDeclaration",
        "signatures": [
          "export declare function Service<Self, A, E = never, B = never, E2 = never>(): <const Id extends string>(id: Id) => Push.Class<Self, Id, A, E, B, E2>;"
        ],
        "typeParameters": [
          "Self",
          "A",
          "E = never",
          "B = never",
          "E2 = never"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Push/Push.ts",
            "start": {
              "line": 2146,
              "column": 1
            },
            "end": {
              "line": 2202,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare function Service<Self, A, E = never, B = never, E2 = never>(): <const Id extends string>(id: Id) => Push.Class<Self, Id, A, E, B, E2>;"
    ],
    "typeParameters": [
      "Self",
      "A",
      "E = never",
      "B = never",
      "E2 = never"
    ],
    "summary": "Defines a named Effect service whose value is a `Push`.\n\nThe returned class exposes `onSuccess`, `onFailure`, and `run` as Effects that\nfirst resolve the service from Context. `make` captures the Sink construction\ncontext and combines it with each output subscriber's context; it does not start\nthe Fx or send an input while building the Layer.",
    "sections": {
      "Why": "A service gives a bidirectional application capability one stable identity, so\nproducers and observers can depend on it through ordinary Effect requirements.",
      "Ownership and lifetime": "The returned Layer owns service installation and captures non-Scope services\nneeded by both sides. Output runs retain the caller's Scope and interruption;\ninput acknowledgment Effects run in their caller. Layer release drops the\nservice but does not invent cleanup beyond the supplied Sink and Fx."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Layer } from \"effect\"\nimport * as Fx from \"@typed/fx/Fx\"\nimport * as Push from \"@typed/fx/Push\"\nimport * as Sink from \"@typed/fx/Sink\"\n\nclass Messages extends Push.Service<Messages, string, never, string>()(\"Messages\") {}\nconst MessagesLive = Messages.make(\n  Sink.make(() => Effect.void, (message) => Effect.log(message)),\n  Fx.succeed(\"ready\")\n)\nconst send = Messages.onSuccess(\"hello\").pipe(Effect.provide(MessagesLive))"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Push/Push.ts",
        "start": {
          "line": 2146,
          "column": 1
        },
        "end": {
          "line": 2202,
          "column": 2
        }
      }
    ],
    "since": "1.0.0",
    "category": "Push services"
  }
}
