Function
layerWebSocket
(url: string, options?: {
readonly closeCodeIsError?: (code: number) => boolean
})
Source from the content-addressed store, hash-verified
| 9 | * @category layers |
| 10 | */ |
| 11 | export const layerWebSocket = (url: string, options?: { |
| 12 | readonly closeCodeIsError?: (code: number) => boolean |
| 13 | }): Layer.Layer<Socket.Socket> => |
| 14 | Layer.scoped(Socket.Socket, Socket.makeWebSocket(url, options)).pipe( |
| 15 | Layer.provide(layerWebSocketConstructor) |
| 16 | ) |
| 17 | |
| 18 | /** |
| 19 | * A WebSocket constructor that uses globalThis.WebSocket. |
Callers
nothing calls this directly
Tested by
no test coverage detected