Hyperlinkv0.8.0-beta.28

Hyperlink

Hyperlink.HyperlinkTaginterfacesrc/Hyperlink.ts:2197
HyperlinkTag<Self, S, Svc>

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.

modelsHyperlink.TagHyperlink.tagForspecOfgroupOf
Source src/Hyperlink.ts:219739 lines
export interface HyperlinkTag<Self, S extends Spec, Svc = ServiceOf<S, Self>>
  extends Context.ServiceClass<Self, string, Svc> {
  /** Wire prefix — namespaces this resource's procedures on a shared `RpcServer`. */
  readonly groupId: string;
  /** Hyperlink-level help text (CLI/TUI section help, dashboard panel title) — if declared. */
  readonly description: string | undefined;
  readonly [specSym]: FlatSpec;
  readonly [specTypeSym]?: S;
  readonly [groupSym]: RpcGroupOf<S>;
  readonly [localCapSym]: Context.Key<
    Local<Self>,
    { readonly granted: true }
  >;
  /**
   * The resource's {@link Node} (its transport), or `undefined` for a nodeless tag. Uniform
   * across all tags (always present) so a node-bearing tag stays assignable wherever a plain
   * {@link HyperlinkTag} is expected; the node-bearing tag constructors **narrow** this to a
   * concrete {@link NodeKey} in their return type, which is how {@link Hyperlink.client}
   * discriminates the node-aware path.
   */
  readonly [nodeSym]: NodeKey<unknown> | undefined;
  /** The contract's kind (canonical id) — set by a contract `.Tag` factory, `undefined` for a bare
   *  {@link Hyperlink.Tag}. Read it with {@link kindOf}. */
  readonly [kindSym]: string | undefined;
  /** The resource's readiness derivation, if any (applied by {@link withReadiness}); `undefined`
   *  ⇒ ready by default. Read it via {@link readinessCheck}. */
  readonly [readinessSym]: ReadinessOf<ServiceOf<S, Self>> | undefined;
  /** The per-resource {@link peers} capability key — its value is this resource's peer clients
   *  (the other nodes' leaf services), keyed by node. Provided by {@link peersLayer}, read via {@link peers}. */
  readonly [peersSym]: Context.Key<PeersId<Self>, Record<string, PeerServiceOf<S>>>;
  /** The per-resource {@link selfNode} capability key — its value is the node key this instance runs
   *  as (the same key its peers are keyed by). Provided by {@link peersLayer} / {@link selfNodeLayer},
   *  read via {@link selfNode}. */
  readonly [selfNodeSym]: Context.Key<SelfNodeId<Self>, string>;
  /** The Node set (C1), if declared via {@link nodes} / `{ node }` / {@link distributed}; else `undefined`. */
  readonly [nodesSym]?: ReadonlyArray<AnyNode>;
  /** Set when the tag was piped through {@link identity} — layer/serve claim at Lookup first. */
  readonly [identitySym]?: true;
}
Referenced by 65 symbols