Setu-TS
    Preparing search index...

    Function asUpgradeEmitter

    • Probes a server handle for the raw upgrade event.

      serve() returns node-server's ServerType union of node:http and node:http2 servers, whose on overloads are declared with any listeners and so cannot be expressed on NodeServer without a variance conflict. Probing here keeps the published interface clean and confines the narrowing to one boundary.

      Parameters

      • server: unknown

        The server handle returned by serve()

      Returns UpgradeEmitter | null

      The emitter, or null when the handle emits no events (e.g. a test fake)

      0.2.0