PointerWraps 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
pathis an array of property keys (strings, numbers, or symbols).- Has no
actualvalue — getActual returnsOption.none(). - Formatters concatenate nested
Pointerpaths into a single path like["a"]["b"][0].
export class class Pointerclass Pointer {
_tag: 'Pointer';
path: ReadonlyArray<PropertyKey>;
issue: Issue;
toString: (this: Issue) => string;
}
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].
Pointer extends class BaseBase {
readonly Pointer._tag: "Pointer"_tag = "Pointer"
/**
* The path to the location in the input that caused the issue.
*/
readonly Pointer.path: readonly PropertyKey[]The path to the location in the input that caused the issue.
path: interface ReadonlyArray<T>ReadonlyArray<type PropertyKey =
| string
| number
| symbol
PropertyKey>
/**
* The issue that occurred.
*/
readonly Pointer.issue: IssueThe issue that occurred.
issue: type Issue =
| Leaf
| Filter
| Encoding
| Pointer
| Composite
| AnyOf
The root discriminated union of all validation error nodes.
When to use
Use when typing the error channel in Effect<A, Issue, R> results from
schema parsing, or when writing custom formatters or issue-tree walkers.
Details
Every node has a _tag field for pattern-matching. The union includes both
terminal
Leaf
types and composite types that wrap inner issues:
Filter
,
Encoding
,
Pointer
,
Composite
,
AnyOf
. All Issue instances have a toString() that delegates to
the default formatter, so String(issue) produces a human-readable message.
Issue
constructor(
/**
* The path to the location in the input that caused the issue.
*/
path: readonly PropertyKey[]The path to the location in the input that caused the issue.
path: interface ReadonlyArray<T>ReadonlyArray<type PropertyKey =
| string
| number
| symbol
PropertyKey>,
/**
* The issue that occurred.
*/
issue: IssueThe issue that occurred.
issue: type Issue =
| Leaf
| Filter
| Encoding
| Pointer
| Composite
| AnyOf
The root discriminated union of all validation error nodes.
When to use
Use when typing the error channel in Effect<A, Issue, R> results from
schema parsing, or when writing custom formatters or issue-tree walkers.
Details
Every node has a _tag field for pattern-matching. The union includes both
terminal
Leaf
types and composite types that wrap inner issues:
Filter
,
Encoding
,
Pointer
,
Composite
,
AnyOf
. All Issue instances have a toString() that delegates to
the default formatter, so String(issue) produces a human-readable message.
Issue
) {
super()
this.Pointer.path: readonly PropertyKey[]The path to the location in the input that caused the issue.
path = path: readonly PropertyKey[]The path to the location in the input that caused the issue.
path
this.Pointer.issue: IssueThe issue that occurred.
issue = issue: IssueThe issue that occurred.
issue
}
}