All files / websockets/utils gateway-server.decorator.ts

100% Statements 5/5
100% Branches 0/0
100% Functions 2/2
100% Lines 5/5
1 2 3 4 5 6 7 8 9 10 11 121x         1x 3x 3x 3x      
import { GATEWAY_SERVER_METADATA } from '../constants';
 
/**
 * Attaches native Web Socket Server to a given property.
 */
export const WebSocketServer = (): PropertyDecorator => {
  return (target: object, propertyKey: string | symbol) => {
    Reflect.set(target, propertyKey, null);
    Reflect.defineMetadata(GATEWAY_SERVER_METADATA, true, target, propertyKey);
  };
};