MCPcopy Create free account
hub / github.com/Effect-TS/effect / schemaPathParams

Function schemaPathParams

packages/platform/src/internal/httpRouter.ts:137–143  ·  view source on GitHub ↗
(
  schema: Schema.Schema<A, I, R>,
  options?: ParseOptions | undefined
)

Source from the content-addressed store, hash-verified

135
136/** @internal */
137export const schemaPathParams = <A, I extends Readonly<Record<string, string | undefined>>, R>(
138 schema: Schema.Schema<A, I, R>,
139 options?: ParseOptions | undefined
140) => {
141 const parse = Schema.decodeUnknown(schema, options)
142 return Effect.flatMap(RouteContext, (_) => parse(_.params))
143}
144
145/** @internal */
146export const currentRouterConfig = globalValue(

Callers

nothing calls this directly

Calls 1

parseFunction · 0.70

Tested by

no test coverage detected