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

Function OptionFromNullOr

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

Source from the content-addressed store, hash-verified

9714 * @since 3.10.0
9715 */
9716export function OptionFromNullOr<S extends Constraint>(schema: S): OptionFromNullOr<S> {
9717 return NullOr(schema).pipe(decodeTo(
9718 Option(toType(schema)),
9719 SchemaTransformation.optionFromNullOr()
9720 ))
9721}
9722
9723/**
9724 * Type-level representation returned by {@link OptionFromUndefinedOr}.

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected