{
  "id": "@typed/fx/Sink#Service",
  "canonicalId": "@typed/fx/Sink#Service",
  "symbol": {
    "id": "@typed/fx/Sink#Service",
    "packageName": "@typed/fx",
    "moduleName": "Sink",
    "exportName": "Service",
    "kind": "function",
    "signatures": [
      "export declare function Service<Self, A, E = never>(): <const Id extends string>(id: Id) => Sink.Class<Self, Id, A, E>;"
    ],
    "summary": "Defines a class-shaped Effect Context service for a Sink.",
    "sections": {
      "Why": "A service sink lets producers emit toward an application capability while Layers choose the\nconcrete destination, such as logging, persistence, or UI output.",
      "Ownership and lifetime": "Definition is pure. `Class.make` captures its construction context into the sink callbacks and\nreturns a Layer; providing that Layer controls availability and cleanup of captured scoped\nservices. Each static callback lookup uses the current Effect context."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as Sink from \"@typed/fx/Sink\"\n\nclass Output extends Sink.Service<Output, string>()(\"Output\") {}\nconst OutputLive = Output.make(Effect.logError, Effect.log)\nconst program = Output.onSuccess(\"ready\").pipe(Effect.provide(OutputLive))"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Sink/Sink.ts",
      "line": 498
    },
    "since": "1.0.0",
    "category": "Sink services"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Sink#Service",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.7",
    "moduleName": "Sink",
    "consumerSpecifier": "@typed/fx/Sink",
    "exportName": "Service",
    "qualifiedName": "Service",
    "declarationKey": "declaration:0ed5cdf3783096c9a37a3a0e",
    "family": "function",
    "signatures": [
      "export declare function Service<Self, A, E = never>(): <const Id extends string>(id: Id) => Sink.Class<Self, Id, A, E>;"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Sink/Sink.ts",
        "start": {
          "line": 498,
          "column": 1
        },
        "end": {
          "line": 537,
          "column": 2
        }
      }
    ],
    "aliases": [
      "@typed/fx#Sink.Service"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:0ed5cdf3783096c9a37a3a0e",
    "name": "Service",
    "family": "function",
    "facets": [
      {
        "family": "function",
        "syntaxKind": "FunctionDeclaration",
        "signatures": [
          "export declare function Service<Self, A, E = never>(): <const Id extends string>(id: Id) => Sink.Class<Self, Id, A, E>;"
        ],
        "typeParameters": [
          "Self",
          "A",
          "E = never"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Sink/Sink.ts",
            "start": {
              "line": 498,
              "column": 1
            },
            "end": {
              "line": 537,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare function Service<Self, A, E = never>(): <const Id extends string>(id: Id) => Sink.Class<Self, Id, A, E>;"
    ],
    "typeParameters": [
      "Self",
      "A",
      "E = never"
    ],
    "summary": "Defines a class-shaped Effect Context service for a Sink.",
    "sections": {
      "Why": "A service sink lets producers emit toward an application capability while Layers choose the\nconcrete destination, such as logging, persistence, or UI output.",
      "Ownership and lifetime": "Definition is pure. `Class.make` captures its construction context into the sink callbacks and\nreturns a Layer; providing that Layer controls availability and cleanup of captured scoped\nservices. Each static callback lookup uses the current Effect context."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as Sink from \"@typed/fx/Sink\"\n\nclass Output extends Sink.Service<Output, string>()(\"Output\") {}\nconst OutputLive = Output.make(Effect.logError, Effect.log)\nconst program = Output.onSuccess(\"ready\").pipe(Effect.provide(OutputLive))"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Sink/Sink.ts",
        "start": {
          "line": 498,
          "column": 1
        },
        "end": {
          "line": 537,
          "column": 2
        }
      }
    ],
    "since": "1.0.0",
    "category": "Sink services"
  }
}
