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

Function schemaStruct

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

Source from the content-addressed store, hash-verified

327 * @category schema
328 */
329export const schemaStruct = <A, I extends Record<string, string | ReadonlyArray<string> | undefined>, R>(
330 schema: Schema.Schema<A, I, R>,
331 options?: ParseOptions | undefined
332) =>
333(self: UrlParams): Effect.Effect<A, ParseResult.ParseError, R> => {
334 const parse = Schema.decodeUnknown(schema, options)
335 return parse(toRecord(self))
336}
337
338/**
339 * @since 1.0.0

Callers

nothing calls this directly

Calls 2

toRecordFunction · 0.70
parseFunction · 0.50

Tested by

no test coverage detected