Setu-TS
    Preparing search index...

    Function adaptWsModule

    • Narrows an already-imported module to WsModuleLike.

      Split from loadWsModule so the validation branches are unit-testable with a hand-built fake, leaving only the one import() line behind a guarded real-import test.

      Parameters

      • module: unknown

        The imported module namespace

      Returns WsModuleLike

      The narrowed module

      If the module does not expose a WebSocketServer constructor

      import * as ws from 'ws';
      const adapter = new NodeHttpAdapter(undefined, adaptWsModule(ws));

      0.2.0