<Self>(key: string): NodeBoundTag<
Self,
S,
HSelf,
Simplify<{
readonly [K in keyof S]: S[K] extends FromLocalMethod<infer M>
? InjectLocal<M, Self>
: S[K] extends LocalMethod<infer T>
? LocalEffect<T, never, Self>
: S[K] extends { readonly _tag: "constant" }
? SuccessOf<AsMethod<S[K]>>
: S[K] extends { readonly _tag: "ref" }
? Subscribable<SuccessOf<AsMethod<S[K]>>>
: S[K] extends { readonly kind: MethodKind }
? ClientMethod<AsMethod<S[K]>, ClientOverrideOf<S[K]>>
: S[K] extends Spec
? Simplify<{
readonly [K in keyof S[K]]: S[K][K] extends FromLocalMethod<
infer M
>
? InjectLocal<M, Self>
: S[K][K] extends LocalMethod<infer T>
? LocalEffect<T, never, Self>
: S[K][K] extends { readonly _tag: "constant" }
? SuccessOf<AsMethod<S[K][K]>>
: S[K][K] extends { readonly _tag: "ref" }
? Subscribable<SuccessOf<AsMethod<S[K][K]>>>
: S[K][K] extends { readonly kind: MethodKind }
? ClientMethod<AsMethod<S[K][K]>, ClientOverrideOf<S[K][K]>>
: S[K][K] extends Spec
? Simplify<{
readonly [K in keyof S[K][K]]: S[K][K][K] extends FromLocalMethod<
infer M
>
? InjectLocal<M, Self>
: S[K][K][K] extends LocalMethod<infer T>
? LocalEffect<T, never, Self>
: S[K][K][K] extends { readonly _tag: "constant" }
? SuccessOf<AsMethod<S[K][K][K]>>
: S[K][K][K] extends { readonly _tag: "ref" }
? Subscribable<SuccessOf<AsMethod<S[K][K][K]>>>
: S[K][K][K] extends { readonly kind: MethodKind }
? ClientMethod<
AsMethod<S[K][K][K]>,
ClientOverrideOf<S[K][K][K]>
>
: S[K][K][K] extends Spec
? Simplify<{
readonly [K in keyof S[K][K][K]]: S[K][K][K][K] extends FromLocalMethod<
infer M
>
? InjectLocal<M, Self>
: S[K][K][K][K] extends LocalMethod<infer T>
? LocalEffect<T, never, Self>
: S[K][K][K][K] extends {
readonly _tag: "constant"
}
? SuccessOf<AsMethod<S[K][K][K][K]>>
: S[K][K][K][K] extends { readonly _tag: "ref" }
? Subscribable<SuccessOf<AsMethod<S[K][K][K][K]>>>
: S[K][K][K][K] extends {
readonly kind: MethodKind
}
? ClientMethod<
AsMethod<S[K][K][K][K]>,
ClientOverrideOf<S[K][K][K][K]>
>
: S[K][K][K][K] extends Spec
? Simplify<{
readonly [K in keyof S[K][K][K][K]]: S[K][K][K][K][K] extends FromLocalMethod<
infer M
>
? InjectLocal<M, Self>
: S[K][K][K][K][K] extends LocalMethod<
infer T
>
? LocalEffect<T, never, Self>
: S[K][K][K][K][K] extends {
readonly _tag: "constant"
}
? SuccessOf<AsMethod<S[K][K][K][K][K]>>
: S[K][K][K][K][K] extends {
readonly _tag: "ref"
}
? Subscribable<
SuccessOf<AsMethod<S[K][K][K][K][K]>>
>
: S[K][K][K][K][K] extends {
readonly kind: MethodKind
}
? ClientMethod<
AsMethod<S[K][K][K][K][K]>,
ClientOverrideOf<S[K][K][K][K][K]>
>
: S[K][K][K][K][K] extends Spec
? Simplify<{
readonly [K in keyof S[K][K][K][K][K]]: S[K][K][K][K][K][K] extends FromLocalMethod<
infer M
>
? InjectLocal<M, Self>
: S[K][K][K][K][K][K] extends LocalMethod<
infer T
>
? LocalEffect<T, never, Self>
: S[K][K][K][K][K][K] extends {
readonly _tag: "constant"
}
? SuccessOf<
AsMethod<S[K][K][K][K][K][K]>
>
: S[K][K][K][K][K][K] extends {
readonly _tag: "ref"
}
? Subscribable<
SuccessOf<
AsMethod<S[K][K][K][K][K][K]>
>
>
: S[K][K][K][K][K][K] extends {
readonly kind: MethodKind
}
? ClientMethod<
AsMethod<S[K][K][K][K][K][K]>,
ClientOverrideOf<
S[K][K][K][K][K][K]
>
>
: S[K][K][K][K][K][K] extends Spec
? Simplify<{
readonly [K in keyof S[K][K][K][K][K][K]]: S[K][K][K][K][K][K][K] extends FromLocalMethod<
infer M
>
? InjectLocal<M, Self>
: S[K][K][K][K][K][K][K] extends LocalMethod<
infer T
>
? LocalEffect<T, never, Self>
: S[K][K][K][K][K][K][K] extends {
readonly _tag: "constant"
}
? SuccessOf<
AsMethod<
S[K][K][K][K][K][K][K]
>
>
: S[K][K][K][K][K][K][K] extends {
readonly _tag: "ref"
}
? Subscribable<
SuccessOf<
AsMethod<
S[K][K][K][K][K][K][K]
>
>
>
: S[K][K][K][K][K][K][K] extends {
readonly kind: MethodKind
}
? ClientMethod<
AsMethod<
S[K][K][K][K][K][K][K]
>,
ClientOverrideOf<
S[K][K][K][K][K][K][K]
>
>
: S[K][K][K][K][K][K][K] extends Spec
? Simplify<{
readonly [K in keyof S[K][K][K][K][K][K][K]]: S[K][K][K][K][K][K][K][K] extends FromLocalMethod<
infer M
>
? InjectLocal<M, Self>
: S[K][K][K][K][K][K][K][K] extends LocalMethod<
infer T
>
? LocalEffect<
T,
never,
Self
>
: S[K][K][K][K][K][K][K][K] extends {
readonly _tag: "constant"
}
? SuccessOf<
AsMethod<
S[K][K][K][K][K][K][K][K]
>
>
: S[K][K][K][K][K][K][K][K] extends {
readonly _tag: "ref"
}
? Subscribable<
SuccessOf<
AsMethod<
S[K][K][K][K][K][K][K][K]
>
>
>
: S[K][K][K][K][K][K][K][K] extends {
readonly kind: MethodKind
}
? ClientMethod<
AsMethod<
S[K][K][K][K][K][K][K][K]
>,
ClientOverrideOf<
S[K][K][K][K][K][K][K][K]
>
>
: S[K][K][K][K][K][K][K][K] extends Spec
? Simplify<{
readonly [K in keyof S[K][K][K][K][K][K][K][K]]: S[K][K][K][K][K][K][K][K][K] extends FromLocalMethod<
infer M
>
? InjectLocal<
M,
Self
>
: S[K][K][K][K][K][K][K][K][K] extends LocalMethod<
infer T
>
? LocalEffect<
T,
never,
Self
>
: S[K][K][K][K][K][K][K][K][K] extends {
readonly _tag: "constant"
}
? SuccessOf<
AsMethod<
S[K][K][K][K][K][K][K][K][K]
>
>
: S[K][K][K][K][K][K][K][K][K] extends {
readonly _tag: "ref"
}
? Subscribable<
SuccessOf<
AsMethod<
S[K][K][K][K][K][K][K][K][K]
>
>
>
: S[K][K][K][K][K][K][K][K][K] extends {
readonly kind: MethodKind
}
? ClientMethod<
AsMethod<
S[K][K][K][K][K][K][K][K][K]
>,
ClientOverrideOf<
S[K][K][K][K][K][K][K][K][K]
>
>
: S[K][K][K][K][K][K][K][K][K] extends Spec
? Simplify<{
readonly [K in keyof S[K][K][K][K][K][K][K][K][K]]: S[K][K][K][K][K][K][K][K][K][K] extends FromLocalMethod<
infer M
>
? InjectLocal<
M,
Self
>
: S[K][K][K][K][K][K][K][K][K][K] extends LocalMethod<
infer T
>
? LocalEffect<
T,
never,
Self
>
: S[K][K][K][K][K][K][K][K][K][K] extends {
readonly _tag: "constant"
}
? SuccessOf<
AsMethod<
S[K][K][K][K][K][K][K][K][K][K]
>
>
: S[K][K][K][K][K][K][K][K][K][K] extends {
readonly _tag: "ref"
}
? Subscribable<
SuccessOf<
AsMethod<
S[K][K][K][K][K][K][K][K][K][K]
>
>
>
: S[K][K][K][K][K][K][K][K][K][K] extends {
readonly kind: MethodKind
}
? ClientMethod<
AsMethod<
S[K][K][K][K][K][K][K][K][K][K]
>,
ClientOverrideOf<
S[K][K][K][K][K][K][K][K][K][K]
>
>
: S[K][K][K][K][K][K][K][K][K][K] extends Spec
? Simplify<{
readonly [K in keyof S[K][K][K][K][K][K][K][K][K][K]]: S[K][K][K][K][K][K][K][K][K][K][K] extends FromLocalMethod<
infer M
>
? InjectLocal<
M,
Self
>
: S[K][K][K][K][K][K][K][K][K][K][K] extends LocalMethod<
infer T
>
? LocalEffect<
T,
never,
Self
>
: S[K][K][K][K][K][K][K][K][K][K][K] extends {
readonly _tag: "constant"
}
? SuccessOf<
AsMethod<
S[K][K][K][K][K][K][K][K][K][K][K]
>
>
: S[K][K][K][K][K][K][K][K][K][K][K] extends {
readonly _tag: "ref"
}
? Subscribable<
SuccessOf<
AsMethod<
S[K][K][K][K][K][K][K][K][K][K][K]
>
>
>
: S[K][K][K][K][K][K][K][K][K][K][K] extends {
readonly kind: MethodKind
}
? ClientMethod<
AsMethod<
S[K][K][K][K][K][K][K][K][K][K][K]
>,
ClientOverrideOf<
S[K][K][K][K][K][K][K][K][K][K][K]
>
>
: S[K][K][K][K][K][K][K][K][K][K][K] extends Spec
? Simplify<any>
: never
}>
: never
}>
: never
}>
: never
}>
: never
}>
: never
}>
: never
}>
: never
}>
: never
}>
: never
}>
: never
}>
>A node-bearing tagFor factory: every instance it makes carries the family's Node, so each is a node-bearing tag (Hyperlink.client resolves the transport from it). Otherwise identical to TagFactory.
export interface interface NodeTagFactory<S extends Spec, HSelf>A node-bearing
tagFor
factory: every instance it makes carries the family's
Node
, so each is a node-bearing tag (
Hyperlink.client
resolves the transport
from it). Otherwise identical to
TagFactory
.
NodeTagFactory<function (type parameter) S in NodeTagFactory<S extends Spec, HSelf>S extends Spec, function (type parameter) HSelf in NodeTagFactory<S extends Spec, HSelf>HSelf> {
<function (type parameter) Self in <Self>(key: string): NodeBoundTag<Self, S, HSelf>Self>(key: stringkey: string): interface NodeBoundTag<Self, S extends Spec, HSelf, 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 { ...; } ? SuccessOf<...> : S[K] extends { ...; } ? Subscribable<...> : S[K] extends { ...; } ? ClientMethod<...> : S[K] extends Spec ? Simplify<...> : never; }>>A
HyperlinkTag
bound to a concrete
Node
— its [nodeSym] narrowed to that node's
NodeKey<HSelf>, which is how
Hyperlink.client
discriminates the node-aware path. Returned
by the node-bearing tag constructors. It's a named type (not an inline & { [nodeSym] }) so a
consumer can export a node-bearing tag without leaking the internal symbol (TS4020).
NodeBoundTag<function (type parameter) Self in <Self>(key: string): NodeBoundTag<Self, S, HSelf>Self, function (type parameter) S in NodeTagFactory<S extends Spec, HSelf>S, function (type parameter) HSelf in NodeTagFactory<S extends Spec, HSelf>HSelf>;
readonly NodeTagFactory<S extends Spec, HSelf>.groupId: stringgroupId: string;
readonly NodeTagFactory<S extends Spec, HSelf>.description: string | undefineddescription: string | undefined;
readonly [const specSym: typeof specSymWhere the contract spec is stowed on a Tag (hidden from the value surface). Exported so
the public
HyperlinkTag
type is nameable across modules.
specSym]: type FlatSpec = {
[x: string]: AnyMethod | AnyLocalMethod
}
A flat spec — a path-keyed record of leaves (no nested groups). The wire machinery runs on this;
a (possibly nested)
Spec
flattens to it via
flattenSpec
.
FlatSpec;
readonly [const specTypeSym: typeof specTypeSymPhantom carrier of a tag's (possibly nested) spec type S, so functions can infer S from a tag —
specSym
holds the flat spec at runtime and can't carry the nested S. Type-only, never set at
runtime.
specTypeSym]?: function (type parameter) S in NodeTagFactory<S extends Spec, HSelf>S;
readonly [const groupSym: typeof groupSymWhere the built RPC group is stowed on a Tag.
groupSym]: type RpcGroupOf<S extends Spec> =
RpcGroup.RpcGroup<RpcUnionOf<S, "">>
The precisely-typed RPC contract group for a
Spec
. Carrying this exact type
(rather than a loose Rpc<string, …>) is what keeps the remote client's requirement
channel honest: concrete schemas declare never encoding/decoding services, so
RpcClient.make infers a real R (just the transport Protocol) instead of any.
RpcGroupOf<function (type parameter) S in NodeTagFactory<S extends Spec, HSelf>S>;
}