function / @typed/router/Path

schemaForQueryValue

Builds the decoder for one declared query value AST.

Package version
1.0.0-beta.13
Category
Parameter schemas
Since
1.0.0

Import

import { schemaForQueryValue } from "@typed/router/Path";

Signatures

export declare function schemaForQueryValue(ast: PathAst.Literal | PathAst.Parameter | PathAst.Wildcard): Schema.Top;

Why

Literal constraints, optional parameters, and repeated values get explicit decode behavior.

Ownership and lifetime

schemaForQueryValue constructs and returns immutable Effect Schema values immediately. Any services are required later by the Effect that executes those Schemas.

Source