MCPcopy Index your code
hub / github.com/Effect-TS/effect / schemaCookies

Function schemaCookies

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

Source from the content-addressed store, hash-verified

64
65/** @internal */
66export const schemaCookies = <A, I extends Readonly<Record<string, string | undefined>>, R>(
67 schema: Schema.Schema<A, I, R>,
68 options?: ParseOptions | undefined
69) => {
70 const parse = Schema.decodeUnknown(schema, options)
71 return Effect.flatMap(serverRequestTag, (req) => parse(req.cookies))
72}
73
74/** @internal */
75export const schemaHeaders = <A, I extends Readonly<Record<string, string | undefined>>, R>(

Callers

nothing calls this directly

Calls 1

parseFunction · 0.70

Tested by

no test coverage detected