Narrows an already-imported module to WsModuleLike.
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.
loadWsModule
import()
The imported module namespace
The narrowed module
If the module does not expose a WebSocketServer constructor
WebSocketServer
import * as ws from 'ws';const adapter = new NodeHttpAdapter(undefined, adaptWsModule(ws)); Copy
import * as ws from 'ws';const adapter = new NodeHttpAdapter(undefined, adaptWsModule(ws));
0.2.0
Narrows an already-imported module to
WsModuleLike.Split from
loadWsModuleso the validation branches are unit-testable with a hand-built fake, leaving only the oneimport()line behind a guarded real-import test.