Import
import { getSchemas } from "@typed/router/Path";Signatures
export declare function getSchemas<const Parts extends ReadonlyArray<PathAst>>(parts: Parts): {
readonly pathSchema: Schema.Top;
readonly querySchema: Schema.Struct<{
[k: string]: Schema.Top;
}>;
readonly paramsSchema: Schema.StructWithRest<Schema.Struct<{
readonly [x: string]: Schema.Top;
}>, Schema.$Record<Schema.Record.Key, Schema.Top>[]>;
};Why
Consumers can decode the exact projection they need without reparsing the route.
Ownership and lifetime
getSchemas constructs and returns immutable Effect Schema values immediately. Any services are required later by the Effect that executes those Schemas.