# AsGuard

An object that supplies a Guard through an own callable `asGuard` property.
Use an instance field rather than a prototype method.

## Signatures

```ts
export interface AsGuard<in I, out O, out E = never, out R = never> {
    readonly asGuard: () => Guard<I, O, E, R>;
}
```

## Why

An explicit adapter protocol lets domain objects participate in Guard composition without inheritance or wrapper allocation.

## Ownership and lifetime

The adapter acquires no resources; the returned Guard owns no lifetime beyond each returned Effect.

## Property: asGuard

Returns the Guard represented by this adapter.

## Property: asGuard: Why

Requiring an own callable property avoids ambiguous prototype behavior when adapters cross object boundaries.

## Property: asGuard: Ownership and lifetime

Calling this property acquires no resources; the returned Guard follows its own Effect lifetime.

## Examples

```ts
import type { AsGuard, Guard } from "@typed/guard"
import { Effect } from "effect"
const adapter: AsGuard<string, string> = { asGuard: () => ((input) => Effect.succeedSome(input)) as Guard<string, string> }
```
