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

Function OptionFromOptionalKey

packages/effect/src/Schema.ts:9808–9813  ·  view source on GitHub ↗
(schema: S)

Source from the content-addressed store, hash-verified

9806 * @since 4.0.0
9807 */
9808export function OptionFromOptionalKey<S extends Constraint>(schema: S): OptionFromOptionalKey<S> {
9809 return optionalKey(schema).pipe(decodeTo(
9810 Option(toType(schema)),
9811 SchemaTransformation.optionFromOptionalKey()
9812 ))
9813}
9814
9815/**
9816 * Type-level representation returned by {@link OptionFromOptional}.

Callers

nothing calls this directly

Calls 5

optionalKeyInterface · 0.85
toTypeInterface · 0.85
decodeToFunction · 0.70
OptionFunction · 0.70
pipeMethod · 0.65

Tested by

no test coverage detected