File tree Expand file tree Collapse file tree
packages/microservices/decorators Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,18 +22,18 @@ export const EventPattern: {
2222 ) : MethodDecorator ;
2323} = < T = string > (
2424 metadata ?: T ,
25- arg1 ?: Transport | Record < string , any > ,
26- arg2 ?: Record < string , any > ,
25+ transportOrExtras ?: Transport | Record < string , any > ,
26+ maybeExtras ?: Record < string , any > ,
2727) : MethodDecorator => {
2828 let transport : Transport ;
2929 let extras : Record < string , any > ;
30- if ( isNumber ( arg1 ) && isNil ( arg2 ) ) {
31- transport = arg1 ;
32- } else if ( isObject ( arg1 ) && isNil ( arg2 ) ) {
33- extras = arg1 ;
30+ if ( isNumber ( transportOrExtras ) && isNil ( maybeExtras ) ) {
31+ transport = transportOrExtras ;
32+ } else if ( isObject ( transportOrExtras ) && isNil ( maybeExtras ) ) {
33+ extras = transportOrExtras ;
3434 } else {
35- transport = arg1 as Transport ;
36- extras = arg2 ;
35+ transport = transportOrExtras as Transport ;
36+ extras = maybeExtras ;
3737 }
3838 return (
3939 target : object ,
Original file line number Diff line number Diff line change @@ -36,18 +36,18 @@ export const MessagePattern: {
3636 ) : MethodDecorator ;
3737} = < T = PatternMetadata | string > (
3838 metadata ?: T ,
39- arg1 ?: Transport | Record < string , any > ,
40- arg2 ?: Record < string , any > ,
39+ transportOrExtras ?: Transport | Record < string , any > ,
40+ maybeExtras ?: Record < string , any > ,
4141) : MethodDecorator => {
4242 let transport : Transport ;
4343 let extras : Record < string , any > ;
44- if ( isNumber ( arg1 ) && isNil ( arg2 ) ) {
45- transport = arg1 ;
46- } else if ( isObject ( arg1 ) && isNil ( arg2 ) ) {
47- extras = arg1 ;
44+ if ( isNumber ( transportOrExtras ) && isNil ( maybeExtras ) ) {
45+ transport = transportOrExtras ;
46+ } else if ( isObject ( transportOrExtras ) && isNil ( maybeExtras ) ) {
47+ extras = transportOrExtras ;
4848 } else {
49- transport = arg1 as Transport ;
50- extras = arg2 ;
49+ transport = transportOrExtras as Transport ;
50+ extras = maybeExtras ;
5151 }
5252 return (
5353 target : object ,
You can’t perform that action at this time.
0 commit comments