@@ -14,7 +14,7 @@ import {ResultTypes} from "./metadata/types/ResultTypes";
14
14
*
15
15
* @param namespace Namespace in which this controller's events will be registered.
16
16
*/
17
- export function SocketController ( namespace ?: string | RegExp ) {
17
+ export function SocketController ( namespace ?: string | RegExp ) {
18
18
return function ( object : Function ) {
19
19
const metadata : SocketControllerMetadataArgs = {
20
20
namespace : namespace ,
@@ -104,7 +104,7 @@ export function SocketIO() {
104
104
/**
105
105
* Injects received message body.
106
106
*/
107
- export function MessageBody ( options ?: { classTransformOptions ?: ClassTransformOptions } ) {
107
+ export function MessageBody ( options ?: { classTransformOptions ?: ClassTransformOptions } ) {
108
108
return function ( object : Object , methodName : string , index : number ) {
109
109
let format = ( Reflect as any ) . getMetadata ( "design:paramtypes" , object , methodName ) [ index ] ;
110
110
const metadata : ParamMetadataArgs = {
@@ -226,7 +226,7 @@ export function SocketRooms() {
226
226
/**
227
227
* Registers a new middleware to be registered in the socket.io.
228
228
*/
229
- export function Middleware ( options ?: { priority ?: number } ) : Function {
229
+ export function Middleware ( options ?: { priority ?: number } ) : Function {
230
230
return function ( object : Function ) {
231
231
const metadata : MiddlewareMetadataArgs = {
232
232
target : object ,
@@ -241,7 +241,7 @@ export function Middleware(options?: { priority?: number }): Function {
241
241
* It will emit message only if controller succeed without errors.
242
242
* If result is a Promise then it will wait until promise is resolved and emit a message.
243
243
*/
244
- export function EmitOnSuccess ( messageName : string , options ?: { classTransformOptions ?: ClassTransformOptions } ) : Function {
244
+ export function EmitOnSuccess ( messageName : string , options ?: { classTransformOptions ?: ClassTransformOptions } ) : Function {
245
245
return function ( object : Object , methodName : string ) {
246
246
const metadata : ResultMetadataArgs = {
247
247
target : object . constructor ,
@@ -259,7 +259,7 @@ export function EmitOnSuccess(messageName: string, options?: { classTransformOpt
259
259
* It will emit message only if controller throw an exception.
260
260
* If result is a Promise then it will wait until promise throw an error and emit a message.
261
261
*/
262
- export function EmitOnFail ( messageName : string , options ?: { classTransformOptions ?: ClassTransformOptions } ) : Function {
262
+ export function EmitOnFail ( messageName : string , options ?: { classTransformOptions ?: ClassTransformOptions } ) : Function {
263
263
return function ( object : Object , methodName : string ) {
264
264
const metadata : ResultMetadataArgs = {
265
265
target : object . constructor ,
0 commit comments