<Self>(): {
<F extends Schema.Struct.Fields, HSelf>(
key: string,
payload: Schema.Struct<F>,
options: {
readonly description?: string
readonly node: NodeKey<HSelf>
}
): QueueNodeBoundTag<Self, F, HSelf> &
QueueSuccessCarrier<typeof Schema.Void> &
QueueErrorCarrier<typeof Schema.Never> &
QueueItemSchemaCarrier<F>
<
F extends Schema.Struct.Fields,
Success extends Schema.Top,
Error extends Schema.Top = Schema.Never
>(
key: string,
payload: Schema.Struct<F>,
success: Success,
error?: Error
): QueueTag<Self, F, Success, Error> &
QueueSuccessCarrier<Success> &
QueueErrorCarrier<Error> &
QueueItemSchemaCarrier<F>
<F extends Schema.Struct.Fields>(
key: string,
payload: Schema.Struct<F>,
options?: { readonly description?: string }
): QueueTag<Self, F> &
QueueSuccessCarrier<typeof Schema.Void> &
QueueErrorCarrier<typeof Schema.Never> &
QueueItemSchemaCarrier<F>
<F extends Schema.Struct.Fields, HSelf>(
key: string,
config: QueueTagConfig<F> & { readonly node: NodeKey<HSelf> }
): QueueNodeBoundTag<Self, F, HSelf> &
QueueSuccessCarrier<typeof Schema.Void> &
QueueErrorCarrier<typeof Schema.Never> &
QueueItemSchemaCarrier<F>
<
F extends Schema.Struct.Fields,
Success extends Schema.Top = Schema.Void,
Error extends Schema.Top = Schema.Never
>(
key: string,
config: QueueTagConfig<F, Success, Error>
): QueueTag<Self, F, Success, Error> &
QueueSuccessCarrier<Success> &
QueueErrorCarrier<Error> &
QueueItemSchemaCarrier<F>
}Define a queue as a named service Tag:
class Mail extends QueueHyperlink.Tag<Mail>()("@app/Mail", { payload: JobSchema }) {}. The class
is the Tag — yield* Mail inside an Effect resolves the QueueHyperlink handle
(enqueue / status / metrics), while layer provides the running queue and serve
exposes it over RPC. payload is the item schema; the QueueTagConfig overload adds
success / error wire schemas for the worker's result and failures.
const const queueTag: <Self>() => {
<F extends Schema.Struct.Fields, HSelf>(
key: string,
payload: Schema.Struct<F>,
options: {
readonly description?: string
readonly node: NodeKey<HSelf>
}
): QueueNodeBoundTag<Self, F, HSelf> &
QueueSuccessCarrier<typeof Schema.Void> &
QueueErrorCarrier<typeof Schema.Never> &
QueueItemSchemaCarrier<F>
<
F extends Schema.Struct.Fields,
Success extends Schema.Top,
Error extends Schema.Top = Schema.Never
>(
key: string,
payload: Schema.Struct<F>,
success: Success,
error?: Error
): QueueTag<Self, F, Success, Error> &
QueueSuccessCarrier<Success> &
QueueErrorCarrier<Error> &
QueueItemSchemaCarrier<F>
<F extends Schema.Struct.Fields>(
key: string,
payload: Schema.Struct<F>,
options?: { readonly description?: string }
): QueueTag<Self, F> &
QueueSuccessCarrier<typeof Schema.Void> &
QueueErrorCarrier<typeof Schema.Never> &
QueueItemSchemaCarrier<F>
<F extends Schema.Struct.Fields, HSelf>(
key: string,
config: QueueTagConfig<F> & {
readonly node: NodeKey<HSelf>
}
): QueueNodeBoundTag<Self, F, HSelf> &
QueueSuccessCarrier<typeof Schema.Void> &
QueueErrorCarrier<typeof Schema.Never> &
QueueItemSchemaCarrier<F>
<
F extends Schema.Struct.Fields,
Success extends Schema.Top = Schema.Void,
Error extends Schema.Top = Schema.Never
>(
key: string,
config: QueueTagConfig<F, Success, Error>
): QueueTag<Self, F, Success, Error> &
QueueSuccessCarrier<Success> &
QueueErrorCarrier<Error> &
QueueItemSchemaCarrier<F>
}
Define a queue as a named service
Tag
:
class Mail extends QueueHyperlink.Tag<Mail>()("@app/Mail", { payload: JobSchema }) {}. The class
is the Tag — yield* Mail inside an Effect resolves the
QueueHyperlink
handle
(enqueue / status / metrics), while
layer
provides the running queue and
serve
exposes it over RPC. payload is the item schema; the
QueueTagConfig
overload adds
success / error wire schemas for the worker's result and failures.
queueTag = <function (type parameter) Self in <Self>(): {
<F extends Schema.Struct.Fields, HSelf>(key: string, payload: Schema.Struct<F>, options: {
readonly description?: string;
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields>(key: string, payload: Schema.Struct<F>, options?: {
readonly description?: string;
}): QueueTag<Self, F> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, HSelf>(key: string, config: QueueTagConfig<F> & {
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>;
}
Self>() => {
function function (local function) build<F extends Schema.Struct.Fields, HSelf>(key: string, payload: Schema.Struct<F>, options: {
readonly description?: string;
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F> (+4 overloads)
build<function (type parameter) F in build<F extends Schema.Struct.Fields, HSelf>(key: string, payload: Schema.Struct<F>, options: {
readonly description?: string;
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>
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) HSelf in build<F extends Schema.Struct.Fields, HSelf>(key: string, payload: Schema.Struct<F>, options: {
readonly description?: string;
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>
HSelf>(
key: stringkey: string,
payload: Schema.Struct<F>(parameter) 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 build<F extends Schema.Struct.Fields, HSelf>(key: string, payload: Schema.Struct<F>, options: {
readonly description?: string;
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>
F>,
options: {
readonly description?: string
readonly node: NodeKey<HSelf>
}
options: { readonly description?: string | undefineddescription?: string; readonly node: NodeKey<HSelf>node: import NodeKeyNodeKey<function (type parameter) HSelf in build<F extends Schema.Struct.Fields, HSelf>(key: string, payload: Schema.Struct<F>, options: {
readonly description?: string;
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>
HSelf> },
): type QueueNodeBoundTag<
Self,
F extends Schema.Struct.Fields,
HSelf,
Success extends Schema.Top = Schema.Void,
Error extends Schema.Top = Schema.Never
> = NodeBoundTag<
Self,
{
add: any
prioritize: any
defer: any
enqueue: any
release: any
releaseEncoded: any
deadLetter: any
drop: any
events: any
status: any
size: any
isEmpty: any
start: any
pause: any
resume: any
shutdown: any
clear: any
metrics: {
stream: any
query: any
}
},
HSelf,
QueueHyperlink<
Hyperlink.Decoded<Schema.Struct<F>>,
Success["Type"],
Error["Type"],
never
>
>
QueueTag
for a node-bound queue (its own transport).
QueueNodeBoundTag<function (type parameter) Self in <Self>(): {
<F extends Schema.Struct.Fields, HSelf>(key: string, payload: Schema.Struct<F>, options: {
readonly description?: string;
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields>(key: string, payload: Schema.Struct<F>, options?: {
readonly description?: string;
}): QueueTag<Self, F> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, HSelf>(key: string, config: QueueTagConfig<F> & {
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>;
}
Self, function (type parameter) F in build<F extends Schema.Struct.Fields, HSelf>(key: string, payload: Schema.Struct<F>, options: {
readonly description?: string;
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>
F, function (type parameter) HSelf in build<F extends Schema.Struct.Fields, HSelf>(key: string, payload: Schema.Struct<F>, options: {
readonly description?: string;
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>
HSelf> &
interface QueueSuccessCarrier<Success extends Schema.Top = Schema.Void>A phantom marker intersected onto a
Tag
to carry the worker success schema (A's
schema) at the type level, without touching the (invariant, RPC-facing) spec. The layer / serve
config and the store analytics recover A from here (default
Schema.Void
). Type-only — no
runtime field; the runtime success schema still rides the successSym stamp.
QueueSuccessCarrier<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> &
interface QueueErrorCarrier<Error extends Schema.Top = Schema.Never>A phantom marker intersected onto a
Tag
to carry the worker error schema (E's
schema) at the type level — the mirror of
QueueSuccessCarrier
. The layer / serve config
constrains the worker's failure channel to this (default
Schema.Never
: no declared error →
the worker must be infallible, or defect). Type-only — no runtime field; the runtime error schema
rides the wire stamp.
QueueErrorCarrier<typeof import SchemaSchema.const Never: Schema.Neverconst Never: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<never, readonly []>) => Schema.Never;
annotateKey: (annotations: Schema.Annotations.Key<never>) => Schema.Never;
check: (checks_0: Check<never>, ...checks: Array<Check<never>>) => Schema.Never;
rebuild: (ast: Never) => Schema.Never;
make: (input: never, options?: Schema.MakeOptions) => never;
makeOption: (input: never, options?: Schema.MakeOptions) => Option.Option<never>;
makeEffect: (input: never, options?: Schema.MakeOptions) => Effect.Effect<never, 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
Never
.
Schema for the never type. Always fails validation — no value satisfies it.
Never> &
import QueueItemSchemaCarrierQueueItemSchemaCarrier<function (type parameter) F in build<F extends Schema.Struct.Fields, HSelf>(key: string, payload: Schema.Struct<F>, options: {
readonly description?: string;
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>
F>;
function function (local function) build<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F> (+4 overloads)build<
function (type parameter) F in build<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>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 build<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>Success extends import SchemaSchema.Top,
function (type parameter) Error in build<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>Error extends import SchemaSchema.Top = typeof import SchemaSchema.const Never: Schema.Neverconst Never: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<never, readonly []>) => Schema.Never;
annotateKey: (annotations: Schema.Annotations.Key<never>) => Schema.Never;
check: (checks_0: Check<never>, ...checks: Array<Check<never>>) => Schema.Never;
rebuild: (ast: Never) => Schema.Never;
make: (input: never, options?: Schema.MakeOptions) => never;
makeOption: (input: never, options?: Schema.MakeOptions) => Option.Option<never>;
makeEffect: (input: never, options?: Schema.MakeOptions) => Effect.Effect<never, 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
Never
.
Schema for the never type. Always fails validation — no value satisfies it.
Never,
>(
key: stringkey: string,
payload: Schema.Struct<F>(parameter) 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 build<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>F>,
success: Success extends Schema.Topsuccess: function (type parameter) Success in build<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>Success,
error: Error | undefinederror?: function (type parameter) Error in build<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>Error,
): type QueueTag<
Self,
F extends Schema.Struct.Fields,
Success extends Schema.Top = Schema.Void,
Error extends Schema.Top = Schema.Never
> = HyperlinkTag<
Self,
{
add: any
prioritize: any
defer: any
enqueue: any
release: any
releaseEncoded: any
deadLetter: any
drop: any
events: any
status: any
size: any
isEmpty: any
start: any
pause: any
resume: any
shutdown: any
clear: any
metrics: {
stream: any
query: any
}
},
QueueHyperlink<
Hyperlink.Decoded<Schema.Struct<F>>,
Success["Type"],
Error["Type"],
never
>
>
The queue's
Hyperlink.Tag
whose service value is the named
QueueHyperlink
handle
(via the Svc seam on
HyperlinkTag
), so yield* MyQueue hovers as
QueueHyperlink<EmailJob> rather than the expanded ServiceOf<…> wall.
QueueTag<function (type parameter) Self in <Self>(): {
<F extends Schema.Struct.Fields, HSelf>(key: string, payload: Schema.Struct<F>, options: {
readonly description?: string;
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields>(key: string, payload: Schema.Struct<F>, options?: {
readonly description?: string;
}): QueueTag<Self, F> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, HSelf>(key: string, config: QueueTagConfig<F> & {
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>;
}
Self, function (type parameter) F in build<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>F, function (type parameter) Success in build<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>Success, function (type parameter) Error in build<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>Error> &
interface QueueSuccessCarrier<Success extends Schema.Top = Schema.Void>A phantom marker intersected onto a
Tag
to carry the worker success schema (A's
schema) at the type level, without touching the (invariant, RPC-facing) spec. The layer / serve
config and the store analytics recover A from here (default
Schema.Void
). Type-only — no
runtime field; the runtime success schema still rides the successSym stamp.
QueueSuccessCarrier<function (type parameter) Success in build<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>Success> &
interface QueueErrorCarrier<Error extends Schema.Top = Schema.Never>A phantom marker intersected onto a
Tag
to carry the worker error schema (E's
schema) at the type level — the mirror of
QueueSuccessCarrier
. The layer / serve config
constrains the worker's failure channel to this (default
Schema.Never
: no declared error →
the worker must be infallible, or defect). Type-only — no runtime field; the runtime error schema
rides the wire stamp.
QueueErrorCarrier<function (type parameter) Error in build<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>Error> &
import QueueItemSchemaCarrierQueueItemSchemaCarrier<function (type parameter) F in build<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>F>;
function function (local function) build<F extends Schema.Struct.Fields>(key: string, payload: Schema.Struct<F>, options?: {
readonly description?: string;
}): QueueTag<Self, F> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F> (+4 overloads)
build<function (type parameter) F in build<F extends Schema.Struct.Fields>(key: string, payload: Schema.Struct<F>, options?: {
readonly description?: string;
}): QueueTag<Self, F> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>
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>(
key: stringkey: string,
payload: Schema.Struct<F>(parameter) 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 build<F extends Schema.Struct.Fields>(key: string, payload: Schema.Struct<F>, options?: {
readonly description?: string;
}): QueueTag<Self, F> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>
F>,
options: | {
readonly description?: string
}
| undefined
options?: { readonly description?: string | undefineddescription?: string },
): type QueueTag<
Self,
F extends Schema.Struct.Fields,
Success extends Schema.Top = Schema.Void,
Error extends Schema.Top = Schema.Never
> = HyperlinkTag<
Self,
{
add: any
prioritize: any
defer: any
enqueue: any
release: any
releaseEncoded: any
deadLetter: any
drop: any
events: any
status: any
size: any
isEmpty: any
start: any
pause: any
resume: any
shutdown: any
clear: any
metrics: {
stream: any
query: any
}
},
QueueHyperlink<
Hyperlink.Decoded<Schema.Struct<F>>,
Success["Type"],
Error["Type"],
never
>
>
The queue's
Hyperlink.Tag
whose service value is the named
QueueHyperlink
handle
(via the Svc seam on
HyperlinkTag
), so yield* MyQueue hovers as
QueueHyperlink<EmailJob> rather than the expanded ServiceOf<…> wall.
QueueTag<function (type parameter) Self in <Self>(): {
<F extends Schema.Struct.Fields, HSelf>(key: string, payload: Schema.Struct<F>, options: {
readonly description?: string;
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields>(key: string, payload: Schema.Struct<F>, options?: {
readonly description?: string;
}): QueueTag<Self, F> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, HSelf>(key: string, config: QueueTagConfig<F> & {
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>;
}
Self, function (type parameter) F in build<F extends Schema.Struct.Fields>(key: string, payload: Schema.Struct<F>, options?: {
readonly description?: string;
}): QueueTag<Self, F> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>
F> &
interface QueueSuccessCarrier<Success extends Schema.Top = Schema.Void>A phantom marker intersected onto a
Tag
to carry the worker success schema (A's
schema) at the type level, without touching the (invariant, RPC-facing) spec. The layer / serve
config and the store analytics recover A from here (default
Schema.Void
). Type-only — no
runtime field; the runtime success schema still rides the successSym stamp.
QueueSuccessCarrier<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> &
interface QueueErrorCarrier<Error extends Schema.Top = Schema.Never>A phantom marker intersected onto a
Tag
to carry the worker error schema (E's
schema) at the type level — the mirror of
QueueSuccessCarrier
. The layer / serve config
constrains the worker's failure channel to this (default
Schema.Never
: no declared error →
the worker must be infallible, or defect). Type-only — no runtime field; the runtime error schema
rides the wire stamp.
QueueErrorCarrier<typeof import SchemaSchema.const Never: Schema.Neverconst Never: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<never, readonly []>) => Schema.Never;
annotateKey: (annotations: Schema.Annotations.Key<never>) => Schema.Never;
check: (checks_0: Check<never>, ...checks: Array<Check<never>>) => Schema.Never;
rebuild: (ast: Never) => Schema.Never;
make: (input: never, options?: Schema.MakeOptions) => never;
makeOption: (input: never, options?: Schema.MakeOptions) => Option.Option<never>;
makeEffect: (input: never, options?: Schema.MakeOptions) => Effect.Effect<never, 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
Never
.
Schema for the never type. Always fails validation — no value satisfies it.
Never> &
import QueueItemSchemaCarrierQueueItemSchemaCarrier<function (type parameter) F in build<F extends Schema.Struct.Fields>(key: string, payload: Schema.Struct<F>, options?: {
readonly description?: string;
}): QueueTag<Self, F> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>
F>;
function function (local function) build<F extends Schema.Struct.Fields, HSelf>(key: string, config: QueueTagConfig<F> & {
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F> (+4 overloads)
build<function (type parameter) F in build<F extends Schema.Struct.Fields, HSelf>(key: string, config: QueueTagConfig<F> & {
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>
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) HSelf in build<F extends Schema.Struct.Fields, HSelf>(key: string, config: QueueTagConfig<F> & {
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>
HSelf>(
key: stringkey: string,
config: QueueTagConfig<F> & {
readonly node: NodeKey<HSelf>
}
config: interface QueueTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>Config-object overload of
Tag
. payload is the item schema (required); success (worker
return) and error (worker failure channel) are the optional wire slots, stamped for the engine
- store to read as the tag SSOT. Positional
Tag()(key, payload, success?, error?) is also valid.
QueueTagConfig<function (type parameter) F in build<F extends Schema.Struct.Fields, HSelf>(key: string, config: QueueTagConfig<F> & {
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>
F> & { readonly node: NodeKey<HSelf>node: import NodeKeyNodeKey<function (type parameter) HSelf in build<F extends Schema.Struct.Fields, HSelf>(key: string, config: QueueTagConfig<F> & {
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>
HSelf> },
): type QueueNodeBoundTag<
Self,
F extends Schema.Struct.Fields,
HSelf,
Success extends Schema.Top = Schema.Void,
Error extends Schema.Top = Schema.Never
> = NodeBoundTag<
Self,
{
add: any
prioritize: any
defer: any
enqueue: any
release: any
releaseEncoded: any
deadLetter: any
drop: any
events: any
status: any
size: any
isEmpty: any
start: any
pause: any
resume: any
shutdown: any
clear: any
metrics: {
stream: any
query: any
}
},
HSelf,
QueueHyperlink<
Hyperlink.Decoded<Schema.Struct<F>>,
Success["Type"],
Error["Type"],
never
>
>
QueueTag
for a node-bound queue (its own transport).
QueueNodeBoundTag<function (type parameter) Self in <Self>(): {
<F extends Schema.Struct.Fields, HSelf>(key: string, payload: Schema.Struct<F>, options: {
readonly description?: string;
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields>(key: string, payload: Schema.Struct<F>, options?: {
readonly description?: string;
}): QueueTag<Self, F> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, HSelf>(key: string, config: QueueTagConfig<F> & {
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>;
}
Self, function (type parameter) F in build<F extends Schema.Struct.Fields, HSelf>(key: string, config: QueueTagConfig<F> & {
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>
F, function (type parameter) HSelf in build<F extends Schema.Struct.Fields, HSelf>(key: string, config: QueueTagConfig<F> & {
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>
HSelf> &
interface QueueSuccessCarrier<Success extends Schema.Top = Schema.Void>A phantom marker intersected onto a
Tag
to carry the worker success schema (A's
schema) at the type level, without touching the (invariant, RPC-facing) spec. The layer / serve
config and the store analytics recover A from here (default
Schema.Void
). Type-only — no
runtime field; the runtime success schema still rides the successSym stamp.
QueueSuccessCarrier<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> &
interface QueueErrorCarrier<Error extends Schema.Top = Schema.Never>A phantom marker intersected onto a
Tag
to carry the worker error schema (E's
schema) at the type level — the mirror of
QueueSuccessCarrier
. The layer / serve config
constrains the worker's failure channel to this (default
Schema.Never
: no declared error →
the worker must be infallible, or defect). Type-only — no runtime field; the runtime error schema
rides the wire stamp.
QueueErrorCarrier<typeof import SchemaSchema.const Never: Schema.Neverconst Never: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<never, readonly []>) => Schema.Never;
annotateKey: (annotations: Schema.Annotations.Key<never>) => Schema.Never;
check: (checks_0: Check<never>, ...checks: Array<Check<never>>) => Schema.Never;
rebuild: (ast: Never) => Schema.Never;
make: (input: never, options?: Schema.MakeOptions) => never;
makeOption: (input: never, options?: Schema.MakeOptions) => Option.Option<never>;
makeEffect: (input: never, options?: Schema.MakeOptions) => Effect.Effect<never, 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
Never
.
Schema for the never type. Always fails validation — no value satisfies it.
Never> &
import QueueItemSchemaCarrierQueueItemSchemaCarrier<function (type parameter) F in build<F extends Schema.Struct.Fields, HSelf>(key: string, config: QueueTagConfig<F> & {
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>
F>;
function function (local function) build<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F> (+4 overloads)build<
function (type parameter) F in build<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>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 build<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>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,
function (type parameter) Error in build<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>Error extends import SchemaSchema.Top = typeof import SchemaSchema.const Never: Schema.Neverconst Never: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<never, readonly []>) => Schema.Never;
annotateKey: (annotations: Schema.Annotations.Key<never>) => Schema.Never;
check: (checks_0: Check<never>, ...checks: Array<Check<never>>) => Schema.Never;
rebuild: (ast: Never) => Schema.Never;
make: (input: never, options?: Schema.MakeOptions) => never;
makeOption: (input: never, options?: Schema.MakeOptions) => Option.Option<never>;
makeEffect: (input: never, options?: Schema.MakeOptions) => Effect.Effect<never, 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
Never
.
Schema for the never type. Always fails validation — no value satisfies it.
Never,
>(
key: stringkey: string,
config: QueueTagConfig<F, Success, Error>(parameter) config: {
payload: Schema.Struct<F>;
success: Success;
error: Error;
description: string;
node: NodeKey<unknown>;
}
config: interface QueueTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>Config-object overload of
Tag
. payload is the item schema (required); success (worker
return) and error (worker failure channel) are the optional wire slots, stamped for the engine
- store to read as the tag SSOT. Positional
Tag()(key, payload, success?, error?) is also valid.
QueueTagConfig<function (type parameter) F in build<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>F, function (type parameter) Success in build<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>Success, function (type parameter) Error in build<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>Error>,
): type QueueTag<
Self,
F extends Schema.Struct.Fields,
Success extends Schema.Top = Schema.Void,
Error extends Schema.Top = Schema.Never
> = HyperlinkTag<
Self,
{
add: any
prioritize: any
defer: any
enqueue: any
release: any
releaseEncoded: any
deadLetter: any
drop: any
events: any
status: any
size: any
isEmpty: any
start: any
pause: any
resume: any
shutdown: any
clear: any
metrics: {
stream: any
query: any
}
},
QueueHyperlink<
Hyperlink.Decoded<Schema.Struct<F>>,
Success["Type"],
Error["Type"],
never
>
>
The queue's
Hyperlink.Tag
whose service value is the named
QueueHyperlink
handle
(via the Svc seam on
HyperlinkTag
), so yield* MyQueue hovers as
QueueHyperlink<EmailJob> rather than the expanded ServiceOf<…> wall.
QueueTag<function (type parameter) Self in <Self>(): {
<F extends Schema.Struct.Fields, HSelf>(key: string, payload: Schema.Struct<F>, options: {
readonly description?: string;
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields>(key: string, payload: Schema.Struct<F>, options?: {
readonly description?: string;
}): QueueTag<Self, F> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, HSelf>(key: string, config: QueueTagConfig<F> & {
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>;
}
Self, function (type parameter) F in build<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>F, function (type parameter) Success in build<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>Success, function (type parameter) Error in build<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>Error> &
interface QueueSuccessCarrier<Success extends Schema.Top = Schema.Void>A phantom marker intersected onto a
Tag
to carry the worker success schema (A's
schema) at the type level, without touching the (invariant, RPC-facing) spec. The layer / serve
config and the store analytics recover A from here (default
Schema.Void
). Type-only — no
runtime field; the runtime success schema still rides the successSym stamp.
QueueSuccessCarrier<function (type parameter) Success in build<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>Success> &
interface QueueErrorCarrier<Error extends Schema.Top = Schema.Never>A phantom marker intersected onto a
Tag
to carry the worker error schema (E's
schema) at the type level — the mirror of
QueueSuccessCarrier
. The layer / serve config
constrains the worker's failure channel to this (default
Schema.Never
: no declared error →
the worker must be infallible, or defect). Type-only — no runtime field; the runtime error schema
rides the wire stamp.
QueueErrorCarrier<function (type parameter) Error in build<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>Error> &
import QueueItemSchemaCarrierQueueItemSchemaCarrier<function (type parameter) F in build<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>F>;
// Implementation signature — intentionally loose (`any` wire slots): the tag's real `Success`/
// `Error` are fixed by the overload selected above. The runtime resolves them from the config /
// positional args below; the phantom carriers are type-only.
function function (local function) build<F extends Schema.Struct.Fields, HSelf>(key: string, payload: Schema.Struct<F>, options: {
readonly description?: string;
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F> (+4 overloads)
build<function (type parameter) F in build<F extends Schema.Struct.Fields>(key: string, second: Schema.Struct<F> | QueueTagConfig<F, Schema.Top, Schema.Top>, third?: Schema.Top | QueueTagPositionalOptions, fourth?: Schema.Top): QueueTag<Self, F, any, any> & QueueSuccessCarrier<any> & QueueErrorCarrier<any> & QueueItemSchemaCarrier<F>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>(
key: stringkey: string,
second: | Schema.Struct<F>
| QueueTagConfig<F, Schema.Top, Schema.Top>
second: 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 build<F extends Schema.Struct.Fields>(key: string, second: Schema.Struct<F> | QueueTagConfig<F, Schema.Top, Schema.Top>, third?: Schema.Top | QueueTagPositionalOptions, fourth?: Schema.Top): QueueTag<Self, F, any, any> & QueueSuccessCarrier<any> & QueueErrorCarrier<any> & QueueItemSchemaCarrier<F>F> | interface QueueTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>Config-object overload of
Tag
. payload is the item schema (required); success (worker
return) and error (worker failure channel) are the optional wire slots, stamped for the engine
- store to read as the tag SSOT. Positional
Tag()(key, payload, success?, error?) is also valid.
QueueTagConfig<function (type parameter) F in build<F extends Schema.Struct.Fields>(key: string, second: Schema.Struct<F> | QueueTagConfig<F, Schema.Top, Schema.Top>, third?: Schema.Top | QueueTagPositionalOptions, fourth?: Schema.Top): QueueTag<Self, F, any, any> & QueueSuccessCarrier<any> & QueueErrorCarrier<any> & QueueItemSchemaCarrier<F>F, import SchemaSchema.Top, import SchemaSchema.Top>,
third: | Schema.Top
| QueueTagPositionalOptions
| undefined
third?: import SchemaSchema.Top | QueueTagPositionalOptions,
fourth: Schema.Top | undefinedfourth?: import SchemaSchema.Top,
): type QueueTag<
Self,
F extends Schema.Struct.Fields,
Success extends Schema.Top = Schema.Void,
Error extends Schema.Top = Schema.Never
> = HyperlinkTag<
Self,
{
add: any
prioritize: any
defer: any
enqueue: any
release: any
releaseEncoded: any
deadLetter: any
drop: any
events: any
status: any
size: any
isEmpty: any
start: any
pause: any
resume: any
shutdown: any
clear: any
metrics: {
stream: any
query: any
}
},
QueueHyperlink<
Hyperlink.Decoded<Schema.Struct<F>>,
Success["Type"],
Error["Type"],
never
>
>
The queue's
Hyperlink.Tag
whose service value is the named
QueueHyperlink
handle
(via the Svc seam on
HyperlinkTag
), so yield* MyQueue hovers as
QueueHyperlink<EmailJob> rather than the expanded ServiceOf<…> wall.
QueueTag<function (type parameter) Self in <Self>(): {
<F extends Schema.Struct.Fields, HSelf>(key: string, payload: Schema.Struct<F>, options: {
readonly description?: string;
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields>(key: string, payload: Schema.Struct<F>, options?: {
readonly description?: string;
}): QueueTag<Self, F> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, HSelf>(key: string, config: QueueTagConfig<F> & {
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>;
}
Self, function (type parameter) F in build<F extends Schema.Struct.Fields>(key: string, second: Schema.Struct<F> | QueueTagConfig<F, Schema.Top, Schema.Top>, third?: Schema.Top | QueueTagPositionalOptions, fourth?: Schema.Top): QueueTag<Self, F, any, any> & QueueSuccessCarrier<any> & QueueErrorCarrier<any> & QueueItemSchemaCarrier<F>F, any, any> &
interface QueueSuccessCarrier<Success extends Schema.Top = Schema.Void>A phantom marker intersected onto a
Tag
to carry the worker success schema (A's
schema) at the type level, without touching the (invariant, RPC-facing) spec. The layer / serve
config and the store analytics recover A from here (default
Schema.Void
). Type-only — no
runtime field; the runtime success schema still rides the successSym stamp.
QueueSuccessCarrier<any> &
interface QueueErrorCarrier<Error extends Schema.Top = Schema.Never>A phantom marker intersected onto a
Tag
to carry the worker error schema (E's
schema) at the type level — the mirror of
QueueSuccessCarrier
. The layer / serve config
constrains the worker's failure channel to this (default
Schema.Never
: no declared error →
the worker must be infallible, or defect). Type-only — no runtime field; the runtime error schema
rides the wire stamp.
QueueErrorCarrier<any> &
import QueueItemSchemaCarrierQueueItemSchemaCarrier<function (type parameter) F in build<F extends Schema.Struct.Fields>(key: string, second: Schema.Struct<F> | QueueTagConfig<F, Schema.Top, Schema.Top>, third?: Schema.Top | QueueTagPositionalOptions, fourth?: Schema.Top): QueueTag<Self, F, any, any> & QueueSuccessCarrier<any> & QueueErrorCarrier<any> & QueueItemSchemaCarrier<F>F> {
const const resolved: {
payload: Schema.Struct<F>
success: Schema.Top | undefined
error: Schema.Top | undefined
description: string | undefined
node: any
}
resolved = const isQueueTagConfig: <
F extends Schema.Struct.Fields
>(
value:
| Schema.Struct<F>
| QueueTagConfig<F, Schema.Top, Schema.Top>
) => value is QueueTagConfig<
F,
Schema.Top,
Schema.Top
>
The 2nd arg is the config-object form (not a payload schema).
isQueueTagConfig(second: | Schema.Struct<F>
| QueueTagConfig<F, Schema.Top, Schema.Top>
second)
? {
payload: Schema.Struct<F>(property) 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: second: | Schema.Struct<F>
| QueueTagConfig<F, Schema.Top, Schema.Top>
(parameter) second: {
payload: Schema.Struct<F>;
success: Success;
error: Error;
description: string;
node: NodeKey<unknown>;
}
second.QueueTagConfig<F, Top, Top>.payload: Schema.Struct<F>(property) QueueTagConfig<F, Top, Top>.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,
success: Schema.Top | undefinedsuccess: second: | Schema.Struct<F>
| QueueTagConfig<F, Schema.Top, Schema.Top>
(parameter) second: {
payload: Schema.Struct<F>;
success: Success;
error: Error;
description: string;
node: NodeKey<unknown>;
}
second.QueueTagConfig<F, Top, Top>.success?: Schema.Top | undefinedsuccess,
error: Schema.Top | undefinederror: second: | Schema.Struct<F>
| QueueTagConfig<F, Schema.Top, Schema.Top>
(parameter) second: {
payload: Schema.Struct<F>;
success: Success;
error: Error;
description: string;
node: NodeKey<unknown>;
}
second.QueueTagConfig<F, Top, Top>.error?: Schema.Top | undefinederror,
description: string | undefineddescription: second: | Schema.Struct<F>
| QueueTagConfig<F, Schema.Top, Schema.Top>
(parameter) second: {
payload: Schema.Struct<F>;
success: Success;
error: Error;
description: string;
node: NodeKey<unknown>;
}
second.QueueTagConfig<F, Top, Top>.description?: string | undefineddescription,
node: anynode: second: | Schema.Struct<F>
| QueueTagConfig<F, Schema.Top, Schema.Top>
(parameter) second: {
payload: Schema.Struct<F>;
success: Success;
error: Error;
description: string;
node: NodeKey<unknown>;
}
second.QueueTagConfig<F extends Schema.Struct.Fields, Success extends Schema.Top = Void, Error extends Schema.Top = Never>.node?: anynode,
}
: import SchemaSchema.function isSchema(
u: unknown
): u is Schema.Top
Checks whether a value is a Schema.
isSchema(third: | Schema.Top
| QueueTagPositionalOptions
| undefined
third)
? {
payload: Schema.Struct<F>(property) 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: second: | Schema.Struct<F>
| QueueTagConfig<F, Schema.Top, Schema.Top>
(parameter) second: {
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; <…;
}
second,
success: Schema.Top(property) success: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<unknown, any>) => Schema.Top;
annotateKey: (annotations: Schema.Annotations.Key<unknown>) => Schema.Top;
check: (checks_0: Check<unknown>, ...checks: Array<Check<unknown>>) => Schema.Top;
rebuild: (ast: AST) => Schema.Top;
make: (input: unknown, options?: Schema.MakeOptions) => unknown;
makeOption: (input: unknown, options?: Schema.MakeOptions) => Option.Option<unknown>;
makeEffect: (input: unknown, options?: Schema.MakeOptions) => Effect.Effect<unknown, 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; <…;
}
success: third: Schema.Top(parameter) third: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<unknown, any>) => Schema.Top;
annotateKey: (annotations: Schema.Annotations.Key<unknown>) => Schema.Top;
check: (checks_0: Check<unknown>, ...checks: Array<Check<unknown>>) => Schema.Top;
rebuild: (ast: AST) => Schema.Top;
make: (input: unknown, options?: Schema.MakeOptions) => unknown;
makeOption: (input: unknown, options?: Schema.MakeOptions) => Option.Option<unknown>;
makeEffect: (input: unknown, options?: Schema.MakeOptions) => Effect.Effect<unknown, 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; <…;
}
third,
error: Schema.Top | undefinederror: fourth: Schema.Top | undefinedfourth,
description: undefineddescription: var undefinedundefined,
node: undefinednode: var undefinedundefined,
}
: {
payload: Schema.Struct<F>(property) 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: second: | Schema.Struct<F>
| QueueTagConfig<F, Schema.Top, Schema.Top>
(parameter) second: {
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; <…;
}
second,
success: undefinedsuccess: var undefinedundefined,
error: undefinederror: var undefinedundefined,
description: string | undefineddescription: third: QueueTagPositionalOptions | undefinedthird?.QueueTagPositionalOptions.description?: string | undefineddescription,
node: anynode: third: QueueTagPositionalOptions | undefinedthird?.QueueTagPositionalOptions.node?: anynode,
};
return const nameQueueService: <
Self,
F extends Schema.Struct.Fields,
Success extends Schema.Top = Schema.Void,
Error extends Schema.Top = Schema.Never
>(
tag: HyperlinkTag<
Self,
QueueInstanceSpec<F, Success, Error>
> &
QueueItemSchemaCarrier<F>
) => QueueTag<Self, F, Success, Error> &
QueueItemSchemaCarrier<F>
Name the built queue tag's service as
QueueHyperlink
. The single, deliberate cast in this
module: ServiceOf<QueueInstanceSpec<F, Success, Error>> and
QueueHyperlink<QueueItemOf<F>, Success["Type"], Error["Type"]> are mutually assignable — proven
bidirectionally in test/queue-handle.test-d.ts — but TS can't verify that equality for generic
F at the invariant service-Shape position, so the generic factory needs one assertion here.
Owner-approved (the alternative was a schema-field hover, not EmailJob). The .test-d.ts is the
soundness guard: if the shapes ever diverge, it fails the build.
nameQueueService(const materializeQueueTag: <Self, F, Schema.Top, Schema.Top>(key: string, resolved: {
readonly payload: Schema.Struct<F>;
readonly success?: Schema.Top | undefined;
readonly error?: Schema.Top | undefined;
readonly description?: string;
readonly node?: NodeKey<unknown>;
}) => HyperlinkTag<Self, {
add: any;
prioritize: any;
defer: any;
enqueue: any;
release: any;
releaseEncoded: any;
deadLetter: any;
drop: any;
events: any;
status: any;
size: any;
isEmpty: any;
start: any;
pause: any;
resume: any;
shutdown: any;
clear: any;
metrics: {
stream: any;
query: any;
};
}> & QueueItemSchemaCarrier<F>
materializeQueueTag<function (type parameter) Self in <Self>(): {
<F extends Schema.Struct.Fields, HSelf>(key: string, payload: Schema.Struct<F>, options: {
readonly description?: string;
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, Success extends Schema.Top, Error extends Schema.Top = Schema.Never>(key: string, payload: Schema.Struct<F>, success: Success, error?: Error): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields>(key: string, payload: Schema.Struct<F>, options?: {
readonly description?: string;
}): QueueTag<Self, F> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, HSelf>(key: string, config: QueueTagConfig<F> & {
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F>;
<F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(key: string, config: QueueTagConfig<F, Success, Error>): QueueTag<Self, F, Success, Error> & QueueSuccessCarrier<Success> & QueueErrorCarrier<Error> & QueueItemSchemaCarrier<F>;
}
Self, function (type parameter) F in build<F extends Schema.Struct.Fields>(key: string, second: Schema.Struct<F> | QueueTagConfig<F, Schema.Top, Schema.Top>, third?: Schema.Top | QueueTagPositionalOptions, fourth?: Schema.Top): QueueTag<Self, F, any, any> & QueueSuccessCarrier<any> & QueueErrorCarrier<any> & QueueItemSchemaCarrier<F>F, import SchemaSchema.Top, import SchemaSchema.Top>(key: stringkey, const resolved: {
payload: Schema.Struct<F>
success: Schema.Top | undefined
error: Schema.Top | undefined
description: string | undefined
node: any
}
resolved));
}
return function (local function) build<F extends Schema.Struct.Fields, HSelf>(key: string, payload: Schema.Struct<F>, options: {
readonly description?: string;
readonly node: NodeKey<HSelf>;
}): QueueNodeBoundTag<Self, F, HSelf> & QueueSuccessCarrier<typeof Schema.Void> & QueueErrorCarrier<typeof Schema.Never> & QueueItemSchemaCarrier<F> (+4 overloads)
build;
};