{
  "id": "@typed/fx/Sink#Sink.Service",
  "canonicalId": "@typed/fx/Sink#Sink.Service",
  "symbol": {
    "id": "@typed/fx/Sink#Sink.Service",
    "packageName": "@typed/fx",
    "moduleName": "Sink",
    "exportName": "Sink.Service",
    "kind": "interface",
    "signatures": [
      "interface Service<Self, Id extends string, A, E> extends Sink<A, E, Self> {\n    readonly id: Id;\n    readonly service: Context.Service<Self, Sink<A, E>>;\n    readonly make: <R = never>(onFailure: (cause: Cause.Cause<E>) => Effect<unknown, never, R>, onSuccess: (value: A) => Effect<unknown, never, R>) => Layer<Self, never, Exclude<R, Scope>>;\n}"
    ],
    "summary": "Describes a Sink available through an Effect Context service.",
    "sections": {
      "Why": "Producers can depend on a named consumer without receiving a concrete sink through every call.",
      "Ownership and lifetime": "The installed Layer owns the concrete callback closures. Calls resolve `Self` from the current\nEffect context; Layer scope owns any services captured while constructing them.",
      "Property: id": "Stable Context service identifier.",
      "Property: id: Why": "The literal ID names diagnostics and distinguishes the service tag.",
      "Property: id: Ownership and lifetime": "This immutable string acquires no resources and lives with the service class.",
      "Property: make": "Builds a Layer whose sink callbacks capture their construction services.",
      "Property: make: Why": "Callback dependencies are resolved once when the Layer is built rather than on every value.",
      "Property: make: Ownership and lifetime": "Layer scope owns captured services. Callback requirements exclude `Scope` because that scope is\nconsumed during Layer construction.",
      "Property: service": "Effect Context reference used to install or retrieve the concrete sink.",
      "Property: service: Why": "The tag connects the class-shaped API to Effect's Context and Layer ecosystem.",
      "Property: service: Ownership and lifetime": "The tag is static and resource-free; the currently provided Layer owns the concrete value."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as Sink from \"@typed/fx/Sink\"\n\nclass Events extends Sink.Service<Events, string>()(\"Events\") {}\nconst EventsLive = Events.make(Effect.logError, Effect.log)"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/fx/src/Sink/Sink.ts",
      "line": 153
    },
    "since": "1.0.0",
    "category": "Sink services"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/fx/Sink#Sink.Service",
    "packageName": "@typed/fx",
    "packageVersion": "2.0.0-beta.13",
    "moduleName": "Sink",
    "consumerSpecifier": "@typed/fx/Sink",
    "exportName": "Sink",
    "qualifiedName": "Sink.Service",
    "declarationKey": "declaration:25635a6a8d8210f10c984a62",
    "family": "interface",
    "signatures": [
      "interface Service<Self, Id extends string, A, E> extends Sink<A, E, Self> {\n    readonly id: Id;\n    readonly service: Context.Service<Self, Sink<A, E>>;\n    readonly make: <R = never>(onFailure: (cause: Cause.Cause<E>) => Effect<unknown, never, R>, onSuccess: (value: A) => Effect<unknown, never, R>) => Layer<Self, never, Exclude<R, Scope>>;\n}"
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Sink/Sink.ts",
        "start": {
          "line": 153,
          "column": 3
        },
        "end": {
          "line": 200,
          "column": 4
        }
      },
      {
        "file": "packages/fx/src/Sink/Sink.ts",
        "start": {
          "line": 167,
          "column": 5
        },
        "end": {
          "line": 167,
          "column": 21
        }
      },
      {
        "file": "packages/fx/src/Sink/Sink.ts",
        "start": {
          "line": 196,
          "column": 5
        },
        "end": {
          "line": 199,
          "column": 48
        }
      },
      {
        "file": "packages/fx/src/Sink/Sink.ts",
        "start": {
          "line": 181,
          "column": 5
        },
        "end": {
          "line": 181,
          "column": 57
        }
      }
    ],
    "aliases": [
      "@typed/fx#Sink.Sink.Service"
    ],
    "isAlias": false,
    "parentId": "@typed/fx/Sink#Sink",
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:25635a6a8d8210f10c984a62",
    "name": "Service",
    "family": "interface",
    "facets": [
      {
        "family": "interface",
        "syntaxKind": "InterfaceDeclaration",
        "signatures": [
          "interface Service<Self, Id extends string, A, E> extends Sink<A, E, Self> {\n    readonly id: Id;\n    readonly service: Context.Service<Self, Sink<A, E>>;\n    readonly make: <R = never>(onFailure: (cause: Cause.Cause<E>) => Effect<unknown, never, R>, onSuccess: (value: A) => Effect<unknown, never, R>) => Layer<Self, never, Exclude<R, Scope>>;\n}"
        ],
        "typeParameters": [
          "Self",
          "Id extends string",
          "A",
          "E"
        ],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Sink/Sink.ts",
            "start": {
              "line": 153,
              "column": 3
            },
            "end": {
              "line": 200,
              "column": 4
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertySignature",
        "signatures": [
          "readonly id: Id;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Sink/Sink.ts",
            "start": {
              "line": 167,
              "column": 5
            },
            "end": {
              "line": 167,
              "column": 21
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertySignature",
        "signatures": [
          "readonly make: <R = never>(onFailure: (cause: Cause.Cause<E>) => Effect<unknown, never, R>, onSuccess: (value: A) => Effect<unknown, never, R>) => Layer<Self, never, Exclude<R, Scope>>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Sink/Sink.ts",
            "start": {
              "line": 196,
              "column": 5
            },
            "end": {
              "line": 199,
              "column": 48
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": false
      },
      {
        "family": "property",
        "syntaxKind": "PropertySignature",
        "signatures": [
          "readonly service: Context.Service<Self, Sink<A, E>>;"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/fx/src/Sink/Sink.ts",
            "start": {
              "line": 181,
              "column": 5
            },
            "end": {
              "line": 181,
              "column": 57
            }
          }
        ],
        "static": false,
        "readonly": true,
        "optional": false
      }
    ],
    "signatures": [
      "interface Service<Self, Id extends string, A, E> extends Sink<A, E, Self> {\n    readonly id: Id;\n    readonly service: Context.Service<Self, Sink<A, E>>;\n    readonly make: <R = never>(onFailure: (cause: Cause.Cause<E>) => Effect<unknown, never, R>, onSuccess: (value: A) => Effect<unknown, never, R>) => Layer<Self, never, Exclude<R, Scope>>;\n}"
    ],
    "typeParameters": [
      "Self",
      "Id extends string",
      "A",
      "E"
    ],
    "summary": "Describes a Sink available through an Effect Context service.",
    "sections": {
      "Why": "Producers can depend on a named consumer without receiving a concrete sink through every call.",
      "Ownership and lifetime": "The installed Layer owns the concrete callback closures. Calls resolve `Self` from the current\nEffect context; Layer scope owns any services captured while constructing them.",
      "Property: id": "Stable Context service identifier.",
      "Property: id: Why": "The literal ID names diagnostics and distinguishes the service tag.",
      "Property: id: Ownership and lifetime": "This immutable string acquires no resources and lives with the service class.",
      "Property: make": "Builds a Layer whose sink callbacks capture their construction services.",
      "Property: make: Why": "Callback dependencies are resolved once when the Layer is built rather than on every value.",
      "Property: make: Ownership and lifetime": "Layer scope owns captured services. Callback requirements exclude `Scope` because that scope is\nconsumed during Layer construction.",
      "Property: service": "Effect Context reference used to install or retrieve the concrete sink.",
      "Property: service: Why": "The tag connects the class-shaped API to Effect's Context and Layer ecosystem.",
      "Property: service: Ownership and lifetime": "The tag is static and resource-free; the currently provided Layer owns the concrete value."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect } from \"effect\"\nimport * as Sink from \"@typed/fx/Sink\"\n\nclass Events extends Sink.Service<Events, string>()(\"Events\") {}\nconst EventsLive = Events.make(Effect.logError, Effect.log)"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/fx/src/Sink/Sink.ts",
        "start": {
          "line": 153,
          "column": 3
        },
        "end": {
          "line": 200,
          "column": 4
        }
      },
      {
        "file": "packages/fx/src/Sink/Sink.ts",
        "start": {
          "line": 167,
          "column": 5
        },
        "end": {
          "line": 167,
          "column": 21
        }
      },
      {
        "file": "packages/fx/src/Sink/Sink.ts",
        "start": {
          "line": 196,
          "column": 5
        },
        "end": {
          "line": 199,
          "column": 48
        }
      },
      {
        "file": "packages/fx/src/Sink/Sink.ts",
        "start": {
          "line": 181,
          "column": 5
        },
        "end": {
          "line": 181,
          "column": 57
        }
      }
    ],
    "since": "1.0.0",
    "category": "Sink services"
  }
}
