NodeBoundTag<Self, S, HSelf, Svc>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).
export interface 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 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; }>>Self, function (type parameter) S in 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; }>>S extends Spec, function (type parameter) HSelf in 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; }>>HSelf, function (type parameter) Svc in 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; }>>Svc = type ServiceOf<S extends Spec, Self = unknown> = { [K in keyof { 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<...> : S[K] extends Spec ? Simplify<...> : never; }]: { 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<...> : S[K] extends Spec ? Simplify<...> : never; }[K]; } extends infer B ? B : never
The full service interface inferred from a
Spec
. Wire
Method
s map to
Effect/function members; off-wire
LocalMethod
s surface as
Effect<T, never, Local<Self>> — yield* to obtain the value, requiring the local layer
(
Local
) (so they're uncallable through
Hyperlink.client
).
ServiceOf<function (type parameter) S in 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; }>>S, function (type parameter) Self in 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; }>>Self>>
extends 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 { ...; } ? SuccessOf<...> : S[K] extends { ...; } ? Subscribable<...> : S[K] extends { ...; } ? ClientMethod<...> : S[K] extends Spec ? Simplify<...> : never; }>>The type of a resource tag carrying spec S — what
Hyperlink.Tag
/ a
Hyperlink.tagFor
factory produce (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<function (type parameter) Self in 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; }>>Self, function (type parameter) S in 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; }>>S, function (type parameter) Svc in 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; }>>Svc> {
readonly [const nodeSym: typeof nodeSymWhere the resource's
Node
(if any) is stowed on a Tag.
nodeSym]: import NodeKeyNodeKey<function (type parameter) HSelf in 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; }>>HSelf>;
}