Hyperlinkv0.8.0-beta.28

SchemaIssue

SchemaIssue.MissingKeyclasseffect/SchemaIssue.ts:319
MissingKey

Represents a schema issue produced when a required key or tuple index is missing from the input.

When to use

Use when you need to detect absent fields in struct/tuple validation.

Details

  • Has no actual value — getActual returns Option.none().
  • annotations may contain a custom messageMissingKey for formatting.
export class MissingKey extends Base {
  readonly _tag = "MissingKey"
  /**
   * The metadata for the issue.
   */
  readonly annotations: Schema.Annotations.Key<unknown> | undefined

  constructor(
    /**
     * The metadata for the issue.
     */
    annotations: Schema.Annotations.Key<unknown> | undefined
  ) {
    super()
    this.annotations = annotations
  }
}
Referenced by 2 symbols