CustomQueueTagConfig<F, Success>CustomQueue Tag config — config object only (no positional schemas). payload is the item
schema; levelCount is the number of priority lanes; namedLevels maps names → lane indices.
Optional success / error wire slots match QueueHyperlink.Tag (stamped for engine + store).
export interface interface CustomQueueTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void>CustomQueue Tag config — config object only (no positional schemas). payload is the item
schema; levelCount is the number of priority lanes; namedLevels maps names → lane indices.
Optional success / error wire slots match
QueueHyperlink.Tag
(stamped for engine + store).
CustomQueueTagConfig<
function (type parameter) F in CustomQueueTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void>F extends import SchemaSchema.Struct.type Struct<Fields extends Struct.Fields>.Fields = {
readonly [x: string]: Schema.Constraint;
readonly [x: number]: Schema.Constraint;
readonly [x: symbol]: Schema.Constraint;
}
Constraint for a struct field map: an object whose values are schemas.
Fields,
function (type parameter) Success in CustomQueueTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void>Success extends import SchemaSchema.Top = typeof import SchemaSchema.const Void: Schema.Voidconst Void: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<void, readonly []>) => Schema.Void;
annotateKey: (annotations: Schema.Annotations.Key<void>) => Schema.Void;
check: (checks_0: Check<void>, ...checks: Array<Check<void>>) => Schema.Void;
rebuild: (ast: Void) => Schema.Void;
make: (input: void, options?: Schema.MakeOptions) => void;
makeOption: (input: void, options?: Schema.MakeOptions) => Option.Option<void>;
makeEffect: (input: void, options?: Schema.MakeOptions) => Effect.Effect<void, Schema.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
Void
.
Schema for a TypeScript void return value.
When to use
Use when you need to model the return value of a function, RPC, or endpoint
whose result is intentionally ignored.
Details
Runtime parsing accepts any present value and discards it, producing
undefined. The public decoded and encoded TypeScript representation remains
void, so typed construction, decoding, and encoding APIs are still modeled
as void.
Void,
> {
readonly CustomQueueTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Void>.payload: Schema.Struct<F>(property) CustomQueueTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Void>.payload: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Schema.Struct.MakeInView<F, Schema.Struct.TypeOptionalKeys<F> | Schema.Struct.TypeConstructorDefaultedKeys<F>>, options?: Schema.MakeOptions) => Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMut…;
makeOption: (input: Schema.Struct.MakeInView<F, Schema.Struct.TypeOptionalKeys<F> | Schema.Struct.TypeConstructorDefaultedKeys<F>>, options?: Schema.MakeOptions) => Option.Option<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.…;
makeEffect: (input: Schema.Struct.MakeInView<F, Schema.Struct.TypeOptionalKeys<F> | Schema.Struct.TypeConstructorDefaultedKeys<F>>, options?: Schema.MakeOptions) => Effect.Effect<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.…;
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; <…;
}
payload: import SchemaSchema.interface Struct<Fields extends Schema.Struct.Fields>Defines a struct schema from a map of field schemas.
Details
Each field value is a schema. Use
optionalKey
or
optional
to
mark fields as optional, and
mutableKey
to mark them as mutable.
The resulting schema's Type is a readonly object type with the fields'
decoded types. The Encoded form mirrors the field schemas' encoded types.
Example (Defining a basic struct)
import { Schema } from "effect"
const Person = Schema.Struct({
name: Schema.String,
age: Schema.Number,
email: Schema.optionalKey(Schema.String)
})
// { readonly name: string; readonly age: number; readonly email?: string }
type Person = typeof Person.Type
const alice = Schema.decodeUnknownSync(Person)({ name: "Alice", age: 30 })
console.log(alice)
// { name: 'Alice', age: 30 }
Namespace for struct field type utilities.
Details
These types compute the decoded Type, encoded Encoded, and constructor
input MakeIn of a
Struct
from its field map, handling optional,
mutable, and other field modifiers automatically.
Struct.Fields — constraint for the field map object
Struct.Type<F> — decoded type of the struct
Struct.Encoded<F> — encoded type of the struct
Struct.MakeIn<F> — constructor input (optional/defaulted fields may be omitted)
Struct.DecodingServices<F> / Struct.EncodingServices<F> — required services
Type-level representation returned by
Struct
.
Struct<function (type parameter) F in CustomQueueTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void>F>;
readonly CustomQueueTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Void>.levelCount: numberlevelCount: number;
readonly CustomQueueTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Void>.namedLevels?: Readonly<Record<string, number>> | undefinednamedLevels?: type Readonly<T> = {
readonly [P in keyof T]: T[P]
}
Make all properties in T readonly
Readonly<type Record<K extends keyof any, T> = {
[P in K]: T
}
Construct a type with a set of properties K of type T
Record<string, number>>;
readonly CustomQueueTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Void>.success?: Success | undefinedsuccess?: function (type parameter) Success in CustomQueueTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void>Success;
readonly CustomQueueTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Void>.error?: Schema.Top | undefinederror?: import SchemaSchema.Top;
readonly CustomQueueTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Void>.description?: string | undefineddescription?: string;
readonly CustomQueueTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Void>.node?: anynode?: import NodeKeyNodeKey<unknown>;
}