HashSet<Value>Schema for hash sets whose values conform to the provided element schema.
export interface interface HashSet<Value extends Constraint>Schema for hash sets whose values conform to the provided element schema.
Type-level representation returned by
HashSet
.
HashSet<function (type parameter) Value in HashSet<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 HashSet_HashSet_.interface HashSet<out Value>A HashSet is an immutable set data structure that provides efficient storage
and retrieval of unique values. It uses a HashMap internally for optimal performance.
Example (Creating and updating a HashSet)
import { HashSet } from "effect"
// Create a HashSet
const set = HashSet.make("apple", "banana", "cherry")
// Check membership
console.log(HashSet.has(set, "apple")) // true
console.log(HashSet.has(set, "grape")) // false
// Add values (returns new HashSet)
const updated = HashSet.add(set, "grape")
console.log(HashSet.size(updated)) // 4
// Remove values (returns new HashSet)
const smaller = HashSet.remove(set, "banana")
console.log(HashSet.size(smaller)) // 2
The HashSet namespace contains type-level utilities and helper types
for working with HashSet instances.
Example (Extracting value types from a HashSet)
import { HashSet } from "effect"
// Create a concrete HashSet for type extraction
const fruits = HashSet.make("apple", "banana", "cherry")
// Extract the value type for reuse
type Fruit = HashSet.HashSet.Value<typeof fruits> // string
// Use extracted type in functions
const processFruit = (fruit: Fruit) => {
return `Processing ${fruit}`
}
HashSet<function (type parameter) Value in HashSet<Value extends Constraint>Value["Type"]>,
import HashSet_HashSet_.interface HashSet<out Value>A HashSet is an immutable set data structure that provides efficient storage
and retrieval of unique values. It uses a HashMap internally for optimal performance.
Example (Creating and updating a HashSet)
import { HashSet } from "effect"
// Create a HashSet
const set = HashSet.make("apple", "banana", "cherry")
// Check membership
console.log(HashSet.has(set, "apple")) // true
console.log(HashSet.has(set, "grape")) // false
// Add values (returns new HashSet)
const updated = HashSet.add(set, "grape")
console.log(HashSet.size(updated)) // 4
// Remove values (returns new HashSet)
const smaller = HashSet.remove(set, "banana")
console.log(HashSet.size(smaller)) // 2
The HashSet namespace contains type-level utilities and helper types
for working with HashSet instances.
Example (Extracting value types from a HashSet)
import { HashSet } from "effect"
// Create a concrete HashSet for type extraction
const fruits = HashSet.make("apple", "banana", "cherry")
// Extract the value type for reuse
type Fruit = HashSet.HashSet.Value<typeof fruits> // string
// Use extracted type in functions
const processFruit = (fruit: Fruit) => {
return `Processing ${fruit}`
}
HashSet<function (type parameter) Value in HashSet<Value extends Constraint>Value["Encoded"]>,
readonly [function (type parameter) Value in HashSet<Value extends Constraint>Value],
type HashSetIso<
Value extends Constraint
> = readonly Value["Iso"][]
Iso representation used for HashSet schemas: an array of element values
using the element schema's Iso type.
HashSetIso<function (type parameter) Value in HashSet<Value extends Constraint>Value>
>
{
readonly "Rebuild": interface HashSet<Value extends Constraint>Schema for hash sets whose values conform to the provided element schema.
Type-level representation returned by
HashSet
.
HashSet<function (type parameter) Value in HashSet<Value extends Constraint>Value>
readonly HashSet<Value extends Constraint>.value: Value extends Constraintvalue: function (type parameter) Value in HashSet<Value extends Constraint>Value
}
/**
* Iso representation used for `HashSet` schemas: an array of element values
* using the element schema's `Iso` type.
*
* @category HashSet
* @since 4.0.0
*/
export type type HashSetIso<
Value extends Constraint
> = readonly Value["Iso"][]
Iso representation used for HashSet schemas: an array of element values
using the element schema's Iso type.
HashSetIso<function (type parameter) Value in type HashSetIso<Value extends Constraint>Value extends Constraint> = interface ReadonlyArray<T>ReadonlyArray<function (type parameter) Value in type HashSetIso<Value extends Constraint>Value["Iso"]>
/**
* Schema for hash sets whose values conform to the provided element schema.
*
* @category HashSet
* @since 3.10.0
*/
export function function HashSet<
Value extends Constraint
>(value: Value): HashSet<Value>
Schema for hash sets whose values conform to the provided element schema.
HashSet<function (type parameter) Value in HashSet<Value extends Constraint>(value: Value): HashSet<Value>Value extends Constraint>(value: Value extends Constraintvalue: function (type parameter) Value in HashSet<Value extends Constraint>(value: Value): HashSet<Value>Value): interface HashSet<Value extends Constraint>Schema for hash sets whose values conform to the provided element schema.
Type-level representation returned by
HashSet
.
HashSet<function (type parameter) Value in HashSet<Value extends Constraint>(value: Value): HashSet<Value>Value> {
const const schema: declareConstructor<
HashSet_.HashSet<Value["Type"]>,
HashSet_.HashSet<Value["Encoded"]>,
readonly [Value],
HashSetIso<Value>
>
const schema: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Annotations.Bottom<HashSet_.HashSet<Value['Type']>, readonly [Value]>) => declareConstructor<HashSet_.HashSet<Value['Type']>, HashSet_.HashSet<Value['Encoded']>, readonly [Value], HashSetIso<Value>>;
annotateKey: (annotations: Annotations.Key<HashSet_.HashSet<Value['Type']>>) => declareConstructor<HashSet_.HashSet<Value['Type']>, HashSet_.HashSet<Value['Encoded']>, readonly [Value], HashSetIso<Value>>;
check: (checks_0: SchemaAST.Check<HashSet_.HashSet<Value['Type']>>, ...checks: Array<SchemaAST.Check<HashSet_.HashSet<Value['Type']>>>) => declareConstructor<HashSet_.HashSet<Value['Type']>, HashSet_.HashSet<Value['Encoded']>, readonly [Value], H…;
rebuild: (ast: SchemaAST.Declaration) => declareConstructor<HashSet_.HashSet<Value['Type']>, HashSet_.HashSet<Value['Encoded']>, readonly [Value], HashSetIso<Value>>;
make: (input: HashSet_.HashSet<Value['Type']>, options?: MakeOptions) => HashSet_.HashSet<Value['Type']>;
makeOption: (input: HashSet_.HashSet<Value['Type']>, options?: MakeOptions) => Option_.Option<HashSet_.HashSet<Value['Type']>>;
makeEffect: (input: HashSet_.HashSet<Value['Type']>, options?: MakeOptions) => Effect.Effect<HashSet_.HashSet<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 HashSet_HashSet_.interface HashSet<out Value>A HashSet is an immutable set data structure that provides efficient storage
and retrieval of unique values. It uses a HashMap internally for optimal performance.
Example (Creating and updating a HashSet)
import { HashSet } from "effect"
// Create a HashSet
const set = HashSet.make("apple", "banana", "cherry")
// Check membership
console.log(HashSet.has(set, "apple")) // true
console.log(HashSet.has(set, "grape")) // false
// Add values (returns new HashSet)
const updated = HashSet.add(set, "grape")
console.log(HashSet.size(updated)) // 4
// Remove values (returns new HashSet)
const smaller = HashSet.remove(set, "banana")
console.log(HashSet.size(smaller)) // 2
The HashSet namespace contains type-level utilities and helper types
for working with HashSet instances.
Example (Extracting value types from a HashSet)
import { HashSet } from "effect"
// Create a concrete HashSet for type extraction
const fruits = HashSet.make("apple", "banana", "cherry")
// Extract the value type for reuse
type Fruit = HashSet.HashSet.Value<typeof fruits> // string
// Use extracted type in functions
const processFruit = (fruit: Fruit) => {
return `Processing ${fruit}`
}
HashSet<function (type parameter) Value in HashSet<Value extends Constraint>(value: Value): HashSet<Value>Value["Type"]>,
import HashSet_HashSet_.interface HashSet<out Value>A HashSet is an immutable set data structure that provides efficient storage
and retrieval of unique values. It uses a HashMap internally for optimal performance.
Example (Creating and updating a HashSet)
import { HashSet } from "effect"
// Create a HashSet
const set = HashSet.make("apple", "banana", "cherry")
// Check membership
console.log(HashSet.has(set, "apple")) // true
console.log(HashSet.has(set, "grape")) // false
// Add values (returns new HashSet)
const updated = HashSet.add(set, "grape")
console.log(HashSet.size(updated)) // 4
// Remove values (returns new HashSet)
const smaller = HashSet.remove(set, "banana")
console.log(HashSet.size(smaller)) // 2
The HashSet namespace contains type-level utilities and helper types
for working with HashSet instances.
Example (Extracting value types from a HashSet)
import { HashSet } from "effect"
// Create a concrete HashSet for type extraction
const fruits = HashSet.make("apple", "banana", "cherry")
// Extract the value type for reuse
type Fruit = HashSet.HashSet.Value<typeof fruits> // string
// Use extracted type in functions
const processFruit = (fruit: Fruit) => {
return `Processing ${fruit}`
}
HashSet<function (type parameter) Value in HashSet<Value extends Constraint>(value: Value): HashSet<Value>Value["Encoded"]>,
type HashSetIso<
Value extends Constraint
> = readonly Value["Iso"][]
Iso representation used for HashSet schemas: an array of element values
using the element schema's Iso type.
HashSetIso<function (type parameter) Value in HashSet<Value extends Constraint>(value: Value): HashSet<Value>Value>
>()(
[value: Value extends Constraintvalue],
([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 values: $Array<
Codec<
Value["Type"],
Value["Encoded"],
never,
never
>
>
const values: {
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<Value['Type']>, readonly []>) => $Array<Codec<Value['Type'], Value['Encoded'], never, never>>;
annotateKey: (annotations: Annotations.Key<ReadonlyArray<Value['Type']>>) => $Array<Codec<Value['Type'], Value['Encoded'], never, never>>;
check: (checks_0: SchemaAST.Check<ReadonlyArray<Value['Type']>>, ...checks: Array<SchemaAST.Check<ReadonlyArray<Value['Type']>>>) => $Array<Codec<Value['Type'], Value['Encoded'], never, never>>;
rebuild: (ast: SchemaAST.Arrays) => $Array<Codec<Value['Type'], Value['Encoded'], never, never>>;
make: (input: ReadonlyArray<unknown>, options?: MakeOptions) => ReadonlyArray<Value['Type']>;
makeOption: (input: ReadonlyArray<unknown>, options?: MakeOptions) => Option_.Option<ReadonlyArray<Value['Type']>>;
makeEffect: (input: ReadonlyArray<unknown>, options?: MakeOptions) => Effect.Effect<ReadonlyArray<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; <…;
}
values = const ArraySchema: ArrayLambda
<Codec<Value["Type"], Value["Encoded"], never, never>>(self: Codec<Value["Type"], Value["Encoded"], never, never>) => $Array<Codec<Value["Type"], Value["Encoded"], never, never>>
ArraySchema(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 HashSet_HashSet_.const isHashSet: {
<V>(u: Iterable<V>): u is HashSet<V>
(u: unknown): u is HashSet<unknown>
}
isHashSet(input: unknowninput)) {
return import EffectEffect.const mapBothEager: {
<E, E2, A, A2>(options: {
readonly onFailure: (e: E) => E2
readonly onSuccess: (a: A) => A2
}): <R>(
self: Effect<A, E, R>
) => Effect<A2, E2, R>
<A, E, R, E2, A2>(
self: Effect<A, E, R>,
options: {
readonly onFailure: (e: E) => E2
readonly onSuccess: (a: A) => A2
}
): Effect<A2, E2, R>
}
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 values: $Array<
Codec<
Value["Type"],
Value["Encoded"],
never,
never
>
>
const values: {
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<Value['Type']>, readonly []>) => $Array<Codec<Value['Type'], Value['Encoded'], never, never>>;
annotateKey: (annotations: Annotations.Key<ReadonlyArray<Value['Type']>>) => $Array<Codec<Value['Type'], Value['Encoded'], never, never>>;
check: (checks_0: SchemaAST.Check<ReadonlyArray<Value['Type']>>, ...checks: Array<SchemaAST.Check<ReadonlyArray<Value['Type']>>>) => $Array<Codec<Value['Type'], Value['Encoded'], never, never>>;
rebuild: (ast: SchemaAST.Arrays) => $Array<Codec<Value['Type'], Value['Encoded'], never, never>>;
make: (input: ReadonlyArray<unknown>, options?: MakeOptions) => ReadonlyArray<Value['Type']>;
makeOption: (input: ReadonlyArray<unknown>, options?: MakeOptions) => Option_.Option<ReadonlyArray<Value['Type']>>;
makeEffect: (input: ReadonlyArray<unknown>, options?: MakeOptions) => Effect.Effect<ReadonlyArray<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; <…;
}
values)(import ArrArr.const fromIterable: <unknown>(
collection: Iterable<unknown>
) => unknown[]
Converts an Iterable to an Array.
When to use
Use to convert any Iterable (Set, Generator, etc.) into an array.
Details
If the input is already an array, this returns it by reference without
copying. Otherwise, it creates a new array from the iterable. Use copy if
you need a fresh array even when the input is already an array.
Example (Converting a Set to an array)
import { Array } from "effect"
const result = Array.fromIterable(new Set([1, 2, 3]))
console.log(result) // [1, 2, 3]
fromIterable(input: HashSet_.HashSet<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: <V>(values: Iterable<V>) => HashSet<V>onSuccess: import HashSet_HashSet_.const fromIterable: <V>(
values: Iterable<V>
) => HashSet<V>
Creates a HashSet from an iterable collection of values.
Example (Creating a HashSet from an iterable)
import { HashSet } from "effect"
const fromArray = HashSet.fromIterable(["a", "b", "c", "b", "a"])
console.log(HashSet.size(fromArray)) // 3
const fromSet = HashSet.fromIterable(new Set([1, 2, 3]))
console.log(HashSet.size(fromSet)) // 3
const fromString = HashSet.fromIterable("hello")
console.log(Array.from(fromString)) // ["h", "e", "l", "o"]
fromIterable,
onFailure: (
e: SchemaIssue.Issue
) => SchemaIssue.Composite
onFailure: (issue: SchemaIssue.Issueissue) =>
new import SchemaIssueSchemaIssue.constructor Composite(ast: SchemaAST.AST, actual: Option_.Option<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_.const some: <A>(value: A) => Option<A>Wraps the given value into an Option to represent its presence.
When to use
Use to wrap a known present value as Option
- Returning a successful result from a partial function
Details
- Always returns
Some<A>
- Does not filter
null or undefined; use
fromNullishOr
for that
Example (Wrapping a value)
import { Option } from "effect"
// ┌─── Option<number>
// ▼
const value = Option.some(1)
console.log(value)
// Output: { _id: 'Option', _tag: 'Some', value: 1 }
some(input: HashSet_.HashSet<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(["values"], issue: SchemaIssue.Issueissue)])
}
)
}
return import EffectEffect.const fail: <E>(
error: E
) => Effect<never, E>
Creates an Effect that represents a recoverable error.
When to use
Use to explicitly signal a recoverable error in an Effect.
Details
The error keeps propagating unless it is handled. You can handle tagged
errors with functions like
catchTag
or
catchTags
.
Example (Creating a failed effect)
import { Data, Effect } from "effect"
class OperationFailedError extends Data.TaggedError("OperationFailedError")<{}> {}
// ┌─── Effect<never, OperationFailedError, never>
// ▼
const failure = Effect.fail(
new OperationFailedError()
)
fail(new import SchemaIssueSchemaIssue.constructor InvalidType(ast: SchemaAST.AST, actual: Option_.Option<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_.const some: <A>(value: A) => Option<A>Wraps the given value into an Option to represent its presence.
When to use
Use to wrap a known present value as Option
- Returning a successful result from a partial function
Details
- Always returns
Some<A>
- Does not filter
null or undefined; use
fromNullishOr
for that
Example (Wrapping a value)
import { Option } from "effect"
// ┌─── Option<number>
// ▼
const value = Option.some(1)
console.log(value)
// Output: { _id: 'Option', _tag: 'Some', value: 1 }
some(input: unknowninput)))
}
},
{
Annotations.Declaration<HashSet<Value["Type"]>, readonly [Value]>.typeConstructor?: {
readonly [key: string]: unknown;
readonly _tag: string;
} | undefined
typeConstructor: {
_tag: string_tag: "effect/HashSet"
},
Annotations.Declaration<HashSet<Value["Type"]>, readonly [Value]>.generation?: {
readonly runtime: string;
readonly Type: string;
readonly Encoded?: string | undefined;
readonly importDeclaration?: string | undefined;
} | undefined
generation: {
runtime: stringruntime: `Schema.HashSet(?)`,
type Type: stringType: `HashSet.HashSet<?>`
},
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: "HashSet",
Annotations.Declaration<HashSet<Value["Type"]>, readonly [Value]>.toCodec?: ((typeParameters: readonly [Codec<Value["Encoded"], Value["Encoded"], never, never>]) => SchemaAST.Link) | undefinedtoCodec: ([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 HashSet_HashSet_.interface HashSet<out Value>A HashSet is an immutable set data structure that provides efficient storage
and retrieval of unique values. It uses a HashMap internally for optimal performance.
Example (Creating and updating a HashSet)
import { HashSet } from "effect"
// Create a HashSet
const set = HashSet.make("apple", "banana", "cherry")
// Check membership
console.log(HashSet.has(set, "apple")) // true
console.log(HashSet.has(set, "grape")) // false
// Add values (returns new HashSet)
const updated = HashSet.add(set, "grape")
console.log(HashSet.size(updated)) // 4
// Remove values (returns new HashSet)
const smaller = HashSet.remove(set, "banana")
console.log(HashSet.size(smaller)) // 2
The HashSet namespace contains type-level utilities and helper types
for working with HashSet instances.
Example (Extracting value types from a HashSet)
import { HashSet } from "effect"
// Create a concrete HashSet for type extraction
const fruits = HashSet.make("apple", "banana", "cherry")
// Extract the value type for reuse
type Fruit = HashSet.HashSet.Value<typeof fruits> // string
// Use extracted type in functions
const processFruit = (fruit: Fruit) => {
return `Processing ${fruit}`
}
HashSet<function (type parameter) Value in HashSet<Value extends Constraint>(value: Value): HashSet<Value>Value["Encoded"]>>()(
const ArraySchema: ArrayLambda
<Codec<Value["Encoded"], Value["Encoded"], never, never>>(self: Codec<Value["Encoded"], Value["Encoded"], never, never>) => $Array<Codec<Value["Encoded"], Value["Encoded"], never, never>>
ArraySchema(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: <V>(values: Iterable<V>) => HashSet<V>decode: import HashSet_HashSet_.const fromIterable: <V>(
values: Iterable<V>
) => HashSet<V>
Creates a HashSet from an iterable collection of values.
Example (Creating a HashSet from an iterable)
import { HashSet } from "effect"
const fromArray = HashSet.fromIterable(["a", "b", "c", "b", "a"])
console.log(HashSet.size(fromArray)) // 3
const fromSet = HashSet.fromIterable(new Set([1, 2, 3]))
console.log(HashSet.size(fromSet)) // 3
const fromString = HashSet.fromIterable("hello")
console.log(Array.from(fromString)) // ["h", "e", "l", "o"]
fromIterable,
encode: (
input: HashSet_.HashSet<Value["Encoded"]>
) => NoInfer<readonly Value["Encoded"][]>
encode: import ArrArr.const fromIterable: <A>(
collection: Iterable<A>
) => Array<A>
Converts an Iterable to an Array.
When to use
Use to convert any Iterable (Set, Generator, etc.) into an array.
Details
If the input is already an array, this returns it by reference without
copying. Otherwise, it creates a new array from the iterable. Use copy if
you need a fresh array even when the input is already an array.
Example (Converting a Set to an array)
import { Array } from "effect"
const result = Array.fromIterable(new Set([1, 2, 3]))
console.log(result) // [1, 2, 3]
fromIterable
})
),
Annotations.Declaration<HashSet<Value["Type"]>, readonly [Value]>.toArbitrary?: Annotations.ToArbitrary.Declaration<HashSet_.HashSet<Value["Type"]>, readonly [Value]> | undefinedtoArbitrary: ([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 collectionArbitrary<unknown, HashSet_.HashSet<unknown>>(fc: typeof FastCheck, ctx: Annotations.ToArbitrary.Context, item: FastCheck.Arbitrary<unknown>, terminalItem: FastCheck.Arbitrary<unknown> | undefined, fromIterable: (items: unknown[]) => HashSet_.HashSet<unknown>, comparator?: ((a: unknown, b: unknown) => boolean) | undefined): {
arbitrary: any;
terminal: any;
}
collectionArbitrary(fc: typeof FastCheckfc, ctx: Annotations.ToArbitrary.Context(parameter) ctx: {
constraint: ToArbitrary.GenerationConstraint | undefined;
recursion: ToArbitrary.Recursion | undefined;
}
ctx, value: Annotations.ToArbitrary.TypeParameter<
Value["Type"]
>
(parameter) value: {
arbitrary: FastCheck.Arbitrary<T>;
terminal: FastCheck.Arbitrary<T> | undefined;
}
value.Annotations.ToArbitrary.TypeParameter<T>.arbitrary: FastCheck.Arbitrary<T>arbitrary, value: Annotations.ToArbitrary.TypeParameter<
Value["Type"]
>
(parameter) value: {
arbitrary: FastCheck.Arbitrary<T>;
terminal: FastCheck.Arbitrary<T> | undefined;
}
value.Annotations.ToArbitrary.TypeParameter<T>.terminal: anyterminal, import HashSet_HashSet_.const fromIterable: <V>(
values: Iterable<V>
) => HashSet<V>
Creates a HashSet from an iterable collection of values.
Example (Creating a HashSet from an iterable)
import { HashSet } from "effect"
const fromArray = HashSet.fromIterable(["a", "b", "c", "b", "a"])
console.log(HashSet.size(fromArray)) // 3
const fromSet = HashSet.fromIterable(new Set([1, 2, 3]))
console.log(HashSet.size(fromSet)) // 3
const fromString = HashSet.fromIterable("hello")
console.log(Array.from(fromString)) // ["h", "e", "l", "o"]
fromIterable, import EqualEqual.function equals<B>(that: B): <A>(self: A) => boolean (+1 overload)Checks whether two values are deeply structurally equal.
When to use
Use when you need Effect's default structural equality check.
Details
Returns a boolean and never throws. Primitives are compared by value, and
NaN equals NaN. Objects implementing Equal delegate to their
[Equal.symbol] method; if only one operand implements Equal, the result
is false.
Dates compare by ISO string, RegExps compare by string representation,
arrays compare element-by-element, Maps and Sets compare entries
order-independently, and plain objects compare enumerable keys recursively.
Functions without an Equal implementation compare by reference. Circular
references are handled when both structures are circular at the same depth.
Hash values are checked first as a fast-path rejection. The function also
supports dual data-last usage: call it with one argument to get a curried
predicate.
Gotchas
- Results are cached per object pair in a WeakMap. Objects must not be
mutated after their first comparison.
- Map and Set comparisons are O(n²) in size.
Example (Comparing values)
import { Equal } from "effect"
// Primitives
console.log(Equal.equals(1, 1)) // true
console.log(Equal.equals(NaN, NaN)) // true
console.log(Equal.equals("a", "b")) // false
// Objects and arrays
console.log(Equal.equals({ a: 1, b: 2 }, { a: 1, b: 2 })) // true
console.log(Equal.equals([1, [2, 3]], [1, [2, 3]])) // true
// Dates
console.log(Equal.equals(new Date("2024-01-01"), new Date("2024-01-01"))) // true
// Maps (order-independent)
const m1 = new Map([["a", 1], ["b", 2]])
const m2 = new Map([["b", 2], ["a", 1]])
console.log(Equal.equals(m1, m2)) // true
// Curried form
const is5 = Equal.equals(5)
console.log(is5(5)) // true
console.log(is5(3)) // false
equals),
Annotations.Declaration<HashSet<Value["Type"]>, readonly [Value]>.toEquivalence?: Annotations.ToEquivalence.Declaration<HashSet_.HashSet<Value["Type"]>, readonly [Value]> | undefinedtoEquivalence: ([value: Equivalence.Equivalence<Value["Type"]>value]) => import EqualEqual.function makeCompareSet<A>(
equivalence: Equivalence<A>
): (
self: Iterable<A>,
that: Iterable<A>
) => boolean
makeCompareSet(value: Equivalence.Equivalence<Value["Type"]>value),
Annotations.Declaration<HashSet<Value["Type"]>, readonly [Value]>.toFormatter?: Annotations.ToFormatter.Declaration<HashSet_.HashSet<Value["Type"]>, readonly [Value]> | undefinedtoFormatter: ([value: Formatter<Value["Type"], string>value]) => (t: HashSet_.HashSet<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: numbersize = import HashSet_HashSet_.const size: <V>(
self: HashSet<V>
) => number
Returns the number of values in the HashSet.
Example (Getting the HashSet size)
import { HashSet } from "effect"
const empty = HashSet.empty<string>()
console.log(HashSet.size(empty)) // 0
const small = HashSet.make("a", "b")
console.log(HashSet.size(small)) // 2
const withDuplicates = HashSet.fromIterable(["x", "y", "z", "x", "y"])
console.log(HashSet.size(withDuplicates)) // 3
size(t: HashSet_.HashSet<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: numbersize === 0) {
return "HashSet(0) {}"
}
const const values: string[]values = module globalThisglobalThis.var Array: ArrayConstructorArray.ArrayConstructor.from<Value["Type"]>(iterable: Iterable<Value["Type"]> | ArrayLike<Value["Type"]>): Value["Type"][] (+3 overloads)Creates an array from an iterable object.
from(t: HashSet_.HashSet<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).Array<Value["Type"]>.sort(compareFn?: ((a: Value["Type"], b: Value["Type"]) => number) | undefined): Value["Type"][]Sorts an array in place.
This method mutates the array and returns a reference to the same array.
sort().Array<Value["Type"]>.map<string>(callbackfn: (value: Value["Type"], index: number, array: Value["Type"][]) => string, thisArg?: any): string[]Calls a defined callback function on each element of an array, and returns an array that contains the results.
map((v: Value["Type"]v) => `${value: Formatter<Value["Type"], string>value(v: Value["Type"]v)}`)
return `HashSet(${const size: numbersize}) { ${const values: string[]values.Array<string>.join(separator?: string): stringAdds all the elements of an array into a string, separated by the specified separator string.
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<
HashSet_.HashSet<Value["Type"]>,
HashSet_.HashSet<Value["Encoded"]>,
readonly [Value],
HashSetIso<Value>
>
const schema: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Annotations.Bottom<HashSet_.HashSet<Value['Type']>, readonly [Value]>) => declareConstructor<HashSet_.HashSet<Value['Type']>, HashSet_.HashSet<Value['Encoded']>, readonly [Value], HashSetIso<Value>>;
annotateKey: (annotations: Annotations.Key<HashSet_.HashSet<Value['Type']>>) => declareConstructor<HashSet_.HashSet<Value['Type']>, HashSet_.HashSet<Value['Encoded']>, readonly [Value], HashSetIso<Value>>;
check: (checks_0: SchemaAST.Check<HashSet_.HashSet<Value['Type']>>, ...checks: Array<SchemaAST.Check<HashSet_.HashSet<Value['Type']>>>) => declareConstructor<HashSet_.HashSet<Value['Type']>, HashSet_.HashSet<Value['Encoded']>, readonly [Value], H…;
rebuild: (ast: SchemaAST.Declaration) => declareConstructor<HashSet_.HashSet<Value['Type']>, HashSet_.HashSet<Value['Encoded']>, readonly [Value], HashSetIso<Value>>;
make: (input: HashSet_.HashSet<Value['Type']>, options?: MakeOptions) => HashSet_.HashSet<Value['Type']>;
makeOption: (input: HashSet_.HashSet<Value['Type']>, options?: MakeOptions) => Option_.Option<HashSet_.HashSet<Value['Type']>>;
makeEffect: (input: HashSet_.HashSet<Value['Type']>, options?: MakeOptions) => Effect.Effect<HashSet_.HashSet<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<HashSet<Value["Type"]>, HashSet<Value["Encoded"]>, Value["DecodingServices"], Value["EncodingServices"], Declaration, ... 9 more ..., "required">["ast"]: SchemaAST.Declaration(property) Bottom<HashSet<Value["Type"]>, HashSet<Value["Encoded"]>, Value["DecodingServices"], Value["EncodingServices"], Declaration, ... 9 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, { value: Value extends Constraintvalue })
}