<Self, ROut = never>(
name: string,
options?: PrototypeOptions
): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true
kind: ProtocolKind | undefined
ipc: "unix" | "nPipe"
onConflict: OnConflict
url: undefined
path: undefined
[catalogSym]: ROut | undefined
make: {
(
cloneName: string,
target: {
readonly path: string
readonly kind?: "IpcSocket"
readonly onConflict?: OnConflict
}
): IpcNodeTagClass<Self, ROut>
(
cloneName: string,
target: {
readonly url: `ws://${string}` | `wss://${string}`
readonly kind?: "WebSocket"
readonly onConflict?: OnConflict
}
): WsNodeTagClass<Self, ROut>
(
cloneName: string,
target: {
readonly url: string
readonly kind: "WebSocket"
readonly onConflict?: OnConflict
}
): WsNodeTagClass<Self, ROut>
(
cloneName: string,
target: {
readonly url: string
readonly kind: "Http"
readonly onConflict?: OnConflict
}
): HttpNodeTagClass<Self, ROut>
(
cloneName: string,
target: {
readonly url: string
readonly kind?: ProtocolKind
readonly onConflict?: OnConflict
}
): UrlNodeTagClass<Self, ROut>
}
instance: (
suffix?: string
) => NodeTagClass<
Self,
ROut,
| BareAddress
| IpcAddress
| HttpAddress
| WsAddress
| UrlAddressLoose
| MultiAddress<ProtocolKind>
> & {
instanceSuffix?: string | undefined
isDynamicInstance: true
dynamicPrototypeKey: string
}
listen: <const Serves extends ServeLayerList>(
serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>,
listenOptions?: number | string | ListenOptions
) => (
suffix?: string
) => Layer.Layer<
Layer.Success<Serves[number]> | ListenNode,
Layer.Error<Serves[number]>,
Layer.Services<Serves[number]>
>
}Prototype Node template (D7) — a Node kind, nested on Node as Prototype.
No address until cloned:
class MailWorker extends Prototype<MailWorker, Mail>("app/MailWorker") {}
// Named clone with a fixed address (class ctor):
class East extends MailWorker.make("East", { path: "/tmp/east.sock" }) {}
// Dynamic instances — same protocol siblings + Lookup pipe as unix/http/ws/nPipe:
const mailWorker = MailWorker.listen([Hyperlink.serve(Mail, impl)])
mailWorker().pipe(Layer.provide(Lookup.layer))
mailWorker("w1").pipe(Layer.provide(Lookup.layer))Lookup is not baked in — pipe Lookup.layer / layerOptions / client like the
protocol listen siblings.
export const const Prototype: <Self, ROut = never>(
name: string,
options?: PrototypeOptions
) => Context.ServiceClass<
Self,
string,
Record<string, never>
> & {
isPrototype: true
kind: ProtocolKind | undefined
ipc: "unix" | "nPipe"
onConflict: OnConflict
url: undefined
path: undefined
[catalogSym]: ROut | undefined
make: {
(
cloneName: string,
target: {
readonly path: string
readonly kind?: "IpcSocket"
readonly onConflict?: OnConflict
}
): IpcNodeTagClass<Self, ROut>
(
cloneName: string,
target: {
readonly url:
| `ws://${string}`
| `wss://${string}`
readonly kind?: "WebSocket"
readonly onConflict?: OnConflict
}
): WsNodeTagClass<Self, ROut>
(
cloneName: string,
target: {
readonly url: string
readonly kind: "WebSocket"
readonly onConflict?: OnConflict
}
): WsNodeTagClass<Self, ROut>
(
cloneName: string,
target: {
readonly url: string
readonly kind: "Http"
readonly onConflict?: OnConflict
}
): HttpNodeTagClass<Self, ROut>
(
cloneName: string,
target: {
readonly url: string
readonly kind?: ProtocolKind
readonly onConflict?: OnConflict
}
): UrlNodeTagClass<Self, ROut>
}
instance: (
suffix?: string
) => NodeTagClass<
Self,
ROut,
| IpcAddress
| WsAddress
| HttpAddress
| UrlAddressLoose
| BareAddress
| MultiAddress<ProtocolKind>
> & {
instanceSuffix?: string | undefined
isDynamicInstance: true
dynamicPrototypeKey: string
}
listen: <Serves extends ServeLayerList>(
serves: Serves &
ServesForCatalog<
Exclude<ROut, undefined>,
Serves
>,
listenOptions?:
| number
| string
| ListenOptions
) => (
suffix?: string
) => Layer.Layer<
Layer.Success<Serves[number]> | ListenNode,
Layer.Error<Serves[number]>,
Layer.Services<Serves[number]>
>
}
Prototype Node template (D7) — a Node kind, nested on
Node
as Prototype.
No address until cloned:
class MailWorker extends Prototype<MailWorker, Mail>("app/MailWorker") {}
// Named clone with a fixed address (class ctor):
class East extends MailWorker.make("East", { path: "/tmp/east.sock" }) {}
// Dynamic instances — same protocol siblings + Lookup pipe as unix/http/ws/nPipe:
const mailWorker = MailWorker.listen([Hyperlink.serve(Mail, impl)])
mailWorker().pipe(Layer.provide(Lookup.layer))
mailWorker("w1").pipe(Layer.provide(Lookup.layer))
Lookup is not baked in — pipe Lookup.layer / layerOptions / client like the
protocol listen siblings.
Prototype = <function (type parameter) Self in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
Self, function (type parameter) ROut in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
ROut = never>(
name: stringname: string,
options: PrototypeOptions | undefinedoptions?: type PrototypeOptions = {
readonly kind?: ProtocolKind
readonly ipc?: "unix" | "nPipe"
readonly onConflict?: OnConflict
}
Prototype ctor options — kind picks the listen sibling; ipc selects unix vs nPipe.
PrototypeOptions,
) => {
const const protoOnConflict:
| OnConflict
| undefined
protoOnConflict = options: PrototypeOptions | undefinedoptions?.onConflict?: OnConflictonConflict;
const const instance: (
suffix?: string
) => NodeTagClass<
Self,
ROut,
| IpcAddress
| WsAddress
| HttpAddress
| UrlAddressLoose
| BareAddress
| MultiAddress<ProtocolKind>
> & {
instanceSuffix?: string | undefined
isDynamicInstance: true
dynamicPrototypeKey: string
}
instance = (suffix: string | undefinedsuffix?: string) => {
const const key: stringkey =
suffix: string | undefinedsuffix !== var undefinedundefined && suffix: stringsuffix.String.length: numberReturns the length of a String object.
length > 0 ? `${name: stringname}#${suffix: stringsuffix}` : name: stringname;
return var Object: ObjectConstructorProvides functionality common to all JavaScript objects.
Object.ObjectConstructor.assign<NodeTagClass<Self, ROut, IpcAddress | WsAddress | HttpAddress | UrlAddressLoose | BareAddress | MultiAddress<ProtocolKind>>, {
instanceSuffix?: string | undefined;
isDynamicInstance: true;
dynamicPrototypeKey: string;
}>(target: NodeTagClass<Self, ROut, IpcAddress | WsAddress | HttpAddress | UrlAddressLoose | BareAddress | MultiAddress<ProtocolKind>>, source: {
instanceSuffix?: string | undefined;
isDynamicInstance: true;
dynamicPrototypeKey: string;
}): NodeTagClass<...> & {
instanceSuffix?: string | undefined;
isDynamicInstance: true;
dynamicPrototypeKey: string;
} (+3 overloads)
Copy the values of all of the enumerable own properties from one or more source objects to a
target object. Returns the target object.
assign(
Tag<Self, ROut = never>(): { (key: string): NodeTagClass<Self, ROut, BareAddress>; (key: string, target: { readonly path: string; readonly kind?: 'IpcSocket'; readonly onConflict?: OnConflict }): NodeTagClass<Self, ROut, IpcAddress>; (key: string, target: number | `:${number}`): NodeTagClass<Self, ROut, HttpAddress>; (key: string, target: `ws://${string}` | `wss://${string}`): NodeTagClass<Self, ROut, WsAddress>; (key: string, target: `http://${string}` | `https://${string}`): NodeTagClass<Self, ROut, HttpAddress>; (key: string, target: { readonly url: `ws://${string}` | `wss://${string}`; readonly kind?: 'WebSocket'; readonly onConflict?: OnConflict }): NodeTagClass<Self, ROut, WsAddress>; (key: string, target: { readonly url: string; readonly kind: 'WebSocket'; readonly onConflict?: OnConflict }): NodeTagClass<Self, ROut, WsAddress>; (key: string, target: { readonly url: string; readonly kind: 'Http'; readonly onConflict?: OnConflict }): NodeTagClass<Self, ROut, HttpAddress>; <T extends ShorthandTarget>(key: string, target: T): NodeTagClass<Self, ROut, MultiAddress<KindsOf<T>>>; (key: string, target: string | { readonly url: string; readonly kind?: ProtocolKind; readonly onConflict?: OnConflict }): NodeTagClass<Self, ROut, UrlAddressLoose>; (key: string, target?: LooseNodeTarget): NodeTagClass<Self, ROut, BareAddress | IpcAddress | HttpAddress | WsAddress | UrlAddressLoose | MultiAddress<ProtocolKind>> }Declare a node — a named transport endpoint a HyperService connects to. Two-stage and keyed by
a string, mirroring Effect's Context.Service<Self, Shape>()(key) (a node is a Context.Key,
resolved by its key in the Context map) and every sibling factory (Hyperlink.Tag<Self>(), …).
The second call infers the target shape, so the { http, ws } shorthand types its
ProtocolKind
set precisely. Optional catalog type param ROut (C2) — prefer import type
for those handles (C4). Templates (no address until cloned) live on
Node
.Prototype:
class EdgeNode extends Node.Tag<EdgeNode>()("edge") {} // no address yet
class Worker extends Node.Tag<Worker>()("worker", 3001) {} // → http://localhost:3001/rpc, kind "Http"
class Mail extends Node.Tag<Mail>()("mail", "https://mail.internal/rpc") {} // full url, as-is, kind "Http"
class Live extends Node.Tag<Live>()("live", { url: "wss://live/rpc" }) {} // kind "WebSocket" (inferred from ws url)
class Push extends Node.Tag<Push>()("push", { url: "/rpc", kind: "WebSocket" }) {} // same-origin path, explicit kind
class Local extends Node.Tag<Local>()("local", { path: "/tmp/local.sock" }) {} // kind "IpcSocket" (Unix domain)
class Droplet extends Node.Tag<Droplet>()("droplet", { http: "http://d/rpc", ws: "ws://d/rpc" }) {} // multi-protocol
import type { Jobs, Emails } from "@app/contracts"
class AppWorker extends Node.Tag<AppWorker, Jobs | Emails>()("app/Worker", { path: "/tmp/w.sock" }) {}
class MailWorker extends Node.Prototype<MailWorker, Mail>("app/MailWorker") {}
The key is the service key. The optional address matches a dial target: a port
(3001 or ":3001" → http://localhost:3001/rpc), a full url (used as-is), { url, kind } for
an explicit endpoint, { path } for a Unix-domain socket (kind: "IpcSocket"), or the
{ http, ws, ipc } multi-protocol shorthand. The node carries
ProtocolKind
so the topology
is self-describing about where AND how:
connect
(node) derives the transport with no
protocol argument.
Dialable targets return an
AddressedNode
(kind: ProtocolKind) so
Hyperlink.client(Tag, Worker) can auto-wire
connect
. Bare Node.Tag()("x")
stays address-less (kind: undefined) — still needs explicit connect / lookup.
Tag<function (type parameter) Self in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
Self, function (type parameter) ROut in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
ROut>()(
const key: stringkey,
const protoOnConflict:
| OnConflict
| undefined
protoOnConflict !== var undefinedundefined
? { onConflict: OnConflictonConflict: const protoOnConflict: OnConflictprotoOnConflict }
: var undefinedundefined,
),
{
isDynamicInstance: trueisDynamicInstance: true as type const = trueconst,
dynamicPrototypeKey: stringdynamicPrototypeKey: name: stringname,
...(suffix: string | undefinedsuffix !== var undefinedundefined && suffix: stringsuffix.String.length: numberReturns the length of a String object.
length > 0
? { instanceSuffix?: string | undefinedinstanceSuffix: suffix: stringsuffix }
: {}),
},
);
};
function function (local function) make(cloneName: string, target: {
readonly path: string;
readonly kind?: "IpcSocket";
readonly onConflict?: OnConflict;
}): IpcNodeTagClass<Self, ROut> (+4 overloads)
make(
cloneName: stringcloneName: string,
target: {
readonly path: string
readonly kind?: "IpcSocket"
readonly onConflict?: OnConflict
}
target: {
readonly path: stringpath: string;
readonly kind?: "IpcSocket" | undefinedkind?: "IpcSocket";
readonly onConflict?: OnConflictonConflict?: type OnConflict = "livenessReplace" | "askIncumbent" | "reject" | "inherit"Directory advertise conflict policy when the same nodeKey already has a row.
livenessReplace — ping incumbent; alive → reject; dead → replace
askIncumbent — if alive, Lookup asks the incumbent node-status yield; refuse/timeout → reject
reject — alive → reject; dead → still replace
inherit — continue up the resolve chain (call-site → node → Lookup → hard fallback)
OnConflict;
},
): type IpcNodeTagClass<Self, ROut = never> = Context.ServiceClass<Self, string, NodeProtocol> & IpcAddress & {
readonly logs: unknown;
readonly onConflict: OnConflict;
readonly [catalogSym]?: ROut | undefined;
}
Constructable ipc
Tag
(for
Prototype
.make).
IpcNodeTagClass<function (type parameter) Self in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
Self, function (type parameter) ROut in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
ROut>;
function function (local function) make(cloneName: string, target: {
readonly url: `ws://${string}` | `wss://${string}`;
readonly kind?: "WebSocket";
readonly onConflict?: OnConflict;
}): WsNodeTagClass<Self, ROut> (+4 overloads)
make(
cloneName: stringcloneName: string,
target: {
readonly url:
| `ws://${string}`
| `wss://${string}`
readonly kind?: "WebSocket"
readonly onConflict?: OnConflict
}
target: {
readonly url: `ws://${string}` | `wss://${string}`url: `ws://${string}` | `wss://${string}`;
readonly kind?: "WebSocket" | undefinedkind?: "WebSocket";
readonly onConflict?: OnConflictonConflict?: type OnConflict = "livenessReplace" | "askIncumbent" | "reject" | "inherit"Directory advertise conflict policy when the same nodeKey already has a row.
livenessReplace — ping incumbent; alive → reject; dead → replace
askIncumbent — if alive, Lookup asks the incumbent node-status yield; refuse/timeout → reject
reject — alive → reject; dead → still replace
inherit — continue up the resolve chain (call-site → node → Lookup → hard fallback)
OnConflict;
},
): type WsNodeTagClass<Self, ROut = never> = Context.ServiceClass<Self, string, NodeProtocol> & WsAddress & {
readonly logs: unknown;
readonly onConflict: OnConflict;
readonly [catalogSym]?: ROut | undefined;
}
Constructable WebSocket
Tag
.
WsNodeTagClass<function (type parameter) Self in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
Self, function (type parameter) ROut in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
ROut>;
function function (local function) make(cloneName: string, target: {
readonly url: string;
readonly kind: "WebSocket";
readonly onConflict?: OnConflict;
}): WsNodeTagClass<Self, ROut> (+4 overloads)
make(
cloneName: stringcloneName: string,
target: {
readonly url: string
readonly kind: "WebSocket"
readonly onConflict?: OnConflict
}
target: {
readonly url: stringurl: string;
readonly kind: "WebSocket"kind: "WebSocket";
readonly onConflict?: OnConflictonConflict?: type OnConflict = "livenessReplace" | "askIncumbent" | "reject" | "inherit"Directory advertise conflict policy when the same nodeKey already has a row.
livenessReplace — ping incumbent; alive → reject; dead → replace
askIncumbent — if alive, Lookup asks the incumbent node-status yield; refuse/timeout → reject
reject — alive → reject; dead → still replace
inherit — continue up the resolve chain (call-site → node → Lookup → hard fallback)
OnConflict;
},
): type WsNodeTagClass<Self, ROut = never> = Context.ServiceClass<Self, string, NodeProtocol> & WsAddress & {
readonly logs: unknown;
readonly onConflict: OnConflict;
readonly [catalogSym]?: ROut | undefined;
}
Constructable WebSocket
Tag
.
WsNodeTagClass<function (type parameter) Self in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
Self, function (type parameter) ROut in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
ROut>;
function function (local function) make(cloneName: string, target: {
readonly url: string;
readonly kind: "Http";
readonly onConflict?: OnConflict;
}): HttpNodeTagClass<Self, ROut> (+4 overloads)
make(
cloneName: stringcloneName: string,
target: {
readonly url: string
readonly kind: "Http"
readonly onConflict?: OnConflict
}
target: {
readonly url: stringurl: string;
readonly kind: "Http"kind: "Http";
readonly onConflict?: OnConflictonConflict?: type OnConflict = "livenessReplace" | "askIncumbent" | "reject" | "inherit"Directory advertise conflict policy when the same nodeKey already has a row.
livenessReplace — ping incumbent; alive → reject; dead → replace
askIncumbent — if alive, Lookup asks the incumbent node-status yield; refuse/timeout → reject
reject — alive → reject; dead → still replace
inherit — continue up the resolve chain (call-site → node → Lookup → hard fallback)
OnConflict;
},
): type HttpNodeTagClass<Self, ROut = never> = Context.ServiceClass<Self, string, NodeProtocol> & HttpAddress & {
readonly logs: unknown;
readonly onConflict: OnConflict;
readonly [catalogSym]?: ROut | undefined;
}
Constructable http
Tag
.
HttpNodeTagClass<function (type parameter) Self in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
Self, function (type parameter) ROut in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
ROut>;
function function (local function) make(cloneName: string, target: {
readonly url: string;
readonly kind?: ProtocolKind;
readonly onConflict?: OnConflict;
}): UrlNodeTagClass<Self, ROut> (+4 overloads)
make(
cloneName: stringcloneName: string,
target: {
readonly url: string
readonly kind?: ProtocolKind
readonly onConflict?: OnConflict
}
target: {
readonly url: stringurl: string;
readonly kind?: ProtocolKindkind?: type ProtocolKind = "Http" | "WebSocket" | "IpcSocket"The transport a
Node
speaks — tag-style names (apps rarely type this alias; they write
the literals or get inference from url / path):
"Http" — RpcClient.layerProtocolHttp (servers / CLIs)
"WebSocket" — browser WS (layerProtocolWebsocket / client layerProtocolSocket over WS)
"IpcSocket" — Unix-domain socket (same-machine; see
ipcServer
)
Stamped on the node so the topology is self-describing about how to reach it — connect/client
derive the transport from it. Inferred from a ws(s):// url, an http target, or { path } →
IpcSocket; otherwise declare it explicitly.
ProtocolKind;
readonly onConflict?: OnConflictonConflict?: type OnConflict = "livenessReplace" | "askIncumbent" | "reject" | "inherit"Directory advertise conflict policy when the same nodeKey already has a row.
livenessReplace — ping incumbent; alive → reject; dead → replace
askIncumbent — if alive, Lookup asks the incumbent node-status yield; refuse/timeout → reject
reject — alive → reject; dead → still replace
inherit — continue up the resolve chain (call-site → node → Lookup → hard fallback)
OnConflict;
},
): type UrlNodeTagClass<Self, ROut = never> = Context.ServiceClass<Self, string, NodeProtocol> & UrlAddressLoose & {
readonly logs: unknown;
readonly onConflict: OnConflict;
readonly [catalogSym]?: ROut | undefined;
}
Constructable loose-url
Tag
(for
Prototype
.make).
UrlNodeTagClass<function (type parameter) Self in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
Self, function (type parameter) ROut in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
ROut>;
function function (local function) make(cloneName: string, target: {
readonly path: string;
readonly kind?: "IpcSocket";
readonly onConflict?: OnConflict;
}): IpcNodeTagClass<Self, ROut> (+4 overloads)
make(
cloneName: stringcloneName: string,
target: | {
readonly path: string
readonly kind?: "IpcSocket"
readonly onConflict?: OnConflict
}
| {
readonly url: string
readonly kind?: ProtocolKind
readonly onConflict?: OnConflict
}
target:
| {
readonly path: stringpath: string;
readonly kind?: "IpcSocket" | undefinedkind?: "IpcSocket";
readonly onConflict?: OnConflictonConflict?: type OnConflict = "livenessReplace" | "askIncumbent" | "reject" | "inherit"Directory advertise conflict policy when the same nodeKey already has a row.
livenessReplace — ping incumbent; alive → reject; dead → replace
askIncumbent — if alive, Lookup asks the incumbent node-status yield; refuse/timeout → reject
reject — alive → reject; dead → still replace
inherit — continue up the resolve chain (call-site → node → Lookup → hard fallback)
OnConflict;
}
| {
readonly url: stringurl: string;
readonly kind?: ProtocolKindkind?: type ProtocolKind = "Http" | "WebSocket" | "IpcSocket"The transport a
Node
speaks — tag-style names (apps rarely type this alias; they write
the literals or get inference from url / path):
"Http" — RpcClient.layerProtocolHttp (servers / CLIs)
"WebSocket" — browser WS (layerProtocolWebsocket / client layerProtocolSocket over WS)
"IpcSocket" — Unix-domain socket (same-machine; see
ipcServer
)
Stamped on the node so the topology is self-describing about how to reach it — connect/client
derive the transport from it. Inferred from a ws(s):// url, an http target, or { path } →
IpcSocket; otherwise declare it explicitly.
ProtocolKind;
readonly onConflict?: OnConflictonConflict?: type OnConflict = "livenessReplace" | "askIncumbent" | "reject" | "inherit"Directory advertise conflict policy when the same nodeKey already has a row.
livenessReplace — ping incumbent; alive → reject; dead → replace
askIncumbent — if alive, Lookup asks the incumbent node-status yield; refuse/timeout → reject
reject — alive → reject; dead → still replace
inherit — continue up the resolve chain (call-site → node → Lookup → hard fallback)
OnConflict;
},
): type IpcNodeTagClass<Self, ROut = never> = Context.ServiceClass<Self, string, NodeProtocol> & IpcAddress & {
readonly logs: unknown;
readonly onConflict: OnConflict;
readonly [catalogSym]?: ROut | undefined;
}
Constructable ipc
Tag
(for
Prototype
.make).
IpcNodeTagClass<function (type parameter) Self in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
Self, function (type parameter) ROut in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
ROut> | type UrlNodeTagClass<Self, ROut = never> = Context.ServiceClass<Self, string, NodeProtocol> & UrlAddressLoose & {
readonly logs: unknown;
readonly onConflict: OnConflict;
readonly [catalogSym]?: ROut | undefined;
}
Constructable loose-url
Tag
(for
Prototype
.make).
UrlNodeTagClass<function (type parameter) Self in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
Self, function (type parameter) ROut in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
ROut> {
const const onConflict: OnConflict | undefinedonConflict = target: | {
readonly path: string
readonly kind?: "IpcSocket"
readonly onConflict?: OnConflict
}
| {
readonly url: string
readonly kind?: ProtocolKind
readonly onConflict?: OnConflict
}
target.onConflict?: OnConflict | undefinedonConflict ?? const protoOnConflict:
| OnConflict
| undefined
protoOnConflict;
// Branch so each Tag call hits a dialable overload (not the loose union catch-all).
if ("path" in target: | {
readonly path: string
readonly kind?: "IpcSocket"
readonly onConflict?: OnConflict
}
| {
readonly url: string
readonly kind?: ProtocolKind
readonly onConflict?: OnConflict
}
target) {
return Tag<Self, ROut = never>(): { (key: string): NodeTagClass<Self, ROut, BareAddress>; (key: string, target: { readonly path: string; readonly kind?: 'IpcSocket'; readonly onConflict?: OnConflict }): NodeTagClass<Self, ROut, IpcAddress>; (key: string, target: number | `:${number}`): NodeTagClass<Self, ROut, HttpAddress>; (key: string, target: `ws://${string}` | `wss://${string}`): NodeTagClass<Self, ROut, WsAddress>; (key: string, target: `http://${string}` | `https://${string}`): NodeTagClass<Self, ROut, HttpAddress>; (key: string, target: { readonly url: `ws://${string}` | `wss://${string}`; readonly kind?: 'WebSocket'; readonly onConflict?: OnConflict }): NodeTagClass<Self, ROut, WsAddress>; (key: string, target: { readonly url: string; readonly kind: 'WebSocket'; readonly onConflict?: OnConflict }): NodeTagClass<Self, ROut, WsAddress>; (key: string, target: { readonly url: string; readonly kind: 'Http'; readonly onConflict?: OnConflict }): NodeTagClass<Self, ROut, HttpAddress>; <T extends ShorthandTarget>(key: string, target: T): NodeTagClass<Self, ROut, MultiAddress<KindsOf<T>>>; (key: string, target: string | { readonly url: string; readonly kind?: ProtocolKind; readonly onConflict?: OnConflict }): NodeTagClass<Self, ROut, UrlAddressLoose>; (key: string, target?: LooseNodeTarget): NodeTagClass<Self, ROut, BareAddress | IpcAddress | HttpAddress | WsAddress | UrlAddressLoose | MultiAddress<ProtocolKind>> }Declare a node — a named transport endpoint a HyperService connects to. Two-stage and keyed by
a string, mirroring Effect's Context.Service<Self, Shape>()(key) (a node is a Context.Key,
resolved by its key in the Context map) and every sibling factory (Hyperlink.Tag<Self>(), …).
The second call infers the target shape, so the { http, ws } shorthand types its
ProtocolKind
set precisely. Optional catalog type param ROut (C2) — prefer import type
for those handles (C4). Templates (no address until cloned) live on
Node
.Prototype:
class EdgeNode extends Node.Tag<EdgeNode>()("edge") {} // no address yet
class Worker extends Node.Tag<Worker>()("worker", 3001) {} // → http://localhost:3001/rpc, kind "Http"
class Mail extends Node.Tag<Mail>()("mail", "https://mail.internal/rpc") {} // full url, as-is, kind "Http"
class Live extends Node.Tag<Live>()("live", { url: "wss://live/rpc" }) {} // kind "WebSocket" (inferred from ws url)
class Push extends Node.Tag<Push>()("push", { url: "/rpc", kind: "WebSocket" }) {} // same-origin path, explicit kind
class Local extends Node.Tag<Local>()("local", { path: "/tmp/local.sock" }) {} // kind "IpcSocket" (Unix domain)
class Droplet extends Node.Tag<Droplet>()("droplet", { http: "http://d/rpc", ws: "ws://d/rpc" }) {} // multi-protocol
import type { Jobs, Emails } from "@app/contracts"
class AppWorker extends Node.Tag<AppWorker, Jobs | Emails>()("app/Worker", { path: "/tmp/w.sock" }) {}
class MailWorker extends Node.Prototype<MailWorker, Mail>("app/MailWorker") {}
The key is the service key. The optional address matches a dial target: a port
(3001 or ":3001" → http://localhost:3001/rpc), a full url (used as-is), { url, kind } for
an explicit endpoint, { path } for a Unix-domain socket (kind: "IpcSocket"), or the
{ http, ws, ipc } multi-protocol shorthand. The node carries
ProtocolKind
so the topology
is self-describing about where AND how:
connect
(node) derives the transport with no
protocol argument.
Dialable targets return an
AddressedNode
(kind: ProtocolKind) so
Hyperlink.client(Tag, Worker) can auto-wire
connect
. Bare Node.Tag()("x")
stays address-less (kind: undefined) — still needs explicit connect / lookup.
Tag<function (type parameter) Self in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
Self, function (type parameter) ROut in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
ROut>()(`${name: stringname}#${cloneName: stringcloneName}`, {
path: stringpath: target: | {
readonly path: string
readonly kind?: "IpcSocket"
readonly onConflict?: OnConflict
}
| {
readonly url: string
readonly kind?: ProtocolKind
readonly onConflict?: OnConflict
}
target.path: stringpath,
...(target: | {
readonly path: string
readonly kind?: "IpcSocket"
readonly onConflict?: OnConflict
}
| {
readonly url: string
readonly kind?: ProtocolKind
readonly onConflict?: OnConflict
}
target.kind?: "IpcSocket" | undefinedkind !== var undefinedundefined ? { kind?: "IpcSocket" | undefinedkind: target: | {
readonly path: string
readonly kind?: "IpcSocket"
readonly onConflict?: OnConflict
}
| {
readonly url: string
readonly kind?: ProtocolKind
readonly onConflict?: OnConflict
}
target.kind?: "IpcSocket"kind } : {}),
...(const onConflict: OnConflict | undefinedonConflict !== var undefinedundefined ? { onConflict?: OnConflictonConflict } : {}),
});
}
return Tag<Self, ROut = never>(): { (key: string): NodeTagClass<Self, ROut, BareAddress>; (key: string, target: { readonly path: string; readonly kind?: 'IpcSocket'; readonly onConflict?: OnConflict }): NodeTagClass<Self, ROut, IpcAddress>; (key: string, target: number | `:${number}`): NodeTagClass<Self, ROut, HttpAddress>; (key: string, target: `ws://${string}` | `wss://${string}`): NodeTagClass<Self, ROut, WsAddress>; (key: string, target: `http://${string}` | `https://${string}`): NodeTagClass<Self, ROut, HttpAddress>; (key: string, target: { readonly url: `ws://${string}` | `wss://${string}`; readonly kind?: 'WebSocket'; readonly onConflict?: OnConflict }): NodeTagClass<Self, ROut, WsAddress>; (key: string, target: { readonly url: string; readonly kind: 'WebSocket'; readonly onConflict?: OnConflict }): NodeTagClass<Self, ROut, WsAddress>; (key: string, target: { readonly url: string; readonly kind: 'Http'; readonly onConflict?: OnConflict }): NodeTagClass<Self, ROut, HttpAddress>; <T extends ShorthandTarget>(key: string, target: T): NodeTagClass<Self, ROut, MultiAddress<KindsOf<T>>>; (key: string, target: string | { readonly url: string; readonly kind?: ProtocolKind; readonly onConflict?: OnConflict }): NodeTagClass<Self, ROut, UrlAddressLoose>; (key: string, target?: LooseNodeTarget): NodeTagClass<Self, ROut, BareAddress | IpcAddress | HttpAddress | WsAddress | UrlAddressLoose | MultiAddress<ProtocolKind>> }Declare a node — a named transport endpoint a HyperService connects to. Two-stage and keyed by
a string, mirroring Effect's Context.Service<Self, Shape>()(key) (a node is a Context.Key,
resolved by its key in the Context map) and every sibling factory (Hyperlink.Tag<Self>(), …).
The second call infers the target shape, so the { http, ws } shorthand types its
ProtocolKind
set precisely. Optional catalog type param ROut (C2) — prefer import type
for those handles (C4). Templates (no address until cloned) live on
Node
.Prototype:
class EdgeNode extends Node.Tag<EdgeNode>()("edge") {} // no address yet
class Worker extends Node.Tag<Worker>()("worker", 3001) {} // → http://localhost:3001/rpc, kind "Http"
class Mail extends Node.Tag<Mail>()("mail", "https://mail.internal/rpc") {} // full url, as-is, kind "Http"
class Live extends Node.Tag<Live>()("live", { url: "wss://live/rpc" }) {} // kind "WebSocket" (inferred from ws url)
class Push extends Node.Tag<Push>()("push", { url: "/rpc", kind: "WebSocket" }) {} // same-origin path, explicit kind
class Local extends Node.Tag<Local>()("local", { path: "/tmp/local.sock" }) {} // kind "IpcSocket" (Unix domain)
class Droplet extends Node.Tag<Droplet>()("droplet", { http: "http://d/rpc", ws: "ws://d/rpc" }) {} // multi-protocol
import type { Jobs, Emails } from "@app/contracts"
class AppWorker extends Node.Tag<AppWorker, Jobs | Emails>()("app/Worker", { path: "/tmp/w.sock" }) {}
class MailWorker extends Node.Prototype<MailWorker, Mail>("app/MailWorker") {}
The key is the service key. The optional address matches a dial target: a port
(3001 or ":3001" → http://localhost:3001/rpc), a full url (used as-is), { url, kind } for
an explicit endpoint, { path } for a Unix-domain socket (kind: "IpcSocket"), or the
{ http, ws, ipc } multi-protocol shorthand. The node carries
ProtocolKind
so the topology
is self-describing about where AND how:
connect
(node) derives the transport with no
protocol argument.
Dialable targets return an
AddressedNode
(kind: ProtocolKind) so
Hyperlink.client(Tag, Worker) can auto-wire
connect
. Bare Node.Tag()("x")
stays address-less (kind: undefined) — still needs explicit connect / lookup.
Tag<function (type parameter) Self in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
Self, function (type parameter) ROut in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
ROut>()(`${name: stringname}#${cloneName: stringcloneName}`, {
url: stringurl: target: | {
readonly path: string
readonly kind?: "IpcSocket"
readonly onConflict?: OnConflict
}
| {
readonly url: string
readonly kind?: ProtocolKind
readonly onConflict?: OnConflict
}
target.url: stringurl,
...(target: | {
readonly path: string
readonly kind?: "IpcSocket"
readonly onConflict?: OnConflict
}
| {
readonly url: string
readonly kind?: ProtocolKind
readonly onConflict?: OnConflict
}
target.kind?: ProtocolKindkind !== var undefinedundefined ? { kind?: ProtocolKindkind: target: | {
readonly path: string
readonly kind?: "IpcSocket"
readonly onConflict?: OnConflict
}
| {
readonly url: string
readonly kind?: ProtocolKind
readonly onConflict?: OnConflict
}
target.kind?: ProtocolKindkind } : {}),
...(const onConflict: OnConflict | undefinedonConflict !== var undefinedundefined ? { onConflict?: OnConflictonConflict } : {}),
});
}
return var Object: ObjectConstructorProvides functionality common to all JavaScript objects.
Object.ObjectConstructor.assign<Context.ServiceClass<Self, string, Record<string, never>>, {
isPrototype: true;
kind: ProtocolKind | undefined;
ipc: "unix" | "nPipe";
onConflict: OnConflict;
url: undefined;
path: undefined;
[catalogSym]: ROut | undefined;
make: {
(cloneName: string, target: {
readonly path: string;
readonly kind?: "IpcSocket";
readonly onConflict?: OnConflict;
}): IpcNodeTagClass<Self, ROut>;
(cloneName: string, target: {
readonly url: `ws://${string}` | `wss://${string}`;
readonly kind?: "WebSocket";
readonly onConflict?: OnConflict;
}): WsNodeTagClass<Self, ROut>;
(cloneName: string, target: {
readonly url: string;
readonly kind: "WebSocket";
readonly onConflict?: OnConflict;
}): WsNodeTagClass<Self, ROut>;
(cloneName: string, target: {
readonly url: string;
readonly kind: "Http";
readonly onConflict?: OnConflict;
}): HttpNodeTagClass<Self, ROut>;
(cloneName: string, target: {
readonly url: string;
readonly kind?: ProtocolKind;
readonly onConflict?: OnConflict;
}): UrlNodeTagClass<Self, ROut>;
};
instance: (suffix?: string) => NodeTagClass<...> & {
...;
};
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<...>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}>(target: Context.ServiceClass<...>, source: {
isPrototype: true;
kind: ProtocolKind | undefined;
ipc: "unix" | "nPipe";
onConflict: OnConflict;
url: undefined;
path: undefined;
[catalogSym]: ROut | undefined;
make: {
(cloneName: string, target: {
readonly path: string;
readonly kind?: "IpcSocket";
readonly onConflict?: OnConflict;
}): IpcNodeTagClass<Self, ROut>;
(cloneName: string, target: {
readonly url: `ws://${string}` | `wss://${string}`;
readonly kind?: "WebSocket";
readonly onConflict?: OnConflict;
}): WsNodeTagClass<Self, ROut>;
(cloneName: string, target: {
readonly url: string;
readonly kind: "WebSocket";
readonly onConflict?: OnConflict;
}): WsNodeTagClass<Self, ROut>;
(cloneName: string, target: {
readonly url: string;
readonly kind: "Http";
readonly onConflict?: OnConflict;
}): HttpNodeTagClass<Self, ROut>;
(cloneName: string, target: {
readonly url: string;
readonly kind?: ProtocolKind;
readonly onConflict?: OnConflict;
}): UrlNodeTagClass<Self, ROut>;
};
instance: (suffix?: string) => NodeTagClass<...> & {
...;
};
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<...>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}): Context.ServiceClass<...> & {
isPrototype: true;
kind: ProtocolKind | undefined;
ipc: "unix" | "nPipe";
onConflict: OnConflict;
url: undefined;
path: undefined;
[catalogSym]: ROut | undefined;
make: {
(cloneName: string, target: {
readonly path: string;
readonly kind?: "IpcSocket";
readonly onConflict?: OnConflict;
}): IpcNodeTagClass<Self, ROut>;
(cloneName: string, target: {
readonly url: `ws://${string}` | `wss://${string}`;
readonly kind?: "WebSocket";
readonly onConflict?: OnConflict;
}): WsNodeTagClass<Self, ROut>;
(cloneName: string, target: {
readonly url: string;
readonly kind: "WebSocket";
readonly onConflict?: OnConflict;
}): WsNodeTagClass<Self, ROut>;
(cloneName: string, target: {
readonly url: string;
readonly kind: "Http";
readonly onConflict?: OnConflict;
}): HttpNodeTagClass<Self, ROut>;
(cloneName: string, target: {
readonly url: string;
readonly kind?: ProtocolKind;
readonly onConflict?: OnConflict;
}): UrlNodeTagClass<Self, ROut>;
};
instance: (suffix?: string) => NodeTagClass<...> & {
...;
};
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<...>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
} (+3 overloads)
Copy the values of all of the enumerable own properties from one or more source objects to a
target object. Returns the target object.
assign(import ContextContext.const Service: {
<Identifier, Shape = Identifier>(
key: string
): Service<Identifier, Shape>
<Self, Shape>(): <
Identifier extends string,
E,
R = Types.unassigned,
Args extends ReadonlyArray<any> = never
>(
id: Identifier,
options?:
| {
readonly make:
| ((
...args: Args
) => Effect<Shape, E, R>)
| Effect<Shape, E, R>
| undefined
}
| undefined
) => ServiceClass<Self, Identifier, Shape> &
([Types.unassigned] extends [R]
? unknown
: {
readonly make: [Args] extends [never]
? Effect<Shape, E, R>
: (
...args: Args
) => Effect<Shape, E, R>
})
<Self>(): <
Identifier extends string,
Make extends
| Effect<any, any, any>
| ((...args: any) => Effect<any, any, any>)
>(
id: Identifier,
options: { readonly make: Make }
) => ServiceClass<
Self,
Identifier,
Make extends
| Effect<infer _A, infer _E, infer _R>
| ((
...args: infer _Args
) => Effect<infer _A, infer _E, infer _R>)
? _A
: never
> & { readonly make: Make }
}
Creates a Context service key.
When to use
Use when you need to define a context service key for a dependency that must
be provided by the surrounding context.
Details
Call Context.Service("Key") for a function-style key, or use the two-stage
form Context.Service<Self, Shape>()("Key") for class-style service
declarations. The returned key can be yielded as an Effect and passed to
Context.make, Context.add, and the Context getter functions.
Gotchas
The string key is the runtime identity of the service. Reusing the same key
string for unrelated services makes them occupy the same slot in a
Context.
Example (Creating service keys)
import { Context } from "effect"
// Create a simple service
const Database = Context.Service<{
query: (sql: string) => string
}>("Database")
// Create a service class
class Config extends Context.Service<Config, {
port: number
}>()("Config") {}
// Use the services to create contexts
const db = Context.make(Database, {
query: (sql) => `Result: ${sql}`
})
const config = Context.make(Config, { port: 8080 })
Service<function (type parameter) Self in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
Self, type Record<K extends keyof any, T> = {
[P in K]: T
}
Construct a type with a set of properties K of type T
Record<string, never>>()(name: stringname), {
isPrototype: trueisPrototype: true as type const = trueconst,
kind: ProtocolKind | undefinedkind: options: PrototypeOptions | undefinedoptions?.kind?: ProtocolKindkind,
ipc: "unix" | "nPipe"ipc: options: PrototypeOptions | undefinedoptions?.ipc?: "unix" | "nPipe" | undefinedIpc transport when kind is unset / "IpcSocket". Default "unix".
ipc ?? ("unix" as type const = "unix"const),
onConflict: OnConflictonConflict: const protoOnConflict:
| OnConflict
| undefined
protoOnConflict ?? ("inherit" as type const = "inherit"const),
url: undefinedurl: var undefinedundefined as undefined,
path: undefinedpath: var undefinedundefined as undefined,
[const catalogSym: typeof catalogSymType-only catalog brand on a
Node
— ROut is erased at runtime (C2 / C4).
catalogSym]: var undefinedundefined as function (type parameter) ROut in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
ROut | undefined,
make: {
(
cloneName: string,
target: {
readonly path: string
readonly kind?: "IpcSocket"
readonly onConflict?: OnConflict
}
): IpcNodeTagClass<Self, ROut>
(
cloneName: string,
target: {
readonly url:
| `ws://${string}`
| `wss://${string}`
readonly kind?: "WebSocket"
readonly onConflict?: OnConflict
}
): WsNodeTagClass<Self, ROut>
(
cloneName: string,
target: {
readonly url: string
readonly kind: "WebSocket"
readonly onConflict?: OnConflict
}
): WsNodeTagClass<Self, ROut>
(
cloneName: string,
target: {
readonly url: string
readonly kind: "Http"
readonly onConflict?: OnConflict
}
): HttpNodeTagClass<Self, ROut>
(
cloneName: string,
target: {
readonly url: string
readonly kind?: ProtocolKind
readonly onConflict?: OnConflict
}
): UrlNodeTagClass<Self, ROut>
}
make,
/**
* Dynamic instance Node — wire key `prototypeKey#suffix`, for {@link listen} /
* {@link peersLayer} `self`. Prefer `.listen(serves)` to spawn.
* Omit `suffix` to mint one at listen.
*/
instance: (suffix?: string) => NodeTagClass<
Self,
ROut,
| IpcAddress
| WsAddress
| HttpAddress
| UrlAddressLoose
| BareAddress
| MultiAddress<ProtocolKind>
> & {
instanceSuffix?: string | undefined
isDynamicInstance: true
dynamicPrototypeKey: string
}
Dynamic instance Node — wire key prototypeKey#suffix, for
listen
/
peersLayer
self. Prefer .listen(serves) to spawn.
Omit suffix to mint one at listen.
instance,
/**
* Curry a serve list into a dynamic-instance factory — sugar over
* {@link unix} / {@link http} / {@link ws} / {@link nPipe}
* `(proto.instance(suffix), serves)` by `kind` / `ipc`.
* Same Lookup story as those siblings: pipe `Lookup.layer` when advertise needs it.
* Keep in sync with the protocol listen siblings (handoff § Protocol listen siblings).
* Returns a **Layer** only — after `Layer.build`, the minted Node is
* {@link ListenNode} in context.
*/
listen: <Serves extends ServeLayerList>(
serves: Serves &
ServesForCatalog<
Exclude<ROut, undefined>,
Serves
>,
listenOptions?: number | string | ListenOptions
) => (
suffix?: string
) => Layer.Layer<
Layer.Success<Serves[number]> | ListenNode,
Layer.Error<Serves[number]>,
Layer.Services<Serves[number]>
>
Curry a serve list into a dynamic-instance factory — sugar over
unix
/
http
/
ws
/
nPipe
(proto.instance(suffix), serves) by kind / ipc.
Same Lookup story as those siblings: pipe Lookup.layer when advertise needs it.
Keep in sync with the protocol listen siblings (handoff § Protocol listen siblings).
Returns a Layer only — after Layer.build, the minted Node is
ListenNode
in context.
listen: <const function (type parameter) Serves in <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions): ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>)Serves extends type ServeLayerList = readonly [Layer.Any, ...Layer.Any[]]Non-empty serve-layer list for
listen
/
unix
/
http
/
ws
/
nPipe
. Open in E/R — a HyperService may depend on other services (including other
HyperServices); callers Layer.provide outside. Uses
Layer.Any
(not closed never
channels) so deps remain expressible without expression-level any.
ServeLayerList>(
serves: Serves &
ServesForCatalog<
Exclude<ROut, undefined>,
Serves
>
serves: function (type parameter) Serves in <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions): ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>)Serves & type ServesForCatalog<ROut, Serves extends ServeLayerList> = [ROut] extends [never] ? Serves : [ROut] extends [Layer.Success<Serves[number]>] ? Serves : neverC3: every member of ROut must appear in the merged serve Layer.Success.
ServesForCatalog<type Exclude<T, U> = T extends U
? never
: T
Exclude from T those types that are assignable to U
Exclude<function (type parameter) ROut in <Self, ROut = never>(name: string, options?: PrototypeOptions): Context.ServiceClass<Self, string, Record<string, never>> & {
isPrototype: true;
kind: ProtocolKind | undefined;
... 7 more ...;
listen: <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions) => ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>);
}
ROut, undefined>, function (type parameter) Serves in <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions): ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>)Serves>,
// Positional address — protocol-specific templates live on http/ws/unix/nPipe.
listenOptions: number | string | ListenOptionslistenOptions?: number | string | type ListenOptions = {
readonly path?: PathInput;
readonly serialization?: Layer.Layer<RpcSerialization>;
readonly health?: {
readonly path?: PathInput;
};
readonly node?: string | {
readonly key: string;
};
readonly unlink?: boolean;
readonly onConflict?: OnConflict;
readonly port?: number;
readonly url?: string;
readonly assumeToken?: string | Redacted<string>;
readonly onYield?: Effect<boolean>;
}
Shared options for
unix
/
http
/
ws
(and low-level *Server) —
rpc path / health / ipc unlink, plus optional fixed listen address for nameless Http/Ws.
ListenOptions,
): ((
suffix: string | undefinedsuffix?: string,
) => 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<
import LayerLayer.type Success<T extends Layer.Any> =
T extends Layer.Layer<
infer _ROut,
infer _E,
infer _RIn
>
? _ROut
: never
Extracts the service output type (ROut) from a Layer type.
When to use
Use to derive the services provided by an existing or generic Layer without
restating its ROut type parameter.
Success<function (type parameter) Serves in <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions): ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>)Serves[number]> | class ListenNodeclass ListenNode {
Service: Service;
key: Identifier;
}
The Node a protocol listen (unix / http / ws) is binding (concrete or minted).
Identity claims prefer this over a Tag-bound Node when present.
ListenNode,
import LayerLayer.type Error<T extends Layer.Any> =
T extends Layer.Layer<
infer _ROut,
infer _E,
infer _RIn
>
? _E
: never
Extracts the error type (E) from a Layer type.
When to use
Use to derive a layer construction error type for helper types, wrappers, or
APIs that preserve a layer failure channel.
Error<function (type parameter) Serves in <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions): ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>)Serves[number]>,
import LayerLayer.type Services<T extends Layer.Any> =
T extends infer L
? L extends Layer.Layer<
infer _ROut,
infer _E,
infer _RIn
>
? _RIn
: never
: never
Extracts the service requirements (RIn) from a Layer type.
When to use
Use to derive the dependency requirements of a generic or inferred Layer
without restating its RIn type parameter.
Services<function (type parameter) Serves in <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions): ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>)Serves[number]>
>) =>
(suffix: string | undefinedsuffix?: string) => {
// Explicit type args — avoid re-inferring `Serves` from the already-proven
// intersection (nested `ServesForCatalog` would otherwise fail to unify).
const const node: NodeTagClass<
Self,
ROut,
| IpcAddress
| WsAddress
| HttpAddress
| UrlAddressLoose
| BareAddress
| MultiAddress<ProtocolKind>
> & {
instanceSuffix?: string | undefined
isDynamicInstance: true
dynamicPrototypeKey: string
}
node = const instance: (
suffix?: string
) => NodeTagClass<
Self,
ROut,
| IpcAddress
| WsAddress
| HttpAddress
| UrlAddressLoose
| BareAddress
| MultiAddress<ProtocolKind>
> & {
instanceSuffix?: string | undefined
isDynamicInstance: true
dynamicPrototypeKey: string
}
instance(suffix: string | undefinedsuffix);
if (options: PrototypeOptions | undefinedoptions?.kind?: ProtocolKindkind === "Http") {
return http<NodeTagClass<Self, ROut, IpcAddress | WsAddress | HttpAddress | UrlAddressLoose | BareAddress | MultiAddress<ProtocolKind>> & {
instanceSuffix?: string | undefined;
isDynamicInstance: true;
dynamicPrototypeKey: string;
}, Serves>(node: NodeTagClass<Self, ROut, IpcAddress | WsAddress | HttpAddress | UrlAddressLoose | BareAddress | MultiAddress<...>> & {
instanceSuffix?: string | undefined;
isDynamicInstance: true;
dynamicPrototypeKey: string;
}, serves: Serves & ServesForCatalog<...>, options?: HttpListenArg): Layer.Layer<...> (+6 overloads)
Local Http listen — localhost bind. Nameless forms Soft-bake
Lookup.layer
when
Identity is absent (claim + advertise); override with Layer.provide(Lookup.layerOptions(…)).
Overload family (keep aligned with
unix
/
ws
/
nPipe
):
http(tag, impl) / http(tag, impl, address) — unbound Tag → nameless; bound Tag → that Node
http(tag, impl, node) — named listen without andNode
http(serve, address?) / http([serve…], address?) — nameless (brackets optional for one)
http(node, serve | [serve…], address?) — named node + serves
Address: 3000 / ":3000" / "http://…" / { port | url | … }. Prefer this over
httpServer
when the battery localhost bind is enough.
http<typeof const node: NodeTagClass<
Self,
ROut,
| IpcAddress
| WsAddress
| HttpAddress
| UrlAddressLoose
| BareAddress
| MultiAddress<ProtocolKind>
> & {
instanceSuffix?: string | undefined
isDynamicInstance: true
dynamicPrototypeKey: string
}
node, function (type parameter) Serves in <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions): ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>)Serves>(const node: NodeTagClass<
Self,
ROut,
| IpcAddress
| WsAddress
| HttpAddress
| UrlAddressLoose
| BareAddress
| MultiAddress<ProtocolKind>
> & {
instanceSuffix?: string | undefined
isDynamicInstance: true
dynamicPrototypeKey: string
}
node, serves: Serves &
ServesForCatalog<
Exclude<ROut, undefined>,
Serves
>
serves, listenOptions: number | string | ListenOptionslistenOptions as never);
}
if (options: PrototypeOptions | undefinedoptions?.kind?: ProtocolKindkind === "WebSocket") {
return ws<NodeTagClass<Self, ROut, IpcAddress | WsAddress | HttpAddress | UrlAddressLoose | BareAddress | MultiAddress<ProtocolKind>> & {
instanceSuffix?: string | undefined;
isDynamicInstance: true;
dynamicPrototypeKey: string;
}, Serves>(node: NodeTagClass<Self, ROut, IpcAddress | WsAddress | HttpAddress | UrlAddressLoose | BareAddress | MultiAddress<...>> & {
instanceSuffix?: string | undefined;
isDynamicInstance: true;
dynamicPrototypeKey: string;
}, serves: Serves & ServesForCatalog<...>, options?: WsListenArg): Layer.Layer<...> (+6 overloads)
Local WebSocket listen — localhost bind. Nameless forms Soft-bake
Lookup.layer
when
Identity is absent (claim + advertise); override with Layer.provide(Lookup.layerOptions(…)).
Overload family (keep aligned with
unix
/
http
/
nPipe
):
ws(tag, impl) / ws(tag, impl, address) — unbound Tag → nameless; bound Tag → that Node
ws(tag, impl, node) — named listen without andNode
ws(serve, address?) / ws([serve…], address?) — nameless (brackets optional for one)
ws(node, serve | [serve…], address?) — named node + serves
Address: 3000 / ":3000" / "ws://…" / { port | url | … }. Prefer this over
wsServer
when the battery localhost bind is enough.
ws<typeof const node: NodeTagClass<
Self,
ROut,
| IpcAddress
| WsAddress
| HttpAddress
| UrlAddressLoose
| BareAddress
| MultiAddress<ProtocolKind>
> & {
instanceSuffix?: string | undefined
isDynamicInstance: true
dynamicPrototypeKey: string
}
node, function (type parameter) Serves in <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions): ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>)Serves>(const node: NodeTagClass<
Self,
ROut,
| IpcAddress
| WsAddress
| HttpAddress
| UrlAddressLoose
| BareAddress
| MultiAddress<ProtocolKind>
> & {
instanceSuffix?: string | undefined
isDynamicInstance: true
dynamicPrototypeKey: string
}
node, serves: Serves &
ServesForCatalog<
Exclude<ROut, undefined>,
Serves
>
serves, listenOptions: number | string | ListenOptionslistenOptions as never);
}
if (options: PrototypeOptions | undefinedoptions?.ipc?: "unix" | "nPipe" | undefinedIpc transport when kind is unset / "IpcSocket". Default "unix".
ipc === "nPipe") {
return nPipe<NodeTagClass<Self, ROut, IpcAddress | WsAddress | HttpAddress | UrlAddressLoose | BareAddress | MultiAddress<ProtocolKind>> & {
instanceSuffix?: string | undefined;
isDynamicInstance: true;
dynamicPrototypeKey: string;
}, Serves>(node: NodeTagClass<Self, ROut, IpcAddress | WsAddress | HttpAddress | UrlAddressLoose | BareAddress | MultiAddress<...>> & {
instanceSuffix?: string | undefined;
isDynamicInstance: true;
dynamicPrototypeKey: string;
}, serves: Serves & ServesForCatalog<...>, options?: IpcListenArg): Layer.Layer<...> (+6 overloads)
Windows named-pipe IPC listen — same overload family as
unix
.
Same IpcSocket kind; paths are \\.\pipe\… (positional string or omit for ephemeral).
Nameless Soft-bakes
Lookup.layer
when Identity is absent. Prefer
unix
on POSIX.
nPipe<typeof const node: NodeTagClass<
Self,
ROut,
| IpcAddress
| WsAddress
| HttpAddress
| UrlAddressLoose
| BareAddress
| MultiAddress<ProtocolKind>
> & {
instanceSuffix?: string | undefined
isDynamicInstance: true
dynamicPrototypeKey: string
}
node, function (type parameter) Serves in <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions): ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>)Serves>(const node: NodeTagClass<
Self,
ROut,
| IpcAddress
| WsAddress
| HttpAddress
| UrlAddressLoose
| BareAddress
| MultiAddress<ProtocolKind>
> & {
instanceSuffix?: string | undefined
isDynamicInstance: true
dynamicPrototypeKey: string
}
node, serves: Serves &
ServesForCatalog<
Exclude<ROut, undefined>,
Serves
>
serves, listenOptions: number | string | ListenOptionslistenOptions as never);
}
return unix<NodeTagClass<Self, ROut, IpcAddress | WsAddress | HttpAddress | UrlAddressLoose | BareAddress | MultiAddress<ProtocolKind>> & {
instanceSuffix?: string | undefined;
isDynamicInstance: true;
dynamicPrototypeKey: string;
}, Serves>(node: NodeTagClass<Self, ROut, IpcAddress | WsAddress | HttpAddress | UrlAddressLoose | BareAddress | MultiAddress<...>> & {
instanceSuffix?: string | undefined;
isDynamicInstance: true;
dynamicPrototypeKey: string;
}, serves: Serves & ServesForCatalog<...>, options?: IpcListenArg): Layer.Layer<...> (+6 overloads)
Unix-domain IPC listen — all ipc mint/bind. Nameless forms Soft-bake
Lookup.layer
(claim + advertise) — override with Layer.provide(Lookup.layerOptions({ path })).
Overload family (keep aligned with
http
/
ws
/
nPipe
):
unix(tag, impl) / unix(tag, impl, path) — unbound Tag → nameless; bound Tag → that Node
unix(tag, impl, node) — named listen without andNode
unix(serve, path?) / unix([serve…], path?) — nameless (brackets optional for one)
unix(node, serve | [serve…], options?) — named node + serves
Path: "/tmp/x.sock" or { unlink, … }; omit for ephemeral. Prefer this for same-machine.
unix<typeof const node: NodeTagClass<
Self,
ROut,
| IpcAddress
| WsAddress
| HttpAddress
| UrlAddressLoose
| BareAddress
| MultiAddress<ProtocolKind>
> & {
instanceSuffix?: string | undefined
isDynamicInstance: true
dynamicPrototypeKey: string
}
node, function (type parameter) Serves in <const Serves extends ServeLayerList>(serves: Serves & ServesForCatalog<Exclude<ROut, undefined>, Serves>, listenOptions?: number | string | ListenOptions): ((suffix?: string) => Layer.Layer<Layer.Success<Serves[number]> | ListenNode, Layer.Error<Serves[number]>, Layer.Services<Serves[number]>>)Serves>(const node: NodeTagClass<
Self,
ROut,
| IpcAddress
| WsAddress
| HttpAddress
| UrlAddressLoose
| BareAddress
| MultiAddress<ProtocolKind>
> & {
instanceSuffix?: string | undefined
isDynamicInstance: true
dynamicPrototypeKey: string
}
node, serves: Serves &
ServesForCatalog<
Exclude<ROut, undefined>,
Serves
>
serves, listenOptions: number | string | ListenOptionslistenOptions as never);
},
});
};