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

Function OptionFromOptionalKey

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

Source from the content-addressed store, hash-verified

16686 * @since 4.0.0
16687 */
16688export function OptionFromOptionalKey<S extends Constraint>(schema: S): OptionFromOptionalKey<S> {
16689 return optionalKey(schema).pipe(decodeTo(
16690 Option(toType(schema)),
16691 SchemaTransformation.optionFromOptionalKey()
16692 ))
16693}
16694/**
16695 * Type-level representation returned by {@link OptionFromOptional}.
16696 *

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected