# addTag

Adds a readonly `_tag` to every matched object output. The output must not
already have an `_tag` property.

## Signatures

```ts
export declare const addTag: {
    <B>(value: B): <G extends GuardInput<any, any, any, any>>(guard: G & RecordOutputConstraint<NoInfer<Guard.Output<G>>> & ("_tag" extends NoInfer<Guard.Output<G> extends infer O ? (O extends unknown ? keyof O : never) : never> ? never : unknown)) => Guard<Guard.Input<G>, Guard.Output<G> & {
        readonly _tag: B;
    }, Guard.Error<G>, Guard.Services<G>>;
    <G extends GuardInput<any, any, any, any>, B>(guard: G & RecordOutputConstraint<NoInfer<Guard.Output<G>>> & ("_tag" extends NoInfer<Guard.Output<G> extends infer O ? (O extends unknown ? keyof O : never) : never> ? never : unknown), value: B): Guard<Guard.Input<G>, Guard.Output<G> & {
        readonly _tag: B;
    }, Guard.Error<G>, Guard.Services<G>>;
};
```

## Why

A typed discriminant turns matched record outputs into exhaustively narrowable tagged values while rejecting key collisions.

## Ownership and lifetime

This pure combinator acquires no resources and creates a fresh plain object for every match.

## Examples

```ts
import { addTag, bindTo, liftPredicate } from "@typed/guard"
const tagged = addTag(bindTo(liftPredicate(Boolean), "value"), "Input")
```
