MissingKeyRepresents 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
actualvalue — getActual returnsOption.none(). annotationsmay contain a custommessageMissingKeyfor formatting.
export class class MissingKeyclass MissingKey {
_tag: 'MissingKey';
annotations: Schema.Annotations.Key<unknown> | undefined;
toString: (this: Issue) => string;
}
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.
MissingKey extends class BaseBase {
readonly MissingKey._tag: "MissingKey"_tag = "MissingKey"
/**
* The metadata for the issue.
*/
readonly MissingKey.annotations: Schema.Annotations.Key<unknown> | undefinedThe metadata for the issue.
annotations: import SchemaSchema.Annotations.interface Annotations.Key<T>Annotations for struct property schemas. Extends
Documentation
with an optional messageMissingKey to override the error message when
the property key is absent during decoding.
Key<unknown> | undefined
constructor(
/**
* The metadata for the issue.
*/
annotations: | Schema.Annotations.Key<unknown>
| undefined
The metadata for the issue.
annotations: import SchemaSchema.Annotations.interface Annotations.Key<T>Annotations for struct property schemas. Extends
Documentation
with an optional messageMissingKey to override the error message when
the property key is absent during decoding.
Key<unknown> | undefined
) {
super()
this.MissingKey.annotations: Schema.Annotations.Key<unknown> | undefinedThe metadata for the issue.
annotations = annotations: | Schema.Annotations.Key<unknown>
| undefined
The metadata for the issue.
annotations
}
}