HashMap<Key, Value>Schema for hash maps whose keys and values conform to the provided schemas.
export interface interface HashMap<Key extends Constraint, Value extends Constraint>Schema for hash maps whose keys and values conform to the provided schemas.
Type-level representation returned by
HashMap
.
HashMap<function (type parameter) Key in HashMap<Key extends Constraint, Value extends Constraint>Key extends Constraint, function (type parameter) Value in HashMap<Key extends Constraint, Value extends Constraint>Value extends Constraint> extends
interface declareConstructor<T, E, TypeParameters extends ReadonlyArray<Constraint>, Iso = T>Creates a schema for a parametric type (a generic container such as
Array<A>, Option<A>, etc.) by accepting a list of type-parameter schemas
and a decoder factory.
When to use
Use when you are defining a schema for a generic container whose validation
depends on one or more type-parameter schemas.
Details
The outer call declareConstructor<T, E, Iso>() fixes the decoded type T,
the encoded type E, and the optional iso type. The inner call receives:
typeParameters — the concrete schemas for each type variable
run — a factory that, given resolved codecs for each type parameter,
returns a parsing function (u, ast, options) => Effect<T, Issue>
annotations — optional metadata
Type-level representation returned by
declareConstructor
.
declareConstructor<
import HashMap_HashMap_.type HashMap_.HashMap = /*unresolved*/ anyHashMap<function (type parameter) Key in HashMap<Key extends Constraint, Value extends Constraint>Key["Type"], function (type parameter) Value in HashMap<Key extends Constraint, Value extends Constraint>Value["Type"]>,
import HashMap_HashMap_.type HashMap_.HashMap = /*unresolved*/ anyHashMap<function (type parameter) Key in HashMap<Key extends Constraint, Value extends Constraint>Key["Encoded"], function (type parameter) Value in HashMap<Key extends Constraint, Value extends Constraint>Value["Encoded"]>,
readonly [function (type parameter) Key in HashMap<Key extends Constraint, Value extends Constraint>Key, function (type parameter) Value in HashMap<Key extends Constraint, Value extends Constraint>Value],
type HashMapIso<
Key extends Constraint,
Value extends Constraint
> = readonly (readonly [
Key["Iso"],
Value["Iso"]
])[]
Iso representation used for HashMap schemas: an array of readonly
[key, value] tuples using each entry schema's Iso type.
HashMapIso<function (type parameter) Key in HashMap<Key extends Constraint, Value extends Constraint>Key, function (type parameter) Value in HashMap<Key extends Constraint, Value extends Constraint>Value>
>
{
readonly "Rebuild": interface HashMap<Key extends Constraint, Value extends Constraint>Schema for hash maps whose keys and values conform to the provided schemas.
Type-level representation returned by
HashMap
.
HashMap<function (type parameter) Key in HashMap<Key extends Constraint, Value extends Constraint>Key, function (type parameter) Value in HashMap<Key extends Constraint, Value extends Constraint>Value>
readonly HashMap<Key extends Constraint, Value extends Constraint>.key: Key extends Constraintkey: function (type parameter) Key in HashMap<Key extends Constraint, Value extends Constraint>Key
readonly HashMap<Key extends Constraint, Value extends Constraint>.value: Value extends Constraintvalue: function (type parameter) Value in HashMap<Key extends Constraint, Value extends Constraint>Value
}
/**
* Iso representation used for `HashMap` schemas: an array of readonly
* `[key, value]` tuples using each entry schema's `Iso` type.
*
* @category HashMap
* @since 4.0.0
*/
export type type HashMapIso<
Key extends Constraint,
Value extends Constraint
> = readonly (readonly [
Key["Iso"],
Value["Iso"]
])[]
Iso representation used for HashMap schemas: an array of readonly
[key, value] tuples using each entry schema's Iso type.
HashMapIso<function (type parameter) Key in type HashMapIso<Key extends Constraint, Value extends Constraint>Key extends Constraint, function (type parameter) Value in type HashMapIso<Key extends Constraint, Value extends Constraint>Value extends Constraint> = interface ReadonlyArray<T>ReadonlyArray<
readonly [function (type parameter) Key in type HashMapIso<Key extends Constraint, Value extends Constraint>Key["Iso"], function (type parameter) Value in type HashMapIso<Key extends Constraint, Value extends Constraint>Value["Iso"]]
>
/**
* Schema for hash maps whose keys and values conform to the provided schemas.
*
* @category HashMap
* @since 3.10.0
*/
export function function HashMap<
Key extends Constraint,
Value extends Constraint
>(key: Key, value: Value): HashMap<Key, Value>
Schema for hash maps whose keys and values conform to the provided schemas.
HashMap<function (type parameter) Key in HashMap<Key extends Constraint, Value extends Constraint>(key: Key, value: Value): HashMap<Key, Value>Key extends Constraint, function (type parameter) Value in HashMap<Key extends Constraint, Value extends Constraint>(key: Key, value: Value): HashMap<Key, Value>Value extends Constraint>(key: Key extends Constraintkey: function (type parameter) Key in HashMap<Key extends Constraint, Value extends Constraint>(key: Key, value: Value): HashMap<Key, Value>Key, value: Value extends Constraintvalue: function (type parameter) Value in HashMap<Key extends Constraint, Value extends Constraint>(key: Key, value: Value): HashMap<Key, Value>Value): interface HashMap<Key extends Constraint, Value extends Constraint>Schema for hash maps whose keys and values conform to the provided schemas.
Type-level representation returned by
HashMap
.
HashMap<function (type parameter) Key in HashMap<Key extends Constraint, Value extends Constraint>(key: Key, value: Value): HashMap<Key, Value>Key, function (type parameter) Value in HashMap<Key extends Constraint, Value extends Constraint>(key: Key, value: Value): HashMap<Key, Value>Value> {
const const schema: declareConstructor<
HashMap_.HashMap<Key["Type"], Value["Type"]>,
HashMap_.HashMap<
Key["Encoded"],
Value["Encoded"]
>,
readonly [Key, Value],
HashMapIso<Key, Value>
>
const schema: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Annotations.Bottom<HashMap_.HashMap<Key['Type'], Value['Type']>, readonly [Key, Value]>) => declareConstructor<HashMap_.HashMap<Key['Type'], Value['Type']>, HashMap_.HashMap<Key['Encoded'], Value['Encoded']>, readonly [Key, V…;
annotateKey: (annotations: Annotations.Key<HashMap_.HashMap<Key['Type'], Value['Type']>>) => declareConstructor<HashMap_.HashMap<Key['Type'], Value['Type']>, HashMap_.HashMap<Key['Encoded'], Value['Encoded']>, readonly [Key, Value], HashMapIso<Key, Val…;
check: (checks_0: SchemaAST.Check<HashMap_.HashMap<Key['Type'], Value['Type']>>, ...checks: Array<SchemaAST.Check<HashMap_.HashMap<Key['Type'], Value['Type']>>>) => declareConstructor<HashMap_.HashMap<Key['Type'], Value['Type']>, HashMap_.HashMap…;
rebuild: (ast: SchemaAST.Declaration) => declareConstructor<HashMap_.HashMap<Key['Type'], Value['Type']>, HashMap_.HashMap<Key['Encoded'], Value['Encoded']>, readonly [Key, Value], HashMapIso<Key, Value>>;
make: (input: HashMap_.HashMap<Key['Type'], Value['Type']>, options?: MakeOptions) => HashMap_.HashMap<Key['Type'], Value['Type']>;
makeOption: (input: HashMap_.HashMap<Key['Type'], Value['Type']>, options?: MakeOptions) => Option_.Option<HashMap_.HashMap<Key['Type'], Value['Type']>>;
makeEffect: (input: HashMap_.HashMap<Key['Type'], Value['Type']>, options?: MakeOptions) => Effect.Effect<HashMap_.HashMap<Key['Type'], Value['Type']>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
schema = function declareConstructor<
T,
E = T,
Iso = T
>(): <
TypeParameters extends ReadonlyArray<Constraint>
>(
typeParameters: TypeParameters,
run: (typeParameters: {
readonly [K in keyof TypeParameters]: Codec<
TypeParameters[K]["Type"],
TypeParameters[K]["Encoded"]
>
}) => (
u: unknown,
self: SchemaAST.Declaration,
options: SchemaAST.ParseOptions
) => Effect.Effect<T, SchemaIssue.Issue>,
annotations?: Annotations.Declaration<
T,
TypeParameters
>
) => declareConstructor<T, E, TypeParameters, Iso>
Creates a schema for a parametric type (a generic container such as
Array<A>, Option<A>, etc.) by accepting a list of type-parameter schemas
and a decoder factory.
When to use
Use when you are defining a schema for a generic container whose validation
depends on one or more type-parameter schemas.
Details
The outer call declareConstructor<T, E, Iso>() fixes the decoded type T,
the encoded type E, and the optional iso type. The inner call receives:
typeParameters — the concrete schemas for each type variable
run — a factory that, given resolved codecs for each type parameter,
returns a parsing function (u, ast, options) => Effect<T, Issue>
annotations — optional metadata
declareConstructor<
import HashMap_HashMap_.type HashMap_.HashMap = /*unresolved*/ anyHashMap<function (type parameter) Key in HashMap<Key extends Constraint, Value extends Constraint>(key: Key, value: Value): HashMap<Key, Value>Key["Type"], function (type parameter) Value in HashMap<Key extends Constraint, Value extends Constraint>(key: Key, value: Value): HashMap<Key, Value>Value["Type"]>,
import HashMap_HashMap_.type HashMap_.HashMap = /*unresolved*/ anyHashMap<function (type parameter) Key in HashMap<Key extends Constraint, Value extends Constraint>(key: Key, value: Value): HashMap<Key, Value>Key["Encoded"], function (type parameter) Value in HashMap<Key extends Constraint, Value extends Constraint>(key: Key, value: Value): HashMap<Key, Value>Value["Encoded"]>,
type HashMapIso<
Key extends Constraint,
Value extends Constraint
> = readonly (readonly [
Key["Iso"],
Value["Iso"]
])[]
Iso representation used for HashMap schemas: an array of readonly
[key, value] tuples using each entry schema's Iso type.
HashMapIso<function (type parameter) Key in HashMap<Key extends Constraint, Value extends Constraint>(key: Key, value: Value): HashMap<Key, Value>Key, function (type parameter) Value in HashMap<Key extends Constraint, Value extends Constraint>(key: Key, value: Value): HashMap<Key, Value>Value>
>()(
[key: Key extends Constraintkey, value: Value extends Constraintvalue],
([key: Codec<
Key["Type"],
Key["Encoded"],
never,
never
>
(parameter) key: {
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
Rebuild: Codec<T, E, RD, RE>;
Type: T;
Iso: Iso;
ast: Ast;
annotate: (annotations: Annotations.Bottom<Key['Type'], any>) => Codec<Key['Type'], Key['Encoded'], never, never>;
annotateKey: (annotations: Annotations.Key<Key['Type']>) => Codec<Key['Type'], Key['Encoded'], never, never>;
check: (checks_0: SchemaAST.Check<Key['Type']>, ...checks: Array<SchemaAST.Check<Key['Type']>>) => Codec<Key['Type'], Key['Encoded'], never, never>;
rebuild: (ast: SchemaAST.AST) => Codec<Key['Type'], Key['Encoded'], never, never>;
make: (input: unknown, options?: MakeOptions) => Key['Type'];
makeOption: (input: unknown, options?: MakeOptions) => Option_.Option<Key['Type']>;
makeEffect: (input: unknown, options?: MakeOptions) => Effect.Effect<Key['Type'], SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
key, value: Codec<
Value["Type"],
Value["Encoded"],
never,
never
>
(parameter) value: {
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
Rebuild: Codec<T, E, RD, RE>;
Type: T;
Iso: Iso;
ast: Ast;
annotate: (annotations: Annotations.Bottom<Value['Type'], any>) => Codec<Value['Type'], Value['Encoded'], never, never>;
annotateKey: (annotations: Annotations.Key<Value['Type']>) => Codec<Value['Type'], Value['Encoded'], never, never>;
check: (checks_0: SchemaAST.Check<Value['Type']>, ...checks: Array<SchemaAST.Check<Value['Type']>>) => Codec<Value['Type'], Value['Encoded'], never, never>;
rebuild: (ast: SchemaAST.AST) => Codec<Value['Type'], Value['Encoded'], never, never>;
make: (input: unknown, options?: MakeOptions) => Value['Type'];
makeOption: (input: unknown, options?: MakeOptions) => Option_.Option<Value['Type']>;
makeEffect: (input: unknown, options?: MakeOptions) => Effect.Effect<Value['Type'], SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
value]) => {
const const entries: $Array<
Tuple<
readonly [
Codec<
Key["Type"],
Key["Encoded"],
never,
never
>,
Codec<
Value["Type"],
Value["Encoded"],
never,
never
>
]
>
>
const entries: {
Type: ReadonlyArray<S["Type"]>;
Encoded: ReadonlyArray<S["Encoded"]>;
DecodingServices: S["DecodingServices"];
EncodingServices: S["EncodingServices"];
Iso: ReadonlyArray<S["Iso"]>;
value: S;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Annotations.Bottom<ReadonlyArray<readonly [Key['Type'], Value['Type']]>, readonly []>) => $Array<Tuple<readonly [Codec<Key['Type'], Key['Encoded'], never, never>, Codec<Value['Type'], Value['Encoded'], never, never>]>>;
annotateKey: (annotations: Annotations.Key<ReadonlyArray<readonly [Key['Type'], Value['Type']]>>) => $Array<Tuple<readonly [Codec<Key['Type'], Key['Encoded'], never, never>, Codec<Value['Type'], Value['Encoded'], never, never>]>>;
check: (checks_0: SchemaAST.Check<ReadonlyArray<readonly [Key['Type'], Value['Type']]>>, ...checks: Array<SchemaAST.Check<ReadonlyArray<readonly [Key['Type'], Value['Type']]>>>) => $Array<Tuple<readonly [Codec<Key['Type'], Key['Encoded'], never, …;
rebuild: (ast: SchemaAST.Arrays) => $Array<Tuple<readonly [Codec<Key['Type'], Key['Encoded'], never, never>, Codec<Value['Type'], Value['Encoded'], never, never>]>>;
make: (input: ReadonlyArray<readonly [unknown, unknown]>, options?: MakeOptions) => ReadonlyArray<readonly [Key['Type'], Value['Type']]>;
makeOption: (input: ReadonlyArray<readonly [unknown, unknown]>, options?: MakeOptions) => Option_.Option<ReadonlyArray<readonly [Key['Type'], Value['Type']]>>;
makeEffect: (input: ReadonlyArray<readonly [unknown, unknown]>, options?: MakeOptions) => Effect.Effect<ReadonlyArray<readonly [Key['Type'], Value['Type']]>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
entries = const ArraySchema: ArrayLambda
<Tuple<readonly [Codec<Key["Type"], Key["Encoded"], never, never>, Codec<Value["Type"], Value["Encoded"], never, never>]>>(self: Tuple<readonly [Codec<Key["Type"], Key["Encoded"], never, never>, Codec<Value["Type"], Value["Encoded"], never, never>]>) => $Array<Tuple<readonly [Codec<Key["Type"], Key["Encoded"], never, never>, Codec<Value["Type"], Value["Encoded"], never, never>]>>
ArraySchema(function Tuple<
Elements extends ReadonlyArray<Constraint>
>(elements: Elements): Tuple<Elements>
Defines a fixed-length tuple schema from an array of element schemas.
Example (Defining a pair of string and number)
import { Schema } from "effect"
const schema = Schema.Tuple([Schema.String, Schema.Number])
const pair = Schema.decodeUnknownSync(schema)(["hello", 42])
console.log(pair)
// [ 'hello', 42 ]
Tuple([key: Codec<
Key["Type"],
Key["Encoded"],
never,
never
>
(parameter) key: {
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
Rebuild: Codec<T, E, RD, RE>;
Type: T;
Iso: Iso;
ast: Ast;
annotate: (annotations: Annotations.Bottom<Key['Type'], any>) => Codec<Key['Type'], Key['Encoded'], never, never>;
annotateKey: (annotations: Annotations.Key<Key['Type']>) => Codec<Key['Type'], Key['Encoded'], never, never>;
check: (checks_0: SchemaAST.Check<Key['Type']>, ...checks: Array<SchemaAST.Check<Key['Type']>>) => Codec<Key['Type'], Key['Encoded'], never, never>;
rebuild: (ast: SchemaAST.AST) => Codec<Key['Type'], Key['Encoded'], never, never>;
make: (input: unknown, options?: MakeOptions) => Key['Type'];
makeOption: (input: unknown, options?: MakeOptions) => Option_.Option<Key['Type']>;
makeEffect: (input: unknown, options?: MakeOptions) => Effect.Effect<Key['Type'], SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
key, value: Codec<
Value["Type"],
Value["Encoded"],
never,
never
>
(parameter) value: {
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
Rebuild: Codec<T, E, RD, RE>;
Type: T;
Iso: Iso;
ast: Ast;
annotate: (annotations: Annotations.Bottom<Value['Type'], any>) => Codec<Value['Type'], Value['Encoded'], never, never>;
annotateKey: (annotations: Annotations.Key<Value['Type']>) => Codec<Value['Type'], Value['Encoded'], never, never>;
check: (checks_0: SchemaAST.Check<Value['Type']>, ...checks: Array<SchemaAST.Check<Value['Type']>>) => Codec<Value['Type'], Value['Encoded'], never, never>;
rebuild: (ast: SchemaAST.AST) => Codec<Value['Type'], Value['Encoded'], never, never>;
make: (input: unknown, options?: MakeOptions) => Value['Type'];
makeOption: (input: unknown, options?: MakeOptions) => Option_.Option<Value['Type']>;
makeEffect: (input: unknown, options?: MakeOptions) => Effect.Effect<Value['Type'], SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
value]))
return (input: unknowninput, ast: SchemaAST.Declaration(parameter) ast: {
_tag: 'Declaration';
typeParameters: ReadonlyArray<AST>;
run: (typeParameters: ReadonlyArray<AST>) => (input: unknown, self: Declaration, options: ParseOptions) => Effect.Effect<any, SchemaIssue.Issue, any>;
encodingChecks: Checks | undefined;
getParser: () => SchemaParser.Parser;
_rebuild: (recur: (ast: AST) => AST, checks: Checks | undefined, encodingChecks: Checks | undefined) => Declaration;
recur: (recur: (ast: AST) => AST) => Declaration;
flip: (recur: (ast: AST) => AST) => Declaration;
getExpected: () => string;
annotations: Schema.Annotations.Annotations | undefined;
checks: Checks | undefined;
encoding: Encoding | undefined;
context: Context | undefined;
toString: () => string;
}
ast, options: SchemaAST.ParseOptions(parameter) options: {
errors: "first" | "all" | undefined;
onExcessProperty: "ignore" | "error" | "preserve" | undefined;
propertyOrder: "none" | "original" | undefined;
disableChecks: boolean | undefined;
concurrency: number | "unbounded" | undefined;
}
options) => {
if (import HashMap_HashMap_.isHashMap(input: unknowninput)) {
return import EffectEffect.mapBothEager(
import SchemaParserSchemaParser.function decodeUnknownEffect<
S extends Schema.Constraint
>(
schema: S,
options?: SchemaAST.ParseOptions
): (
input: unknown,
options?: SchemaAST.ParseOptions
) => Effect.Effect<
S["Type"],
SchemaIssue.Issue,
S["DecodingServices"]
>
Creates an effectful decoder for unknown input.
When to use
Use when you need to decode untyped boundary input in an Effect whose
failure channel is SchemaIssue.Issue, while preserving transformations
and service requirements.
Details
The returned function succeeds with the schema's decoded Type or fails with a
SchemaIssue.Issue. Decoding service requirements are preserved in the returned
Effect. Parse options may be provided when creating the decoder and overridden
when applying it.
decodeUnknownEffect(const entries: $Array<
Tuple<
readonly [
Codec<
Key["Type"],
Key["Encoded"],
never,
never
>,
Codec<
Value["Type"],
Value["Encoded"],
never,
never
>
]
>
>
const entries: {
Type: ReadonlyArray<S["Type"]>;
Encoded: ReadonlyArray<S["Encoded"]>;
DecodingServices: S["DecodingServices"];
EncodingServices: S["EncodingServices"];
Iso: ReadonlyArray<S["Iso"]>;
value: S;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Annotations.Bottom<ReadonlyArray<readonly [Key['Type'], Value['Type']]>, readonly []>) => $Array<Tuple<readonly [Codec<Key['Type'], Key['Encoded'], never, never>, Codec<Value['Type'], Value['Encoded'], never, never>]>>;
annotateKey: (annotations: Annotations.Key<ReadonlyArray<readonly [Key['Type'], Value['Type']]>>) => $Array<Tuple<readonly [Codec<Key['Type'], Key['Encoded'], never, never>, Codec<Value['Type'], Value['Encoded'], never, never>]>>;
check: (checks_0: SchemaAST.Check<ReadonlyArray<readonly [Key['Type'], Value['Type']]>>, ...checks: Array<SchemaAST.Check<ReadonlyArray<readonly [Key['Type'], Value['Type']]>>>) => $Array<Tuple<readonly [Codec<Key['Type'], Key['Encoded'], never, …;
rebuild: (ast: SchemaAST.Arrays) => $Array<Tuple<readonly [Codec<Key['Type'], Key['Encoded'], never, never>, Codec<Value['Type'], Value['Encoded'], never, never>]>>;
make: (input: ReadonlyArray<readonly [unknown, unknown]>, options?: MakeOptions) => ReadonlyArray<readonly [Key['Type'], Value['Type']]>;
makeOption: (input: ReadonlyArray<readonly [unknown, unknown]>, options?: MakeOptions) => Option_.Option<ReadonlyArray<readonly [Key['Type'], Value['Type']]>>;
makeEffect: (input: ReadonlyArray<readonly [unknown, unknown]>, options?: MakeOptions) => Effect.Effect<ReadonlyArray<readonly [Key['Type'], Value['Type']]>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
entries)(import HashMap_HashMap_.toEntries(input: HashMap_.HashMap<unknown, unknown>(parameter) input: {
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
input), options: SchemaAST.ParseOptions(parameter) options: {
errors: "first" | "all" | undefined;
onExcessProperty: "ignore" | "error" | "preserve" | undefined;
propertyOrder: "none" | "original" | undefined;
disableChecks: boolean | undefined;
concurrency: number | "unbounded" | undefined;
}
options),
{
onSuccess: <K, V>(
entries: Iterable<readonly [K, V]>
) => HashMap<K, V>
onSuccess: import HashMap_HashMap_.fromIterable,
onFailure: (issue: any) => SchemaIssue.CompositeonFailure: (issue: SchemaIssue.Issueissue) =>
new import SchemaIssueSchemaIssue.constructor Composite(ast: SchemaAST.AST, actual: StandardJSONSchemaV1<unknown>, issues: readonly [SchemaIssue.Issue, ...Array<SchemaIssue.Issue>]): SchemaIssue.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
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(ast: SchemaAST.Declaration(parameter) ast: {
_tag: 'Declaration';
typeParameters: ReadonlyArray<AST>;
run: (typeParameters: ReadonlyArray<AST>) => (input: unknown, self: Declaration, options: ParseOptions) => Effect.Effect<any, SchemaIssue.Issue, any>;
encodingChecks: Checks | undefined;
getParser: () => SchemaParser.Parser;
_rebuild: (recur: (ast: AST) => AST, checks: Checks | undefined, encodingChecks: Checks | undefined) => Declaration;
recur: (recur: (ast: AST) => AST) => Declaration;
flip: (recur: (ast: AST) => AST) => Declaration;
getExpected: () => string;
annotations: Schema.Annotations.Annotations | undefined;
checks: Checks | undefined;
encoding: Encoding | undefined;
context: Context | undefined;
toString: () => string;
}
ast, import Option_Option_.some(input: HashMap_.HashMap<unknown, unknown>(parameter) input: {
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
input), [new import SchemaIssueSchemaIssue.constructor Pointer(path: ReadonlyArray<PropertyKey>, issue: SchemaIssue.Issue): SchemaIssue.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
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(["entries"], issue: SchemaIssue.Issueissue)])
}
)
}
return import EffectEffect.fail(new import SchemaIssueSchemaIssue.constructor InvalidType(ast: SchemaAST.AST, actual: StandardJSONSchemaV1<unknown>): SchemaIssue.InvalidTypeRepresents a schema issue produced when the runtime type of the input does not match the type
expected by the schema (e.g. got null when string was expected).
When to use
Use when you need to detect basic type mismatches, such as a wrong primitive
or null where an object was expected.
Details
ast is the schema node that expected a different type.
actual is Option.some(value) when the input was present, or
Option.none() when no value was provided.
- The default formatter renders this as
"Expected <type>, got <actual>".
Example (Formatting output)
import { Schema } from "effect"
try {
Schema.decodeUnknownSync(Schema.String)(42)
} catch (e) {
if (Schema.isSchemaError(e)) {
console.log(String(e.issue))
// "Expected string, got 42"
}
}
InvalidType(ast: SchemaAST.Declaration(parameter) ast: {
_tag: 'Declaration';
typeParameters: ReadonlyArray<AST>;
run: (typeParameters: ReadonlyArray<AST>) => (input: unknown, self: Declaration, options: ParseOptions) => Effect.Effect<any, SchemaIssue.Issue, any>;
encodingChecks: Checks | undefined;
getParser: () => SchemaParser.Parser;
_rebuild: (recur: (ast: AST) => AST, checks: Checks | undefined, encodingChecks: Checks | undefined) => Declaration;
recur: (recur: (ast: AST) => AST) => Declaration;
flip: (recur: (ast: AST) => AST) => Declaration;
getExpected: () => string;
annotations: Schema.Annotations.Annotations | undefined;
checks: Checks | undefined;
encoding: Encoding | undefined;
context: Context | undefined;
toString: () => string;
}
ast, import Option_Option_.some(input: unknowninput)))
}
},
{
Annotations.Declaration<HashMap_.HashMap<Key["Type"], Value["Type"]>, readonly [Key, Value]>.typeConstructor?: {
readonly [key: string]: unknown;
readonly _tag: string;
} | undefined
typeConstructor: {
_tag: string_tag: "effect/HashMap"
},
Annotations.Declaration<HashMap_.HashMap<Key["Type"], Value["Type"]>, readonly [Key, Value]>.generation?: {
readonly runtime: string;
readonly Type: string;
readonly Encoded?: string | undefined;
readonly importDeclaration?: string | undefined;
} | undefined
generation: {
runtime: stringruntime: `Schema.HashMap(?, ?)`,
type Type: stringType: `HashMap.HashMap<?, ?>`,
importDeclaration?: string | undefinedimportDeclaration: `import * as HashMap from "effect/HashMap"`
},
Annotations.Augment.expected?: string | undefinedHuman-readable description of what a value is expected to satisfy.
Details
For filter and refinement failures, the default formatter uses
message first, then expected, and finally falls back to <filter>.
Use this to name a failed filter in the default message:
Expected <expected>, got <actual>.
expected: "HashMap",
Annotations.Declaration<HashMap_.HashMap<Key["Type"], Value["Type"]>, readonly [Key, Value]>.toCodec?: ((typeParameters: readonly [Codec<Key["Encoded"], Key["Encoded"], never, never>, Codec<Value["Encoded"], Value["Encoded"], never, never>]) => SchemaAST.Link) | undefinedtoCodec: ([key: Codec<
Key["Encoded"],
Key["Encoded"],
never,
never
>
(parameter) key: {
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
Rebuild: Codec<T, E, RD, RE>;
Type: T;
Iso: Iso;
ast: Ast;
annotate: (annotations: Annotations.Bottom<Key['Encoded'], any>) => Codec<Key['Encoded'], Key['Encoded'], never, never>;
annotateKey: (annotations: Annotations.Key<Key['Encoded']>) => Codec<Key['Encoded'], Key['Encoded'], never, never>;
check: (checks_0: SchemaAST.Check<Key['Encoded']>, ...checks: Array<SchemaAST.Check<Key['Encoded']>>) => Codec<Key['Encoded'], Key['Encoded'], never, never>;
rebuild: (ast: SchemaAST.AST) => Codec<Key['Encoded'], Key['Encoded'], never, never>;
make: (input: unknown, options?: MakeOptions) => Key['Encoded'];
makeOption: (input: unknown, options?: MakeOptions) => Option_.Option<Key['Encoded']>;
makeEffect: (input: unknown, options?: MakeOptions) => Effect.Effect<Key['Encoded'], SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
key, value: Codec<
Value["Encoded"],
Value["Encoded"],
never,
never
>
(parameter) value: {
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
Rebuild: Codec<T, E, RD, RE>;
Type: T;
Iso: Iso;
ast: Ast;
annotate: (annotations: Annotations.Bottom<Value['Encoded'], any>) => Codec<Value['Encoded'], Value['Encoded'], never, never>;
annotateKey: (annotations: Annotations.Key<Value['Encoded']>) => Codec<Value['Encoded'], Value['Encoded'], never, never>;
check: (checks_0: SchemaAST.Check<Value['Encoded']>, ...checks: Array<SchemaAST.Check<Value['Encoded']>>) => Codec<Value['Encoded'], Value['Encoded'], never, never>;
rebuild: (ast: SchemaAST.AST) => Codec<Value['Encoded'], Value['Encoded'], never, never>;
make: (input: unknown, options?: MakeOptions) => Value['Encoded'];
makeOption: (input: unknown, options?: MakeOptions) => Option_.Option<Value['Encoded']>;
makeEffect: (input: unknown, options?: MakeOptions) => Effect.Effect<Value['Encoded'], SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
value]) =>
function link<T>(): <
To extends Constraint
>(
encodeTo: To,
transformation: {
readonly decode: SchemaGetter.Getter<
T,
NoInfer<To["Type"]>
>
readonly encode: SchemaGetter.Getter<
NoInfer<To["Type"]>,
T
>
}
) => SchemaAST.Link
Constructs an SchemaAST.Link that describes how a value of type T encodes to and decodes from a To schema.
Used when building low-level AST transformations that bridge two schema types.
link<import HashMap_HashMap_.type HashMap_.HashMap = /*unresolved*/ anyHashMap<function (type parameter) Key in HashMap<Key extends Constraint, Value extends Constraint>(key: Key, value: Value): HashMap<Key, Value>Key["Encoded"], function (type parameter) Value in HashMap<Key extends Constraint, Value extends Constraint>(key: Key, value: Value): HashMap<Key, Value>Value["Encoded"]>>()(
const ArraySchema: ArrayLambda
<Tuple<readonly [Codec<Key["Encoded"], Key["Encoded"], never, never>, Codec<Value["Encoded"], Value["Encoded"], never, never>]>>(self: Tuple<readonly [Codec<Key["Encoded"], Key["Encoded"], never, never>, Codec<Value["Encoded"], Value["Encoded"], never, never>]>) => $Array<Tuple<readonly [Codec<Key["Encoded"], Key["Encoded"], never, never>, Codec<Value["Encoded"], Value["Encoded"], never, never>]>>
ArraySchema(function Tuple<
Elements extends ReadonlyArray<Constraint>
>(elements: Elements): Tuple<Elements>
Defines a fixed-length tuple schema from an array of element schemas.
Example (Defining a pair of string and number)
import { Schema } from "effect"
const schema = Schema.Tuple([Schema.String, Schema.Number])
const pair = Schema.decodeUnknownSync(schema)(["hello", 42])
console.log(pair)
// [ 'hello', 42 ]
Tuple([key: Codec<
Key["Encoded"],
Key["Encoded"],
never,
never
>
(parameter) key: {
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
Rebuild: Codec<T, E, RD, RE>;
Type: T;
Iso: Iso;
ast: Ast;
annotate: (annotations: Annotations.Bottom<Key['Encoded'], any>) => Codec<Key['Encoded'], Key['Encoded'], never, never>;
annotateKey: (annotations: Annotations.Key<Key['Encoded']>) => Codec<Key['Encoded'], Key['Encoded'], never, never>;
check: (checks_0: SchemaAST.Check<Key['Encoded']>, ...checks: Array<SchemaAST.Check<Key['Encoded']>>) => Codec<Key['Encoded'], Key['Encoded'], never, never>;
rebuild: (ast: SchemaAST.AST) => Codec<Key['Encoded'], Key['Encoded'], never, never>;
make: (input: unknown, options?: MakeOptions) => Key['Encoded'];
makeOption: (input: unknown, options?: MakeOptions) => Option_.Option<Key['Encoded']>;
makeEffect: (input: unknown, options?: MakeOptions) => Effect.Effect<Key['Encoded'], SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
key, value: Codec<
Value["Encoded"],
Value["Encoded"],
never,
never
>
(parameter) value: {
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
Rebuild: Codec<T, E, RD, RE>;
Type: T;
Iso: Iso;
ast: Ast;
annotate: (annotations: Annotations.Bottom<Value['Encoded'], any>) => Codec<Value['Encoded'], Value['Encoded'], never, never>;
annotateKey: (annotations: Annotations.Key<Value['Encoded']>) => Codec<Value['Encoded'], Value['Encoded'], never, never>;
check: (checks_0: SchemaAST.Check<Value['Encoded']>, ...checks: Array<SchemaAST.Check<Value['Encoded']>>) => Codec<Value['Encoded'], Value['Encoded'], never, never>;
rebuild: (ast: SchemaAST.AST) => Codec<Value['Encoded'], Value['Encoded'], never, never>;
make: (input: unknown, options?: MakeOptions) => Value['Encoded'];
makeOption: (input: unknown, options?: MakeOptions) => Option_.Option<Value['Encoded']>;
makeEffect: (input: unknown, options?: MakeOptions) => Effect.Effect<Value['Encoded'], SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
value])),
import SchemaTransformationSchemaTransformation.function transform<T, E>(options: {
readonly decode: (input: E) => T
readonly encode: (input: T) => E
}): Transformation<T, E>
Creates a Transformation from pure (sync, infallible) decode and encode
functions.
When to use
Use when you need an infallible schema transformation that does not require
Effect services.
Details
- Each function receives the input and returns the output directly.
- Skips
None inputs (missing keys) — functions are only called on present values.
- Does not allocate Effects internally; uses optimized sync path.
Example (Converting between cents and dollars)
import { Schema, SchemaTransformation } from "effect"
const CentsFromDollars = Schema.Number.pipe(
Schema.decodeTo(
Schema.Number,
SchemaTransformation.transform({
decode: (dollars) => dollars * 100,
encode: (cents) => cents / 100
})
)
)
transform({
decode: <K, V>(
entries: Iterable<readonly [K, V]>
) => HashMap<K, V>
decode: import HashMap_HashMap_.fromIterable,
encode: <K, V>(
self: HashMap<K, V>
) => Array<[K, V]>
encode: import HashMap_HashMap_.toEntries
})
),
Annotations.Declaration<HashMap_.HashMap<Key["Type"], Value["Type"]>, readonly [Key, Value]>.toArbitrary?: Annotations.ToArbitrary.Declaration<HashMap_.HashMap<Key["Type"], Value["Type"]>, readonly [Key, Value]> | undefinedtoArbitrary: ([key: Annotations.ToArbitrary.TypeParameter<
Key["Type"]
>
(parameter) key: {
arbitrary: FastCheck.Arbitrary<T>;
terminal: FastCheck.Arbitrary<T> | undefined;
}
key, value: Annotations.ToArbitrary.TypeParameter<
Value["Type"]
>
(parameter) value: {
arbitrary: FastCheck.Arbitrary<T>;
terminal: FastCheck.Arbitrary<T> | undefined;
}
value]) => (fc: typeof FastCheckfc, ctx: Annotations.ToArbitrary.Context(parameter) ctx: {
constraint: ToArbitrary.GenerationConstraint | undefined;
recursion: ToArbitrary.Recursion | undefined;
}
ctx) => function entriesArbitrary<Key["Type"], Value["Type"], unknown>(fc: typeof FastCheck, ctx: Annotations.ToArbitrary.Context, key: Annotations.ToArbitrary.TypeParameter<Key["Type"]>, value: Annotations.ToArbitrary.TypeParameter<Value["Type"]>, fromIterable: (items: [Key["Type"], Value["Type"]][]) => unknown): {
arbitrary: any;
terminal: any;
}
entriesArbitrary(fc: typeof FastCheckfc, ctx: Annotations.ToArbitrary.Context(parameter) ctx: {
constraint: ToArbitrary.GenerationConstraint | undefined;
recursion: ToArbitrary.Recursion | undefined;
}
ctx, key: Annotations.ToArbitrary.TypeParameter<
Key["Type"]
>
(parameter) key: {
arbitrary: FastCheck.Arbitrary<T>;
terminal: FastCheck.Arbitrary<T> | undefined;
}
key, value: Annotations.ToArbitrary.TypeParameter<
Value["Type"]
>
(parameter) value: {
arbitrary: FastCheck.Arbitrary<T>;
terminal: FastCheck.Arbitrary<T> | undefined;
}
value, import HashMap_HashMap_.fromIterable),
Annotations.Declaration<HashMap_.HashMap<Key["Type"], Value["Type"]>, readonly [Key, Value]>.toEquivalence?: Annotations.ToEquivalence.Declaration<HashMap_.HashMap<Key["Type"], Value["Type"]>, readonly [Key, Value]> | undefinedtoEquivalence: ([key: Equivalence.Equivalence<Key["Type"]>key, value: Equivalence.Equivalence<Value["Type"]>value]) => import EqualEqual.makeCompareMap(key: Equivalence.Equivalence<Key["Type"]>key, value: Equivalence.Equivalence<Value["Type"]>value),
Annotations.Declaration<HashMap_.HashMap<Key["Type"], Value["Type"]>, readonly [Key, Value]>.toFormatter?: Annotations.ToFormatter.Declaration<HashMap_.HashMap<Key["Type"], Value["Type"]>, readonly [Key, Value]> | undefinedtoFormatter: ([key: Formatter<Key["Type"], string>key, value: Formatter<Value["Type"], string>value]) => (t: HashMap_.HashMap<
Key["Type"],
Value["Type"]
>
(parameter) t: {
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
t) => {
const const size: anysize = import HashMap_HashMap_.size(t: HashMap_.HashMap<
Key["Type"],
Value["Type"]
>
(parameter) t: {
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
t)
if (const size: anysize === 0) {
return "HashMap(0) {}"
}
const const entries: anyentries = import HashMap_HashMap_.toEntries(t: HashMap_.HashMap<
Key["Type"],
Value["Type"]
>
(parameter) t: {
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
t).sort().map(([k: anyk, v: anyv]) => `${key: Formatter<Key["Type"], string>key(k: anyk)} => ${value: Formatter<Value["Type"], string>value(v: anyv)}`)
return `HashMap(${const size: anysize}) { ${const entries: anyentries.join(", ")} }`
}
}
)
return const make: <S extends Constraint>(
ast: S["ast"],
options?: object
) => S
Creates a schema from an AST (Abstract Syntax Tree) node.
Details
This is the fundamental constructor for all schemas in the Effect Schema
library. It takes an AST node and wraps it in a fully-typed schema that
preserves all type information and provides the complete schema API.
The make function is used internally to create all primitive schemas like
String, Number, Boolean, etc., as well as more complex schemas. It's
the bridge between the untyped AST representation and the strongly-typed
schema.
make(const schema: declareConstructor<
HashMap_.HashMap<Key["Type"], Value["Type"]>,
HashMap_.HashMap<
Key["Encoded"],
Value["Encoded"]
>,
readonly [Key, Value],
HashMapIso<Key, Value>
>
const schema: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Annotations.Bottom<HashMap_.HashMap<Key['Type'], Value['Type']>, readonly [Key, Value]>) => declareConstructor<HashMap_.HashMap<Key['Type'], Value['Type']>, HashMap_.HashMap<Key['Encoded'], Value['Encoded']>, readonly [Key, V…;
annotateKey: (annotations: Annotations.Key<HashMap_.HashMap<Key['Type'], Value['Type']>>) => declareConstructor<HashMap_.HashMap<Key['Type'], Value['Type']>, HashMap_.HashMap<Key['Encoded'], Value['Encoded']>, readonly [Key, Value], HashMapIso<Key, Val…;
check: (checks_0: SchemaAST.Check<HashMap_.HashMap<Key['Type'], Value['Type']>>, ...checks: Array<SchemaAST.Check<HashMap_.HashMap<Key['Type'], Value['Type']>>>) => declareConstructor<HashMap_.HashMap<Key['Type'], Value['Type']>, HashMap_.HashMap…;
rebuild: (ast: SchemaAST.Declaration) => declareConstructor<HashMap_.HashMap<Key['Type'], Value['Type']>, HashMap_.HashMap<Key['Encoded'], Value['Encoded']>, readonly [Key, Value], HashMapIso<Key, Value>>;
make: (input: HashMap_.HashMap<Key['Type'], Value['Type']>, options?: MakeOptions) => HashMap_.HashMap<Key['Type'], Value['Type']>;
makeOption: (input: HashMap_.HashMap<Key['Type'], Value['Type']>, options?: MakeOptions) => Option_.Option<HashMap_.HashMap<Key['Type'], Value['Type']>>;
makeEffect: (input: HashMap_.HashMap<Key['Type'], Value['Type']>, options?: MakeOptions) => Effect.Effect<HashMap_.HashMap<Key['Type'], Value['Type']>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
schema.Bottom<HashMap_.HashMap<Key["Type"], Value["Type"]>, HashMap_.HashMap<Key["Encoded"], Value["Encoded"]>, (Key | Value)["DecodingServices"], (Key | Value)["EncodingServices"], ... 10 more ..., "required">["ast"]: SchemaAST.Declaration(property) Bottom<HashMap_.HashMap<Key["Type"], Value["Type"]>, HashMap_.HashMap<Key["Encoded"], Value["Encoded"]>, (Key | Value)["DecodingServices"], (Key | Value)["EncodingServices"], ... 10 more ..., "required">["ast"]: {
_tag: 'Declaration';
typeParameters: ReadonlyArray<AST>;
run: (typeParameters: ReadonlyArray<AST>) => (input: unknown, self: Declaration, options: ParseOptions) => Effect.Effect<any, SchemaIssue.Issue, any>;
encodingChecks: Checks | undefined;
getParser: () => SchemaParser.Parser;
_rebuild: (recur: (ast: AST) => AST, checks: Checks | undefined, encodingChecks: Checks | undefined) => Declaration;
recur: (recur: (ast: AST) => AST) => Declaration;
flip: (recur: (ast: AST) => AST) => Declaration;
getExpected: () => string;
annotations: Schema.Annotations.Annotations | undefined;
checks: Checks | undefined;
encoding: Encoding | undefined;
context: Context | undefined;
toString: () => string;
}
ast, { key: Key extends Constraintkey, value: Value extends Constraintvalue })
}