WxEnd: WxCloseController & { send: (message: WxMessage) => WxVoid }

Messaging primitive representing one end of an established messaging channel

This is an abstraction of the underlying messaging channel, be it a Worker, Window, or possibly WebSocket or HTTP requests in the future.

Workex provides factory functions for creating WxEnds for different messaging channels. Note that since WxEnd is an abstraction over an established channel, the design pattern is that any valid WxEnd objects you create with functions in this library will first establish the handshake.

Type declaration