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

Function OptionFromUndefinedOr

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

Source from the content-addressed store, hash-verified

9743 * @since 3.10.0
9744 */
9745export function OptionFromUndefinedOr<S extends Constraint>(schema: S): OptionFromUndefinedOr<S> {
9746 return UndefinedOr(schema).pipe(decodeTo(
9747 Option(toType(schema)),
9748 SchemaTransformation.optionFromUndefinedOr()
9749 ))
9750}
9751
9752/**
9753 * Type-level representation returned by {@link OptionFromNullishOr}.

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected