UNPKG

721 BTypeScriptView Raw
1import { BaseRpcContext } from '../ctx-host/base-rpc.context';
2import { RequestContext } from '../interfaces';
3/**
4 * @publicApi
5 */
6export declare class RequestContextHost<TData = any, TContext extends BaseRpcContext = any> implements RequestContext<TData> {
7 readonly pattern: string | Record<string, any>;
8 readonly data: TData;
9 readonly context: TContext;
10 constructor(pattern: string | Record<string, any>, data: TData, context: TContext);
11 static create<TData, TContext extends BaseRpcContext>(pattern: string | Record<string, any>, data: TData, context: TContext): RequestContext<TData, TContext>;
12 getData(): TData;
13 getPattern(): string | Record<string, any>;
14 getContext(): TContext;
15}