| 172 | * @since 4.0.0 |
| 173 | */ |
| 174 | export const upgradeChannel = <IE = never>(): Channel.Channel< |
| 175 | Arr.NonEmptyReadonlyArray<Uint8Array>, |
| 176 | HttpServerError | IE | Socket.SocketError, |
| 177 | void, |
| 178 | Arr.NonEmptyReadonlyArray<string | Uint8Array | Socket.CloseEvent>, |
| 179 | IE, |
| 180 | unknown, |
| 181 | HttpServerRequest |
| 182 | > => |
| 183 | HttpServerRequest.pipe( |
| 184 | Effect.flatMap((_) => _.upgrade), |
| 185 | Effect.map(Socket.toChannelWith<IE>()), |
| 186 | Channel.unwrap |
| 187 | ) |
| 188 | |
| 189 | /** |
| 190 | * Decodes a schema from the cookies of the current request. |