# Sink.Service

Defines a class-shaped Effect Context service for a Sink.

## Signatures

```ts
export declare function Service<Self, A, E = never>(): <const Id extends string>(id: Id) => Sink.Class<Self, Id, A, E>;
```

## Why

A service sink lets producers emit toward an application capability while Layers choose the
concrete 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
returns a Layer; providing that Layer controls availability and cleanup of captured scoped
services. Each static callback lookup uses the current Effect context.

## Examples

```ts
import { Effect } from "effect"
import * as Sink from "@typed/fx/Sink"

class Output extends Sink.Service<Output, string>()("Output") {}
const OutputLive = Output.make(Effect.logError, Effect.log)
const program = Output.onSuccess("ready").pipe(Effect.provide(OutputLive))
```
