# provideService

Provides one existing service value to the entire Fx run.

## Signatures

```ts
export declare const provideService: {
    <Id, S>(tag: Context.Service<Id, S>, service: S): <A, E, R>(fx: Fx<A, E, R>) => Fx<A, E, Exclude<R, Id>>;
    <A, E, R, Id, S>(fx: Fx<A, E, R>, tag: Context.Service<Id, S>, service: S): Fx<A, E, Exclude<R, Id>>;
};
```

## Why

This is the precise single-service form of {@link provideContext}, useful for
tests and application edges where the instance is already owned.

## Ownership and lifetime

The service value is captured and reused for every subscription. It is not
acquired or finalized here; its caller owns its lifetime. The matching
service identifier is removed from `R`, while values, errors, ordering, and
interruption remain those of the source.

## Examples

```ts
import { Context, Effect } from "effect"
import { provideService } from "@typed/fx/Fx"
import { fromEffect } from "@typed/fx/Fx"

class Config extends Context.Service<Config, { readonly url: string }>()("Config") {}
const runnable = provideService(
  fromEffect(Effect.map(Config, (x) => x.url)),
  Config,
  { url: "/api" }
)
```
