Page Contents
Home > @loopback/context > createProxyWithInterceptors
createProxyWithInterceptors() function
Create a proxy that applies interceptors for method invocations
Signature:
export declare function createProxyWithInterceptors<T extends object>(target: T, context?: Context, session?: ResolutionSession, source?: InvocationSource): AsyncProxy<T>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| target | T | Target class or object |
| context | Context | Context object |
| session | ResolutionSession | Resolution session |
| source | InvocationSource | Invocation source |
Returns:
AsyncProxy<T>