Hyperlinkv0.9.0-beta.0

Hyperlink

Hyperlink.serveRemoteDriverconstsrc/Hyperlink.ts:4384
<S extends Spec, R>(
  tag: {
    readonly [wireKeySym]: string
    readonly [specSym]: FlatSpec
    readonly [specTypeSym]?: S
    readonly [groupSym]: ServeRemoteTag[typeof groupSym]
  },
  driver: Driver<S, R>
): Layer.Layer<HandlerContextOf<S>, never, R>

Served-only mount for a Driver — preserves the driver's requirement R on the Layer. Separate from serveRemote so plain-impl ServeRequirements inference stays sharp and open-S Driver overloads don't hit TS2589. Used by Gate / Daemon / WorkPool / serve.

Success channel is HandlerContextOf<S> when S is concrete on the tag; callers that already name handler slots on their public return can treat this as the R-preserving mount.

servingDriverserveRemoteserveHandlerContextOf
Source src/Hyperlink.ts:438412 lines
export const serveRemoteDriver = <S extends Spec, R>(
  tag: {
    readonly [wireKeySym]: string;
    readonly [specSym]: FlatSpec;
    readonly [specTypeSym]?: S;
    readonly [groupSym]: ServeRemoteTag[typeof groupSym];
  },
  driver: Driver<S, R>,
): Layer.Layer<HandlerContextOf<S>, never, R> =>
  retype<Layer.Layer<HandlerContextOf<S>, never, R>>(
    serveRemoteHandlers(tag, driver.impl, driver.workerContext as Context.Context<unknown>) as never,
  );
Referenced by 3 symbols