# ParamWithSchema

Constructs a named path parameter decoded by an Effect Schema Codec.

## Signatures

```ts
export declare const ParamWithSchema: <const P extends string, S extends Schema.Codec<any, string, any, any> = Schema.Codec<string>>(paramName: P, schema: S) => Route<`/:${P}`, Schema.Codec<{
    readonly [K in P]: S["Type"];
}, Path.Params<`/:${P}`>, S["DecodingServices"], S["EncodingServices"]>>;
```

## Why

Routes can expose domain values while retaining encoded string matching and schema services.

## Ownership and lifetime

`ParamWithSchema` constructs its Route immediately. The Route retains the supplied AST or route values and lazily memoizes derived paths and Codecs; Codec services are required only when decoding or encoding runs.
