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

Function transformOptional

packages/effect/src/SchemaGetter.ts:800–802  ·  view source on GitHub ↗
(f: (oe: Option.Option<E>) => Option.Option<T>)

Source from the content-addressed store, hash-verified

798 * @since 4.0.0
799 */
800export function transformOptional<T, E>(f: (oe: Option.Option<E>) => Option.Option<T>): Getter<T, E> {
801 return makeGetter({ _tag: "TransformOptional", transform: f })
802}
803
804/**
805 * Creates a getter that effectfully transforms the full `Option`.

Callers 3

SchemaGetter.tsFile · 0.70
succeedFunction · 0.70
omitFunction · 0.70

Calls 1

makeGetterFunction · 0.85

Tested by

no test coverage detected