Skip to content

Commit

Permalink
Changed source type in Listen decorator to Source to support filters.
Browse files Browse the repository at this point in the history
  • Loading branch information
solidhtp committed Oct 6, 2021
1 parent 8205012 commit 8372209
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/decorator/listen/listen.decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import { AMQP_DEFAULT_CONNECTION_TOKEN, QUEUE_LISTEN_METADATA_KEY } from '../../

import { ListenerMetadata } from '../../domain';
import { ListenOptions } from '../../interface';
import { Source } from 'rhea-promise';

interface ListenOverload {
(source: string, connection?: string): MethodDecorator;
<T>(source: string, options: ListenOptions<T>, connection?: string): MethodDecorator;
(source: string | Source, connection?: string): MethodDecorator;
<T>(source: string | Source, options: ListenOptions<T>, connection?: string): MethodDecorator;
}

/**
Expand All @@ -27,7 +28,7 @@ interface ListenOverload {
* @public
*/
export const Listen: ListenOverload = <T>(
source: string,
source: string | Source,
listenOptions?: ListenOptions<T> | string,
connectionName?: string,
): MethodDecorator => {
Expand Down

0 comments on commit 8372209

Please sign in to comment.