UNPKG

870 BTypeScriptView Raw
1import { ContextId } from '../injector/instance-wrapper';
2import { ParamProperties } from './context-utils';
3export declare const HANDLER_METADATA_SYMBOL: unique symbol;
4export interface HandlerMetadata {
5 argsLength: number;
6 paramtypes: any[];
7 httpStatusCode: number;
8 responseHeaders: any[];
9 hasCustomHeaders: boolean;
10 getParamsMetadata: (moduleKey: string, contextId?: ContextId, inquirerId?: string) => (ParamProperties & {
11 metatype?: any;
12 })[];
13 fnHandleResponse: <TResult, TResponse>(result: TResult, res: TResponse) => any;
14}
15export declare class HandlerMetadataStorage<TValue = HandlerMetadata, TKey = any> {
16 private readonly [HANDLER_METADATA_SYMBOL];
17 set(controller: TKey, methodName: string, metadata: TValue): void;
18 get(controller: TKey, methodName: string): TValue | undefined;
19 private getMetadataKey;
20}