Package: effect
Module: SchemaIssue
Returns the built-in LeafHook used by default formatters.
When to use
Use as the default leaf renderer when customizing only the CheckHook.
Details
message annotation first; returns it if present._tag:
InvalidType → "Expected <type>, got <actual>"InvalidValue → "Invalid data <actual>"MissingKey → "Missing key"UnexpectedKey → "Unexpected key with value <actual>"Forbidden → "Forbidden operation"OneOf → "Expected exactly one member to match the input <actual>"Example (Formatting Standard Schema issues with defaultLeafHook)
import { SchemaIssue } from "effect"
const formatter = SchemaIssue.makeFormatterStandardSchemaV1({
leafHook: SchemaIssue.defaultLeafHook
})
See
LeafHookmakeFormatterStandardSchemaV1Signature
declare const defaultLeafHook: LeafHook
Since v4.0.0