Tree<Node>Creates a recursive schema for a Tree of values described by node.
The resulting schema accepts a single node value, an array of trees, or an
object whose values are trees.
export type type Tree<Node> =
| Node
| TreeRecord<Node>
| readonly Tree<Node>[]
Creates a recursive schema for a
Tree
of values described by node.
The resulting schema accepts a single node value, an array of trees, or an
object whose values are trees.
Recursive tree type whose leaves are Node values and whose branches are
readonly arrays or string-keyed records of child trees.
Tree<function (type parameter) Node in type Tree<Node>Node> = function (type parameter) Node in type Tree<Node>Node | interface TreeRecord<A>A record node in a
Tree
: an object mapping string keys to child
Tree nodes.
TreeRecord<function (type parameter) Node in type Tree<Node>Node> | interface ReadonlyArray<T>ReadonlyArray<type Tree<Node> =
| Node
| TreeRecord<Node>
| readonly Tree<Node>[]
Creates a recursive schema for a
Tree
of values described by node.
The resulting schema accepts a single node value, an array of trees, or an
object whose values are trees.
Recursive tree type whose leaves are Node values and whose branches are
readonly arrays or string-keyed records of child trees.
Tree<function (type parameter) Node in type Tree<Node>Node>>
/**
* A record node in a {@link Tree}: an object mapping string keys to child
* `Tree` nodes.
*
* @category Tree
* @since 4.0.0
*/
export interface interface TreeRecord<A>A record node in a
Tree
: an object mapping string keys to child
Tree nodes.
TreeRecord<function (type parameter) A in TreeRecord<A>A> {
readonly [x: stringx: string]: type Tree<Node> =
| Node
| TreeRecord<Node>
| readonly Tree<Node>[]
Creates a recursive schema for a
Tree
of values described by node.
The resulting schema accepts a single node value, an array of trees, or an
object whose values are trees.
Recursive tree type whose leaves are Node values and whose branches are
readonly arrays or string-keyed records of child trees.
Tree<function (type parameter) A in TreeRecord<A>A>
}
/**
* Creates a recursive schema for a {@link Tree} of values described by `node`.
* The resulting schema accepts a single node value, an array of trees, or an
* object whose values are trees.
*
* @category Tree
* @since 4.0.0
*/
export function function Tree<S extends Constraint>(
node: S
): Union<
readonly [
S,
$Array<
suspend<
Codec<
Tree<S["Type"]>,
Tree<S["Encoded"]>,
S["DecodingServices"],
S["EncodingServices"]
>
>
>,
$Record<
String,
suspend<
Codec<
Tree<S["Type"]>,
Tree<S["Encoded"]>,
S["DecodingServices"],
S["EncodingServices"]
>
>
>
]
>
Creates a recursive schema for a
Tree
of values described by node.
The resulting schema accepts a single node value, an array of trees, or an
object whose values are trees.
Tree<function (type parameter) S in Tree<S extends Constraint>(node: S): Union<readonly [S, $Array<suspend<Codec<Tree<S["Type"]>, Tree<S["Encoded"]>, S["DecodingServices"], S["EncodingServices"]>>>, $Record<...>]>S extends Constraint>(node: S extends Constraintnode: function (type parameter) S in Tree<S extends Constraint>(node: S): Union<readonly [S, $Array<suspend<Codec<Tree<S["Type"]>, Tree<S["Encoded"]>, S["DecodingServices"], S["EncodingServices"]>>>, $Record<...>]>S) {
const const Tree$ref: suspend<
Codec<
Tree<S["Type"]>,
Tree<S["Encoded"]>,
S["DecodingServices"],
S["EncodingServices"]
>
>
const Tree$ref: {
Type: S["Type"];
Encoded: S["Encoded"];
DecodingServices: S["DecodingServices"];
EncodingServices: S["EncodingServices"];
Iso: S["Iso"];
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Annotations.Bottom<Tree<S['Type']>, any>) => suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServices']>>;
annotateKey: (annotations: Annotations.Key<Tree<S['Type']>>) => suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServices']>>;
check: (checks_0: SchemaAST.Check<Tree<S['Type']>>, ...checks: Array<SchemaAST.Check<Tree<S['Type']>>>) => suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServices']>>;
rebuild: (ast: SchemaAST.Suspend) => suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServices']>>;
make: (input: unknown, options?: MakeOptions) => Tree<S['Type']>;
makeOption: (input: unknown, options?: MakeOptions) => Option_.Option<Tree<S['Type']>>;
makeEffect: (input: unknown, options?: MakeOptions) => Effect.Effect<Tree<S['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; <…;
}
Tree$ref = function suspend<S extends Constraint>(
f: () => S
): suspend<S>
Creates a suspended schema that defers evaluation until needed. This is
essential for creating recursive schemas where a schema references itself,
preventing infinite recursion during schema definition.
Example (Defining recursive tree schemas)
import { Schema } from "effect"
interface Tree {
readonly value: number
readonly children: ReadonlyArray<Tree>
}
const Tree = Schema.Struct({
value: Schema.Number,
children: Schema.Array(Schema.suspend((): Schema.Codec<Tree> => Tree))
})
suspend((): interface Codec<out T, out E = T, out RD = never, out RE = never>Namespace of type-level helpers for
Codec
.
A schema that tracks the decoded type T, the encoded type E, and the
Effect services required during decoding (RD) and encoding (RE).
Details
Use Codec<T, E, RD, RE> when you need to preserve full type information
about a schema — both what it decodes to and what it serializes from/to.
Most concrete schemas produced by this module implement Codec.
For APIs that only need one direction, prefer the narrower views:
Decoder
<T, RD> — decode-only
Encoder
<E, RE> — encode-only
Schema
<T> — type-only (no encoded representation)
Example (Accepting a codec that decodes to number from string)
import { Schema } from "effect"
declare function serialize<T>(codec: Schema.Codec<T, string>): string
serialize(Schema.NumberFromString) // ok — decodes number, encoded as string
Codec<
type Tree<Node> =
| Node
| TreeRecord<Node>
| readonly Tree<Node>[]
Creates a recursive schema for a
Tree
of values described by node.
The resulting schema accepts a single node value, an array of trees, or an
object whose values are trees.
Recursive tree type whose leaves are Node values and whose branches are
readonly arrays or string-keyed records of child trees.
Tree<function (type parameter) S in Tree<S extends Constraint>(node: S): Union<readonly [S, $Array<suspend<Codec<Tree<S["Type"]>, Tree<S["Encoded"]>, S["DecodingServices"], S["EncodingServices"]>>>, $Record<...>]>S["Type"]>,
type Tree<Node> =
| Node
| TreeRecord<Node>
| readonly Tree<Node>[]
Creates a recursive schema for a
Tree
of values described by node.
The resulting schema accepts a single node value, an array of trees, or an
object whose values are trees.
Recursive tree type whose leaves are Node values and whose branches are
readonly arrays or string-keyed records of child trees.
Tree<function (type parameter) S in Tree<S extends Constraint>(node: S): Union<readonly [S, $Array<suspend<Codec<Tree<S["Type"]>, Tree<S["Encoded"]>, S["DecodingServices"], S["EncodingServices"]>>>, $Record<...>]>S["Encoded"]>,
function (type parameter) S in Tree<S extends Constraint>(node: S): Union<readonly [S, $Array<suspend<Codec<Tree<S["Type"]>, Tree<S["Encoded"]>, S["DecodingServices"], S["EncodingServices"]>>>, $Record<...>]>S["DecodingServices"],
function (type parameter) S in Tree<S extends Constraint>(node: S): Union<readonly [S, $Array<suspend<Codec<Tree<S["Type"]>, Tree<S["Encoded"]>, S["DecodingServices"], S["EncodingServices"]>>>, $Record<...>]>S["EncodingServices"]
> => const Tree: Union<
readonly [
S,
$Array<
suspend<
Codec<
Tree<S["Type"]>,
Tree<S["Encoded"]>,
S["DecodingServices"],
S["EncodingServices"]
>
>
>,
$Record<
String,
suspend<
Codec<
Tree<S["Type"]>,
Tree<S["Encoded"]>,
S["DecodingServices"],
S["EncodingServices"]
>
>
>
]
>
const Tree: {
Type: { [K in keyof Members]: Members[K]["Type"]; }[number];
Encoded: { [K in keyof Members]: Members[K]["Encoded"]; }[number];
DecodingServices: { [K in keyof Members]: Members[K]["DecodingServices"]; }[number];
EncodingServices: { [K in keyof Members]: Members[K]["EncodingServices"]; }[number];
Iso: { [K in keyof Members]: Members[K]["Iso"]; }[number];
members: Members;
mapMembers: (f: (members: readonly [S, $Array<suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServices']>>>, $Record<String, suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServ…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Annotations.Bottom<S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['Type']>; }, readonly []>) => Union<readonly [S, $Array<suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], …;
annotateKey: (annotations: Annotations.Key<S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['Type']> }>) => Union<readonly [S, $Array<suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServic…;
check: (checks_0: SchemaAST.Check<S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['Type']> }>, ...checks: Array<SchemaAST.Check<S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['Type']> }>>) …;
rebuild: (ast: SchemaAST.Union<SchemaAST.Arrays | SchemaAST.Objects | S['ast']>) => Union<readonly [S, $Array<suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServices']>>>, $Record<String, suspend<Codec<Tree<S['…;
make: (input: ReadonlyArray<unknown> | S['~type.make'] | { readonly [x: string]: unknown }, options?: MakeOptions) => S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['Type']> };
makeOption: (input: ReadonlyArray<unknown> | S['~type.make'] | { readonly [x: string]: unknown }, options?: MakeOptions) => Option_.Option<S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['Type']> }>;
makeEffect: (input: ReadonlyArray<unknown> | S['~type.make'] | { readonly [x: string]: unknown }, options?: MakeOptions) => Effect.Effect<S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['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; <…;
}
Tree)
const const Tree: Union<
readonly [
S,
$Array<
suspend<
Codec<
Tree<S["Type"]>,
Tree<S["Encoded"]>,
S["DecodingServices"],
S["EncodingServices"]
>
>
>,
$Record<
String,
suspend<
Codec<
Tree<S["Type"]>,
Tree<S["Encoded"]>,
S["DecodingServices"],
S["EncodingServices"]
>
>
>
]
>
const Tree: {
Type: { [K in keyof Members]: Members[K]["Type"]; }[number];
Encoded: { [K in keyof Members]: Members[K]["Encoded"]; }[number];
DecodingServices: { [K in keyof Members]: Members[K]["DecodingServices"]; }[number];
EncodingServices: { [K in keyof Members]: Members[K]["EncodingServices"]; }[number];
Iso: { [K in keyof Members]: Members[K]["Iso"]; }[number];
members: Members;
mapMembers: (f: (members: readonly [S, $Array<suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServices']>>>, $Record<String, suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServ…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Annotations.Bottom<S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['Type']>; }, readonly []>) => Union<readonly [S, $Array<suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], …;
annotateKey: (annotations: Annotations.Key<S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['Type']> }>) => Union<readonly [S, $Array<suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServic…;
check: (checks_0: SchemaAST.Check<S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['Type']> }>, ...checks: Array<SchemaAST.Check<S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['Type']> }>>) …;
rebuild: (ast: SchemaAST.Union<SchemaAST.Arrays | SchemaAST.Objects | S['ast']>) => Union<readonly [S, $Array<suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServices']>>>, $Record<String, suspend<Codec<Tree<S['…;
make: (input: ReadonlyArray<unknown> | S['~type.make'] | { readonly [x: string]: unknown }, options?: MakeOptions) => S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['Type']> };
makeOption: (input: ReadonlyArray<unknown> | S['~type.make'] | { readonly [x: string]: unknown }, options?: MakeOptions) => Option_.Option<S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['Type']> }>;
makeEffect: (input: ReadonlyArray<unknown> | S['~type.make'] | { readonly [x: string]: unknown }, options?: MakeOptions) => Effect.Effect<S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['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; <…;
}
Tree = function Union<
Members extends ReadonlyArray<Constraint>
>(
members: Members,
options?: { mode?: "anyOf" | "oneOf" }
): Union<Members>
Creates a union schema from an array of member schemas. Members are tested in
order; the first match is returned.
Details
Optionally, specify mode:
"anyOf" (default) — matches if any member matches.
"oneOf" — matches if exactly one member matches.
Example (Defining a string or number union)
import { Schema } from "effect"
const schema = Schema.Union([Schema.String, Schema.Number])
Schema.decodeUnknownSync(schema)("hello") // "hello"
Schema.decodeUnknownSync(schema)(42) // 42
Union([
node: S extends Constraintnode,
const ArraySchema: ArrayLambda
<suspend<Codec<Tree<S["Type"]>, Tree<S["Encoded"]>, S["DecodingServices"], S["EncodingServices"]>>>(self: suspend<Codec<Tree<S["Type"]>, Tree<S["Encoded"]>, S["DecodingServices"], S["EncodingServices"]>>) => $Array<suspend<Codec<Tree<S["Type"]>, Tree<S["Encoded"]>, S["DecodingServices"], S["EncodingServices"]>>>
ArraySchema(const Tree$ref: suspend<
Codec<
Tree<S["Type"]>,
Tree<S["Encoded"]>,
S["DecodingServices"],
S["EncodingServices"]
>
>
const Tree$ref: {
Type: S["Type"];
Encoded: S["Encoded"];
DecodingServices: S["DecodingServices"];
EncodingServices: S["EncodingServices"];
Iso: S["Iso"];
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Annotations.Bottom<Tree<S['Type']>, any>) => suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServices']>>;
annotateKey: (annotations: Annotations.Key<Tree<S['Type']>>) => suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServices']>>;
check: (checks_0: SchemaAST.Check<Tree<S['Type']>>, ...checks: Array<SchemaAST.Check<Tree<S['Type']>>>) => suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServices']>>;
rebuild: (ast: SchemaAST.Suspend) => suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServices']>>;
make: (input: unknown, options?: MakeOptions) => Tree<S['Type']>;
makeOption: (input: unknown, options?: MakeOptions) => Option_.Option<Tree<S['Type']>>;
makeEffect: (input: unknown, options?: MakeOptions) => Effect.Effect<Tree<S['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; <…;
}
Tree$ref),
function Record<
Key extends Record.Key,
Value extends Constraint
>(
key: Key,
value: Value,
options?: {
readonly keyValueCombiner: {
readonly decode?:
| Combiner.Combiner<
readonly [Key["Type"], Value["Type"]]
>
| undefined
readonly encode?:
| Combiner.Combiner<
readonly [
Key["Encoded"],
Value["Encoded"]
]
>
| undefined
}
}
): $Record<Key, Value>
Defines a record schema whose dynamic properties are selected by a key schema
and decoded with a value schema.
Details
For dynamic keys, the key schema selects matching own properties and the
value schema decodes or encodes only those selected properties. Checks on
string, number, symbol, and template literal key schemas narrow which
properties are selected.
For transformed key schemas, property selection is based on encoded property
names before the selected key is decoded.
Example (Defining a string-keyed record of numbers)
import { Schema } from "effect"
const schema = Schema.Record(Schema.String, Schema.Number)
// { readonly [x: string]: number }
type R = typeof schema.Type
const result = Schema.decodeUnknownSync(schema)({ a: 1, b: 2 })
console.log(result)
// { a: 1, b: 2 }
Record(const String: Stringconst String: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Annotations.Bottom<string, readonly []>) => String;
annotateKey: (annotations: Annotations.Key<string>) => String;
check: (checks_0: SchemaAST.Check<string>, ...checks: Array<SchemaAST.Check<string>>) => String;
rebuild: (ast: SchemaAST.String) => String;
make: (input: string, options?: MakeOptions) => string;
makeOption: (input: string, options?: MakeOptions) => Option_.Option<string>;
makeEffect: (input: string, options?: MakeOptions) => Effect.Effect<string, 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; <…;
}
Type-level representation of
String
.
Schema for string values. Validates that the input is typeof "string".
String, const Tree$ref: suspend<
Codec<
Tree<S["Type"]>,
Tree<S["Encoded"]>,
S["DecodingServices"],
S["EncodingServices"]
>
>
const Tree$ref: {
Type: S["Type"];
Encoded: S["Encoded"];
DecodingServices: S["DecodingServices"];
EncodingServices: S["EncodingServices"];
Iso: S["Iso"];
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Annotations.Bottom<Tree<S['Type']>, any>) => suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServices']>>;
annotateKey: (annotations: Annotations.Key<Tree<S['Type']>>) => suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServices']>>;
check: (checks_0: SchemaAST.Check<Tree<S['Type']>>, ...checks: Array<SchemaAST.Check<Tree<S['Type']>>>) => suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServices']>>;
rebuild: (ast: SchemaAST.Suspend) => suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServices']>>;
make: (input: unknown, options?: MakeOptions) => Tree<S['Type']>;
makeOption: (input: unknown, options?: MakeOptions) => Option_.Option<Tree<S['Type']>>;
makeEffect: (input: unknown, options?: MakeOptions) => Effect.Effect<Tree<S['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; <…;
}
Tree$ref)
])
return const Tree: Union<
readonly [
S,
$Array<
suspend<
Codec<
Tree<S["Type"]>,
Tree<S["Encoded"]>,
S["DecodingServices"],
S["EncodingServices"]
>
>
>,
$Record<
String,
suspend<
Codec<
Tree<S["Type"]>,
Tree<S["Encoded"]>,
S["DecodingServices"],
S["EncodingServices"]
>
>
>
]
>
const Tree: {
Type: { [K in keyof Members]: Members[K]["Type"]; }[number];
Encoded: { [K in keyof Members]: Members[K]["Encoded"]; }[number];
DecodingServices: { [K in keyof Members]: Members[K]["DecodingServices"]; }[number];
EncodingServices: { [K in keyof Members]: Members[K]["EncodingServices"]; }[number];
Iso: { [K in keyof Members]: Members[K]["Iso"]; }[number];
members: Members;
mapMembers: (f: (members: readonly [S, $Array<suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServices']>>>, $Record<String, suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServ…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Annotations.Bottom<S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['Type']>; }, readonly []>) => Union<readonly [S, $Array<suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], …;
annotateKey: (annotations: Annotations.Key<S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['Type']> }>) => Union<readonly [S, $Array<suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServic…;
check: (checks_0: SchemaAST.Check<S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['Type']> }>, ...checks: Array<SchemaAST.Check<S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['Type']> }>>) …;
rebuild: (ast: SchemaAST.Union<SchemaAST.Arrays | SchemaAST.Objects | S['ast']>) => Union<readonly [S, $Array<suspend<Codec<Tree<S['Type']>, Tree<S['Encoded']>, S['DecodingServices'], S['EncodingServices']>>>, $Record<String, suspend<Codec<Tree<S['…;
make: (input: ReadonlyArray<unknown> | S['~type.make'] | { readonly [x: string]: unknown }, options?: MakeOptions) => S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['Type']> };
makeOption: (input: ReadonlyArray<unknown> | S['~type.make'] | { readonly [x: string]: unknown }, options?: MakeOptions) => Option_.Option<S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['Type']> }>;
makeEffect: (input: ReadonlyArray<unknown> | S['~type.make'] | { readonly [x: string]: unknown }, options?: MakeOptions) => Effect.Effect<S['Type'] | ReadonlyArray<Tree<S['Type']>> | { readonly [x: string]: Tree<S['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; <…;
}
Tree
}