Hyperlinkv0.8.0-beta.28

Hyperlink

Hyperlink.nodeKindOfconstsrc/Hyperlink.ts:2549
(tag: unknown): ProtocolKind | undefined

The declared ProtocolKind of the Node a tag is bound to (how a client reaches it — Http/WebSocket/IpcSocket), or undefined for a nodeless/bare tag or a node with no declared kind. A structural read (like kindOf) — the server uses it to reject a node-bound resource served over a mismatched transport (ProtocolKindMismatch).

nodes & fleetProtocolKindNodekindOfProtocolKindMismatch
Source src/Hyperlink.ts:25498 lines
export const nodeKindOf = (tag: unknown): ProtocolKind | undefined => {
  const node = nodeOf(tag);
  if (node !== undefined && Predicate.hasProperty(node, "kind")) {
    const k = node.kind;
    return k === "Http" || k === "WebSocket" || k === "IpcSocket" ? k : undefined;
  }
  return undefined;
};
Referenced by 1 symbols