- public static handleProtocols = (
- protocols: Set<string>,
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
- request: IncomingMessage
- ): string | false => {
- let protocol: Protocol;
- let version: ProtocolVersion;
- if (protocols.size === 0) {
- return false;
- }
- for (const fullProtocol of protocols) {
- if (UIServerUtils.isProtocolAndVersionSupported(fullProtocol) === true) {
- return fullProtocol;
- }
+export const handleProtocols = (
+ protocols: Set<string>,
+ _request: IncomingMessage
+): string | false => {
+ let protocol: Protocol | undefined
+ let version: ProtocolVersion | undefined
+ if (protocols.size === 0) {
+ return false
+ }
+ for (const fullProtocol of protocols) {
+ if (isProtocolAndVersionSupported(fullProtocol)) {
+ return fullProtocol