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 (Optional) Context object
session ResolutionSession (Optional) Resolution session
source InvocationSource (Optional) Invocation source

Returns:

AsyncProxy<T>