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

Function required

packages/effect/src/SchemaGetter.ts:387–389  ·  view source on GitHub ↗
(annotations?: Schema.Annotations.Key<T>)

Source from the content-addressed store, hash-verified

385 * @since 4.0.0
386 */
387export function required<T, E extends T = T>(annotations?: Schema.Annotations.Key<T>): Getter<T, E> {
388 return onNone(() => Effect.fail(new SchemaIssue.MissingKey(annotations)))
389}
390
391/**
392 * Creates a getter that handles present values (`Option.Some`), passing `None` through.

Callers

nothing calls this directly

Calls 2

onNoneFunction · 0.70
failMethod · 0.45

Tested by

no test coverage detected