MCPcopy Create free account
hub / github.com/effect-app/libs / onNone

Function onNone

repos/effect/packages/effect/src/SchemaGetter.ts:334–338  ·  view source on GitHub ↗
(
  f: (options: SchemaAST.ParseOptions) => Effect.Effect<Option.Option<T>, SchemaIssue.Issue, R>
)

Source from the content-addressed store, hash-verified

332 *
333 * **Example** (Providing a default timestamp for a missing field)
334 *
335 * ```ts import.meta.vitest
336 * import { Effect, Option, SchemaGetter } from "effect"
337 *
338 * const withTimestamp = SchemaGetter.onNone<number>(() =>
339 * Effect.succeed(Option.some(0))
340 * )
341 * await Effect.runPromise(withTimestamp.run(Option.none(), {})) // => Option.some(0)

Callers 5

Option.tsFile · 0.70
requiredFunction · 0.70
Param.tsFile · 0.50
effect.tsFile · 0.50
result.tsFile · 0.50

Calls 2

fFunction · 0.50
succeedMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…