<A = void, E = never, R = never>(
tag: HyperlinkTag<any, any, any>,
patch: ConfigPatch<DaemonLayerConfig<A, E, R>>
): Layer.Layer<never>A config-patch layer for the daemon tag — merge it with the daemon's layer and its
patch (polling / a (previous) => next wrap of effect) folds onto the base config at build.
export const const configure: <
A = void,
E = never,
R = never
>(
tag: HyperlinkTag<any, any, any>,
patch: ConfigPatch<DaemonLayerConfig<A, E, R>>
) => Layer.Layer<never>
A config-patch layer for the daemon tag — merge it with the daemon's
layer
and its
patch (polling / a (previous) => next wrap of effect) folds onto the base config at build.
configure = <function (type parameter) A in <A = void, E = never, R = never>(tag: HyperlinkTag<any, any, any>, patch: ConfigPatch<DaemonLayerConfig<A, E, R>>): Layer.Layer<never>A = void, function (type parameter) E in <A = void, E = never, R = never>(tag: HyperlinkTag<any, any, any>, patch: ConfigPatch<DaemonLayerConfig<A, E, R>>): Layer.Layer<never>E = never, function (type parameter) R in <A = void, E = never, R = never>(tag: HyperlinkTag<any, any, any>, patch: ConfigPatch<DaemonLayerConfig<A, E, R>>): Layer.Layer<never>R = never>(
tag: HyperlinkTag<any, any, any>(parameter) tag: {
description: string | undefined;
key: Identifier;
of: (this: void, self: any) => any;
context: (self: any) => Context.Context<any>;
use: (f: (service: any) => Effect.Effect<A, E, R>) => Effect.Effect<A, E, any>;
useSync: (f: (service: any) => A) => Effect.Effect<A, never, any>;
Identifier: Identifier;
Service: Shape;
stack: string | undefined;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
tag: interface HyperlinkTag<Self, S extends Spec, Svc = Simplify<{ readonly [K in keyof S]: S[K] extends FromLocalMethod<infer M> ? InjectLocal<M, Self> : S[K] extends LocalMethod<infer T> ? LocalEffect<...> : S[K] extends DefaultMethod<...> ? F : S[K] extends { ...; } ? SuccessOf<...> : S[K] extends { ...; } ? Subscribable<...> : S[K] extends { ...; } ? ClientMethod<...> : S[K] extends Spec ? Simplify<...> : never; }>>The type of a HyperService tag carrying spec S — what
Hyperlink.Tag
produces
(and what you extend). Lets a consumer write
<S extends Spec>(tag: HyperlinkTag<Self, S>) and read the spec through named types
(
specOf
/
groupOf
) instead of a Parameters<typeof specOf> workaround.
HyperlinkTag<any, any, any>,
patch: ConfigPatch<DaemonLayerConfig<A, E, R>>patch: type ConfigPatch<T> = PartialConfigPatch<T> | ((previous: T) => T)Patch for a hyperlink or daemon spec.
- Partial object — shallow-merge fields; use a function value to replace a field.
effect field — a unary function (previous) => next updates the prior worker /
supervised body; a multi-argument function value replaces effect outright (queue workers
stay two-argument).
- Full reducer —
(previous) => next over the whole spec (see
configureLayer
).
ConfigPatch<interface DaemonLayerConfig<A, E, R>Config for
layer
/
serve
/
serveRemote
. The effect is the work each run
performs; its success is captured into result when the tag is value-returning. Scheduling comes
from the tag now (Daemon.schedule(...)), not the config.
DaemonLayerConfig<function (type parameter) A in <A = void, E = never, R = never>(tag: HyperlinkTag<any, any, any>, patch: ConfigPatch<DaemonLayerConfig<A, E, R>>): Layer.Layer<never>A, function (type parameter) E in <A = void, E = never, R = never>(tag: HyperlinkTag<any, any, any>, patch: ConfigPatch<DaemonLayerConfig<A, E, R>>): Layer.Layer<never>E, function (type parameter) R in <A = void, E = never, R = never>(tag: HyperlinkTag<any, any, any>, patch: ConfigPatch<DaemonLayerConfig<A, E, R>>): Layer.Layer<never>R>>,
): import LayerLayer.interface Layer<in ROut, out E = never, out RIn = never>A Layer describes how to build one or more services for dependency injection.
When to use
Use to model construction of application services for dependency injection,
especially when services have dependencies, can fail during construction, or
need scoped setup and release.
Details
A Layer<ROut, E, RIn> represents ROut as the services this layer
provides, E as the possible errors during layer construction, and RIn as
the services this layer requires as dependencies.
Layer<never> => configureLayer<T extends object>(resourceId: string, patch: ConfigPatch<T>): Layer.Layer<never>Layer that appends one configure patch for resourceId.
Provide or merge with the HyperService .layer so patches are visible when that layer builds.
configureLayer(tag: HyperlinkTag<any, any, any>(parameter) tag: {
description: string | undefined;
key: Identifier;
of: (this: void, self: any) => any;
context: (self: any) => Context.Context<any>;
use: (f: (service: any) => Effect.Effect<A, E, R>) => Effect.Effect<A, E, any>;
useSync: (f: (service: any) => A) => Effect.Effect<A, never, any>;
Identifier: Identifier;
Service: Shape;
stack: string | undefined;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
tag.ServiceClass<any, string, any>.key: stringkey, patch: ConfigPatch<DaemonLayerConfig<A, E, R>>patch);