import { SocketMeta , ParameterType , SocketClass , getMeta } from '../meta' ; param { ParameterType } type function makeDecorator ( type ) { return ( wrapper ? ) : ParameterDecorator => { return ( target , methodName , index ) => { const meta = getMeta ( target ) ; if ( meta . params [ methodName ] === undefined ) { meta . params [ methodName ] = [ ] ; } meta . params [ methodName ] . push ( { type , index , wrapper } ) ; } ; } ; } type { SocketIO . Server } export const IO = makeDecorator ( ParameterType . IO ) ; type { SocketIO . Socket } export const Socket = makeDecorator ( ParameterType . Socket ) ; type { any [ ] } export const Args = makeDecorator ( ParameterType . Args ) ; type { Function } export const Ack = makeDecorator ( ParameterType . Ack ) ;