Hyperlinkv0.8.0-beta.28

SchemaIssue

SchemaIssue.Pointerclasseffect/SchemaIssue.ts:274
Pointer

Wraps an inner Issue with a property-key path, indicating where in a nested structure the error occurred.

When to use

Use when you need to walk the issue tree to accumulate path segments for error reporting.

Details

  • path is an array of property keys (strings, numbers, or symbols).
  • Has no actual value — getActual returns Option.none().
  • Formatters concatenate nested Pointer paths into a single path like ["a"]["b"][0].
export class Pointer extends Base {
  readonly _tag = "Pointer"
  /**
   * The path to the location in the input that caused the issue.
   */
  readonly path: ReadonlyArray<PropertyKey>
  /**
   * The issue that occurred.
   */
  readonly issue: Issue

  constructor(
    /**
     * The path to the location in the input that caused the issue.
     */
    path: ReadonlyArray<PropertyKey>,
    /**
     * The issue that occurred.
     */
    issue: Issue
  ) {
    super()
    this.path = path
    this.issue = issue
  }
}
Referenced by 16 symbols