# fromSchemaDecode

Creates a Guard that decodes a schema's Encoded input to its Type.

## Signatures

```ts
export declare function fromSchemaDecode<S extends Schema.Top>(schema: S): Guard<S["Encoded"], S["Type"], Schema.SchemaError, S["DecodingServices"]>;
```

## Why

Schema decoding reports all issues, ignores excess properties, retains `SchemaError` in the typed channel, and carries decoding services in `R`.

## Ownership and lifetime

Construction acquires no resources; schema services and any scoped work follow each returned Effect invocation.

## Examples

```ts
import { fromSchemaDecode } from "@typed/guard"
import { Schema } from "effect"
const number = fromSchemaDecode(Schema.NumberFromString)
```
See [Effect Schema transformations](https://effect.website/docs/schema/transformations/).
