Package: effect
Module: SchemaGetter
Creates a getter that always fails with a Forbidden issue.
When to use
Use when you need a schema getter to disallow a field or direction (encode/decode) entirely.
Details
SchemaIssue.Forbidden.Option<E> input for context.Example (Forbidding a decode direction)
import { SchemaGetter } from "effect"
const noEncode = SchemaGetter.forbidden<string, number>(
() => "encoding is not supported"
)
See
fail to fail with a custom issue typeSignature
declare const forbidden: <T, E>(message: (oe: Option.Option<E>) => string) => Getter<T, E>
Since v4.0.0