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

Function OptionFromOptional

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

Source from the content-addressed store, hash-verified

16716 * @since 4.0.0
16717 */
16718export function OptionFromOptional<S extends Constraint>(schema: S): OptionFromOptional<S> {
16719 return optional(schema).pipe(decodeTo(
16720 Option(toType(schema)),
16721 SchemaTransformation.optionFromOptional<any>()
16722 ))
16723}
16724/**
16725 * Type-level representation returned by {@link OptionFromOptionalNullOr}.
16726 *

Callers

nothing calls this directly

Calls 5

optionalInterface · 0.70
decodeToFunction · 0.70
OptionFunction · 0.70
toTypeInterface · 0.70
pipeMethod · 0.65

Tested by

no test coverage detected