ServiceConfig<I, A, E, R>Full Service config — wire schemas and the gated effect in one object.
export interface interface ServiceConfig<I extends Schema.Top = Schema.Void, A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never, R = never>Full
Service
config — wire schemas and the gated effect in one object.
ServiceConfig<
function (type parameter) I in ServiceConfig<I extends Schema.Top = Schema.Void, A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never, R = never>I 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,
function (type parameter) A in ServiceConfig<I extends Schema.Top = Schema.Void, A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never, R = never>A 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,
function (type parameter) E in ServiceConfig<I extends Schema.Top = Schema.Void, A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never, R = never>E extends import SchemaSchema.Top = typeof import SchemaSchema.const Never: 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?: MakeOptions) => never;
makeOption: (input: never, options?: MakeOptions) => Option_.Option<never>;
makeEffect: (input: never, options?: MakeOptions) => Effect.Effect<never, 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,
function (type parameter) R in ServiceConfig<I extends Schema.Top = Schema.Void, A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never, R = never>R = never,
> extends interface WireSchemas<I extends Schema.Top = Schema.Void, A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never>Wire schemas shared by
Tag
and
Service
.
WireSchemas<function (type parameter) I in ServiceConfig<I extends Schema.Top = Schema.Void, A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never, R = never>I, function (type parameter) A in ServiceConfig<I extends Schema.Top = Schema.Void, A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never, R = never>A, function (type parameter) E in ServiceConfig<I extends Schema.Top = Schema.Void, A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never, R = never>E> {
/** Unit gates may pass a bare effect; parameterized gates use `(input) => Effect`. */
readonly ServiceConfig<I extends Schema.Top = Void, A extends Schema.Top = Void, E extends Schema.Top = Never, R = never>.effect: ServiceEffect<I, A, E, R>Unit gates may pass a bare effect; parameterized gates use (input) => Effect.
effect: type ServiceEffect<
I extends Schema.Top,
A extends Schema.Top,
E extends Schema.Top,
R
> = [Schema.Schema.Type<I>] extends [void]
?
| Effect.Effect<
Schema.Schema.Type<A>,
Schema.Schema.Type<E>,
R
>
| (() => Effect.Effect<
Schema.Schema.Type<A>,
Schema.Schema.Type<E>,
R
>)
: (
input: Schema.Schema.Type<I>
) => Effect.Effect<
Schema.Schema.Type<A>,
Schema.Schema.Type<E>,
R
>
Gated effect for
Service
— same rules as
LayerEffect
at the decoded type.
ServiceEffect<function (type parameter) I in ServiceConfig<I extends Schema.Top = Schema.Void, A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never, R = never>I, function (type parameter) A in ServiceConfig<I extends Schema.Top = Schema.Void, A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never, R = never>A, function (type parameter) E in ServiceConfig<I extends Schema.Top = Schema.Void, A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never, R = never>E, function (type parameter) R in ServiceConfig<I extends Schema.Top = Schema.Void, A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never, R = never>R>;
/**
* Max concurrent executions through this gate.
* @default 1
*/
readonly ServiceConfig<I extends Schema.Top = Void, A extends Schema.Top = Void, E extends Schema.Top = Never, R = never>.concurrency?: number | undefinedMax concurrent executions through this gate.
concurrency?: number;
/**
* Optional Effect `RateLimiter` on each `run` (before the concurrency semaphore).
* Omitted = no rate limit (only {@link concurrency}).
*/
readonly ServiceConfig<I extends Schema.Top = Void, A extends Schema.Top = Void, E extends Schema.Top = Never, R = never>.rateLimit?: RateLimitOptionsOptional Effect RateLimiter on each run (before the concurrency semaphore).
Omitted = no rate limit (only
concurrency
).
rateLimit?: type RateLimitOptions = Omit<
{
readonly algorithm?:
| "fixed-window"
| "token-bucket"
| undefined
readonly onExceeded?:
| "delay"
| "fail"
| undefined
readonly window: Input
readonly limit: number
readonly key: string
readonly tokens?: number | undefined
},
"key"
> & {
readonly key?: internal.RateLimiterConsumeOptions["key"]
}
Effect RateLimiter.consume / makeWithRateLimiter options for a gate
(key optional — defaults to the gate hyperlink / tag id). Policy only; the
RateLimiter / RateLimiterStore services are presence-driven in Context.
RateLimitOptions;
}