Function
layerWebSocket
(url: string, options?: {
readonly closeCodeIsError?: (code: number) => boolean
})
Source from the content-addressed store, hash-verified
| 36 | * @since 4.0.0 |
| 37 | */ |
| 38 | export const layerWebSocket = (url: string, options?: { |
| 39 | readonly closeCodeIsError?: (code: number) => boolean |
| 40 | }): Layer.Layer<Socket.Socket> => |
| 41 | Layer.effect(Socket.Socket, Socket.makeWebSocket(url, options)).pipe( |
| 42 | Layer.provide(layerWebSocketConstructor) |
| 43 | ) |
| 44 | |
| 45 | /** |
| 46 | * Layer that provides a `WebSocketConstructor` service backed by `globalThis.WebSocket`. |
Callers
nothing calls this directly
Tested by
no test coverage detected