Hyperlinkv0.8.0-beta.28

SchemaIssue

SchemaIssue.defaultCheckHookconsteffect/SchemaIssue.ts:958
(issue: Filter): string | undefined

Returns the built-in CheckHook used by default formatters.

When to use

Use as the default filter renderer when customizing only the LeafHook.

Details

  • Looks for a message annotation on the inner issue first, then on the filter itself.
  • Returns undefined when no annotation is found, causing the formatter to fall back to "Expected <filter>, got <actual>".
export const defaultCheckHook: CheckHook = (issue): string | undefined => {
  return findMessage(issue.issue) ?? findMessage(issue)
}
Referenced by 2 symbols