UNPKG

1.1 kBTypeScriptView Raw
1import { Controller } from '@nestjs/common/interfaces/controllers/controller.interface';
2import { MetadataScanner } from '@nestjs/core/metadata-scanner';
3import { Transport } from './enums';
4import { ClientOptions, PatternMetadata } from './interfaces';
5export interface ClientProperties {
6 property: string;
7 metadata: ClientOptions;
8}
9export interface EventOrMessageListenerDefinition {
10 patterns: PatternMetadata[];
11 methodKey: string;
12 isEventHandler: boolean;
13 targetCallback: (...args: any[]) => any;
14 transport?: Transport;
15 extras?: Record<string, any>;
16}
17export interface MessageRequestProperties {
18 requestPattern: PatternMetadata;
19 replyPattern: PatternMetadata;
20}
21export declare class ListenerMetadataExplorer {
22 private readonly metadataScanner;
23 constructor(metadataScanner: MetadataScanner);
24 explore(instance: Controller): EventOrMessageListenerDefinition[];
25 exploreMethodMetadata(instancePrototype: object, methodKey: string): EventOrMessageListenerDefinition;
26 scanForClientHooks(instance: Controller): IterableIterator<ClientProperties>;
27}