CompositeRepresents a schema issue that groups multiple child issues under a single schema node.
When to use
Use when you need to walk the issue tree for struct/tuple schemas that collect all field errors rather than failing on the first.
Details
issuesis a non-empty readonly array (at least one child).actualisOption.some(value)when the input was present, orOption.none()when absent.- Formatters flatten
Compositeby recursing into each child.
export class class Compositeclass Composite {
_tag: 'Composite';
ast: SchemaAST.AST;
actual: Option.Option<unknown>;
issues: readonly [Issue, ...Array<Issue>];
toString: (this: Issue) => string;
}
Represents a schema issue that groups multiple child issues under a single schema node.
When to use
Use when you need to walk the issue tree for struct/tuple schemas that collect
all field errors rather than failing on the first.
Details
issues is a non-empty readonly array (at least one child).
actual is Option.some(value) when the input was present, or
Option.none() when absent.
- Formatters flatten
Composite by recursing into each child.
Composite extends class BaseBase {
readonly Composite._tag: "Composite"_tag = "Composite"
/**
* The schema that caused the issue.
*/
readonly Composite.ast: SchemaAST.ASTThe schema that caused the issue.
ast: import SchemaASTSchemaAST.type SchemaAST.AST = /*unresolved*/ anyAST
/**
* The input value that caused the issue.
*/
readonly Composite.actual: Option.Option<unknown>The input value that caused the issue.
actual: import OptionOption.type Option.Option = /*unresolved*/ anyOption<unknown>
/**
* The issues that occurred.
*/
readonly Composite.issues: readonly [Issue, ...Array<Issue>](property) Composite.issues: {
0: Issue;
length: number;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
concat: { (...items: Array<ConcatArray<Issue>>): Array<Issue>; (...items: Array<Issue | ConcatArray<Issue>>): Array<Issue> };
join: (separator?: string) => string;
slice: (start?: number, end?: number) => Array<Issue>;
indexOf: (searchElement: Issue, fromIndex?: number) => number;
lastIndexOf: (searchElement: Issue, fromIndex?: number) => number;
every: { (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => value is S, thisArg?: any): this is readonly S[]; (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => unknown, thisArg?: any): boolean };
some: (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: Issue, index: number, array: ReadonlyArray<Issue>) => void, thisArg?: any) => void;
map: (callbackfn: (value: Issue, index: number, array: ReadonlyArray<Issue>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => value is S, thisArg?: any): Array<S>; (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => unknown, thisArg?: any): Array<Issue> };
reduce: { (callbackfn: (previousValue: Issue, currentValue: Issue, currentIndex: number, array: ReadonlyArray<Issue>) => Issue): Issue; (callbackfn: (previousValue: Issue, currentValue: Issue, currentIndex: number, array: ReadonlyArray<Issue>) => …;
reduceRight: { (callbackfn: (previousValue: Issue, currentValue: Issue, currentIndex: number, array: ReadonlyArray<Issue>) => Issue): Issue; (callbackfn: (previousValue: Issue, currentValue: Issue, currentIndex: number, array: ReadonlyArray<Issue>) => …;
find: { (predicate: (value: Issue, index: number, obj: ReadonlyArray<Issue>) => value is S, thisArg?: any): S | undefined; (predicate: (value: Issue, index: number, obj: ReadonlyArray<Issue>) => unknown, thisArg?: any): Issue | undefined };
findIndex: (predicate: (value: Issue, index: number, obj: ReadonlyArray<Issue>) => unknown, thisArg?: any) => number;
entries: () => ArrayIterator<[number, Issue]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<Issue>;
includes: (searchElement: Issue, fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: Issue, index: number, array: Array<Issue>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => Issue | undefined;
findLast: { (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => value is S, thisArg?: any): S | undefined; (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => unknown, thisArg?: any): Issue | undefined };
findLastIndex: (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => unknown, thisArg?: any) => number;
toReversed: () => Array<Issue>;
toSorted: (compareFn?: ((a: Issue, b: Issue) => number) | undefined) => Array<Issue>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<Issue>): Array<Issue>; (start: number, deleteCount?: number): Array<Issue> };
with: (index: number, value: Issue) => Array<Issue>;
}
The issues that occurred.
issues: readonly [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, ...interface Array<T>Array<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 schema that caused the issue.
*/
ast: SchemaAST.ASTThe schema that caused the issue.
ast: import SchemaASTSchemaAST.type SchemaAST.AST = /*unresolved*/ anyAST,
/**
* The input value that caused the issue.
*/
actual: Option.Option<unknown>The input value that caused the issue.
actual: import OptionOption.type Option.Option = /*unresolved*/ anyOption<unknown>,
/**
* The issues that occurred.
*/
issues: readonly [Issue, ...Array<Issue>](parameter) issues: {
0: Issue;
length: number;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
concat: { (...items: Array<ConcatArray<Issue>>): Array<Issue>; (...items: Array<Issue | ConcatArray<Issue>>): Array<Issue> };
join: (separator?: string) => string;
slice: (start?: number, end?: number) => Array<Issue>;
indexOf: (searchElement: Issue, fromIndex?: number) => number;
lastIndexOf: (searchElement: Issue, fromIndex?: number) => number;
every: { (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => value is S, thisArg?: any): this is readonly S[]; (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => unknown, thisArg?: any): boolean };
some: (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: Issue, index: number, array: ReadonlyArray<Issue>) => void, thisArg?: any) => void;
map: (callbackfn: (value: Issue, index: number, array: ReadonlyArray<Issue>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => value is S, thisArg?: any): Array<S>; (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => unknown, thisArg?: any): Array<Issue> };
reduce: { (callbackfn: (previousValue: Issue, currentValue: Issue, currentIndex: number, array: ReadonlyArray<Issue>) => Issue): Issue; (callbackfn: (previousValue: Issue, currentValue: Issue, currentIndex: number, array: ReadonlyArray<Issue>) => …;
reduceRight: { (callbackfn: (previousValue: Issue, currentValue: Issue, currentIndex: number, array: ReadonlyArray<Issue>) => Issue): Issue; (callbackfn: (previousValue: Issue, currentValue: Issue, currentIndex: number, array: ReadonlyArray<Issue>) => …;
find: { (predicate: (value: Issue, index: number, obj: ReadonlyArray<Issue>) => value is S, thisArg?: any): S | undefined; (predicate: (value: Issue, index: number, obj: ReadonlyArray<Issue>) => unknown, thisArg?: any): Issue | undefined };
findIndex: (predicate: (value: Issue, index: number, obj: ReadonlyArray<Issue>) => unknown, thisArg?: any) => number;
entries: () => ArrayIterator<[number, Issue]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<Issue>;
includes: (searchElement: Issue, fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: Issue, index: number, array: Array<Issue>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => Issue | undefined;
findLast: { (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => value is S, thisArg?: any): S | undefined; (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => unknown, thisArg?: any): Issue | undefined };
findLastIndex: (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => unknown, thisArg?: any) => number;
toReversed: () => Array<Issue>;
toSorted: (compareFn?: ((a: Issue, b: Issue) => number) | undefined) => Array<Issue>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<Issue>): Array<Issue>; (start: number, deleteCount?: number): Array<Issue> };
with: (index: number, value: Issue) => Array<Issue>;
}
The issues that occurred.
issues: readonly [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, ...interface Array<T>Array<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.Composite.ast: SchemaAST.ASTThe schema that caused the issue.
ast = ast: SchemaAST.ASTThe schema that caused the issue.
ast
this.Composite.actual: Option.Option<unknown>The input value that caused the issue.
actual = actual: Option.Option<unknown>The input value that caused the issue.
actual
this.Composite.issues: readonly [Issue, ...Array<Issue>](property) Composite.issues: {
0: Issue;
length: number;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
concat: { (...items: Array<ConcatArray<Issue>>): Array<Issue>; (...items: Array<Issue | ConcatArray<Issue>>): Array<Issue> };
join: (separator?: string) => string;
slice: (start?: number, end?: number) => Array<Issue>;
indexOf: (searchElement: Issue, fromIndex?: number) => number;
lastIndexOf: (searchElement: Issue, fromIndex?: number) => number;
every: { (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => value is S, thisArg?: any): this is readonly S[]; (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => unknown, thisArg?: any): boolean };
some: (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: Issue, index: number, array: ReadonlyArray<Issue>) => void, thisArg?: any) => void;
map: (callbackfn: (value: Issue, index: number, array: ReadonlyArray<Issue>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => value is S, thisArg?: any): Array<S>; (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => unknown, thisArg?: any): Array<Issue> };
reduce: { (callbackfn: (previousValue: Issue, currentValue: Issue, currentIndex: number, array: ReadonlyArray<Issue>) => Issue): Issue; (callbackfn: (previousValue: Issue, currentValue: Issue, currentIndex: number, array: ReadonlyArray<Issue>) => …;
reduceRight: { (callbackfn: (previousValue: Issue, currentValue: Issue, currentIndex: number, array: ReadonlyArray<Issue>) => Issue): Issue; (callbackfn: (previousValue: Issue, currentValue: Issue, currentIndex: number, array: ReadonlyArray<Issue>) => …;
find: { (predicate: (value: Issue, index: number, obj: ReadonlyArray<Issue>) => value is S, thisArg?: any): S | undefined; (predicate: (value: Issue, index: number, obj: ReadonlyArray<Issue>) => unknown, thisArg?: any): Issue | undefined };
findIndex: (predicate: (value: Issue, index: number, obj: ReadonlyArray<Issue>) => unknown, thisArg?: any) => number;
entries: () => ArrayIterator<[number, Issue]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<Issue>;
includes: (searchElement: Issue, fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: Issue, index: number, array: Array<Issue>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => Issue | undefined;
findLast: { (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => value is S, thisArg?: any): S | undefined; (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => unknown, thisArg?: any): Issue | undefined };
findLastIndex: (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => unknown, thisArg?: any) => number;
toReversed: () => Array<Issue>;
toSorted: (compareFn?: ((a: Issue, b: Issue) => number) | undefined) => Array<Issue>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<Issue>): Array<Issue>; (start: number, deleteCount?: number): Array<Issue> };
with: (index: number, value: Issue) => Array<Issue>;
}
The issues that occurred.
issues = issues: readonly [Issue, ...Array<Issue>](parameter) issues: {
0: Issue;
length: number;
toString: () => string;
toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string };
concat: { (...items: Array<ConcatArray<Issue>>): Array<Issue>; (...items: Array<Issue | ConcatArray<Issue>>): Array<Issue> };
join: (separator?: string) => string;
slice: (start?: number, end?: number) => Array<Issue>;
indexOf: (searchElement: Issue, fromIndex?: number) => number;
lastIndexOf: (searchElement: Issue, fromIndex?: number) => number;
every: { (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => value is S, thisArg?: any): this is readonly S[]; (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => unknown, thisArg?: any): boolean };
some: (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => unknown, thisArg?: any) => boolean;
forEach: (callbackfn: (value: Issue, index: number, array: ReadonlyArray<Issue>) => void, thisArg?: any) => void;
map: (callbackfn: (value: Issue, index: number, array: ReadonlyArray<Issue>) => U, thisArg?: any) => Array<U>;
filter: { (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => value is S, thisArg?: any): Array<S>; (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => unknown, thisArg?: any): Array<Issue> };
reduce: { (callbackfn: (previousValue: Issue, currentValue: Issue, currentIndex: number, array: ReadonlyArray<Issue>) => Issue): Issue; (callbackfn: (previousValue: Issue, currentValue: Issue, currentIndex: number, array: ReadonlyArray<Issue>) => …;
reduceRight: { (callbackfn: (previousValue: Issue, currentValue: Issue, currentIndex: number, array: ReadonlyArray<Issue>) => Issue): Issue; (callbackfn: (previousValue: Issue, currentValue: Issue, currentIndex: number, array: ReadonlyArray<Issue>) => …;
find: { (predicate: (value: Issue, index: number, obj: ReadonlyArray<Issue>) => value is S, thisArg?: any): S | undefined; (predicate: (value: Issue, index: number, obj: ReadonlyArray<Issue>) => unknown, thisArg?: any): Issue | undefined };
findIndex: (predicate: (value: Issue, index: number, obj: ReadonlyArray<Issue>) => unknown, thisArg?: any) => number;
entries: () => ArrayIterator<[number, Issue]>;
keys: () => ArrayIterator<number>;
values: () => ArrayIterator<Issue>;
includes: (searchElement: Issue, fromIndex?: number) => boolean;
flatMap: (callback: (this: This, value: Issue, index: number, array: Array<Issue>) => U | ReadonlyArray<U>, thisArg?: This | undefined) => Array<U>;
flat: (this: A, depth?: D | undefined) => Array<FlatArray<A, D>>;
at: (index: number) => Issue | undefined;
findLast: { (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => value is S, thisArg?: any): S | undefined; (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => unknown, thisArg?: any): Issue | undefined };
findLastIndex: (predicate: (value: Issue, index: number, array: ReadonlyArray<Issue>) => unknown, thisArg?: any) => number;
toReversed: () => Array<Issue>;
toSorted: (compareFn?: ((a: Issue, b: Issue) => number) | undefined) => Array<Issue>;
toSpliced: { (start: number, deleteCount: number, ...items: Array<Issue>): Array<Issue>; (start: number, deleteCount?: number): Array<Issue> };
with: (index: number, value: Issue) => Array<Issue>;
}
The issues that occurred.
issues
}
}