CatalogNode<Self, ROut>A Node with typed catalog ROut (union of resource handles). Prefer
import type for those handles (C4). Use with listen / clients.
Catalog members must be structurally distinct types (different specs / service shapes) —
identical Tag shapes collapse in TypeScript, so Jobs | Emails cannot prove C3.
export type type CatalogNode<
Self,
ROut = never
> = NodeKey<Self> & {
readonly url: string | undefined
readonly path: string | undefined
readonly kind: ProtocolKind | undefined
readonly [catalogSym]?: ROut
}
A
Node
with typed catalog ROut (union of resource handles). Prefer
import type for those handles (C4). Use with
listen
/
clients
.
Catalog members must be structurally distinct types (different specs / service shapes) —
identical Tag shapes collapse in TypeScript, so Jobs | Emails cannot prove C3.
CatalogNode<function (type parameter) Self in type CatalogNode<Self, ROut = never>Self, function (type parameter) ROut in type CatalogNode<Self, ROut = never>ROut = never> = type NodeKey<HSelf> = Context.Key<
HSelf,
NodeProtocol
>
The Context key of a
Node
(HSelf = its identity): a service whose value is the
transport
NodeProtocol
. Stored on a node-bearing tag under
nodeSym
; read by
Hyperlink.client
to resolve where to connect (its requirement channel).
NodeKey<function (type parameter) Self in type CatalogNode<Self, ROut = never>Self> & {
readonly url: string | undefinedurl: string | undefined;
readonly path: string | undefinedpath: string | undefined;
readonly kind: ProtocolKind | undefinedkind: 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 | undefined;
readonly [const catalogSym: typeof catalogSymType-only catalog brand on a
Node
— ROut is erased at runtime (C2 / C4).
catalogSym]?: function (type parameter) ROut in type CatalogNode<Self, ROut = never>ROut;
};