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

Function OptionFromNullOr

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

Source from the content-addressed store, hash-verified

16104 * @since 3.10.0
16105 */
16106export function OptionFromNullOr<S extends Constraint>(schema: S): OptionFromNullOr<S> {
16107 return NullOr(schema).pipe(decodeTo(
16108 Option(toType(schema)),
16109 SchemaTransformation.optionFromNullOr()
16110 ))
16111}
16112/**
16113 * Type-level representation returned by {@link OptionFromUndefinedOr}.
16114 *

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected