PriorityTagConfig<F, Success>WorkPool.priority tag config — config object only (no positional schemas). payload is the
item schema; laneCount is the number of priority lanes; namedLanes maps names → lane indices.
Optional success / error wire slots match WorkPool.Tag (stamped for engine + store).
export interface interface PriorityTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void>WorkPool.priority tag config — config object only (no positional schemas). payload is the
item schema; laneCount is the number of priority lanes; namedLanes maps names → lane indices.
Optional success / error wire slots match
WorkPool.Tag
(stamped for engine + store).
PriorityTagConfig<
function (type parameter) F in PriorityTagConfig<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 PriorityTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void>Success extends import SchemaSchema.Top = typeof import SchemaSchema.const Void: 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?: MakeOptions) => void;
makeOption: (input: void, options?: MakeOptions) => Option_.Option<void>;
makeEffect: (input: void, options?: MakeOptions) => Effect.Effect<void, 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 PriorityTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Void>.payload: Schema.Struct<F>(property) PriorityTagConfig<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: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, 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; <…;
}
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 PriorityTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void>F>;
readonly PriorityTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Void>.laneCount: numberlaneCount: number;
readonly PriorityTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Void>.namedLanes?: Readonly<Record<string, number>> | undefinednamedLanes?: 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 PriorityTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Void>.success?: Success | undefinedsuccess?: function (type parameter) Success in PriorityTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void>Success;
readonly PriorityTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Void>.error?: Schema.Toperror?: import SchemaSchema.Top;
readonly PriorityTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Void>.description?: string | undefineddescription?: string;
readonly PriorityTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Void>.node?: NodeKey<unknown>node?: type NodeKey<HSelf> = Key<HSelf, NodeProtocol>The Context key of a
Node
(HSelf = its identity): a service whose value is the
transport
NodeProtocol
. Stored on a node-bearing tag under
nodeSym
; read by
Hyperlink.client
to resolve where to connect (its requirement channel).
NodeKey<unknown>;
}