Page Contents
Home > @loopback/express > ExpressMiddlewareInterceptorProvider
ExpressMiddlewareInterceptorProvider class
Base class for MiddlewareInterceptor provider classes
Signature:
export declare abstract class ExpressMiddlewareInterceptorProvider<CFG, CTX extends Context = InvocationContext> implements Provider<GenericInterceptor<CTX>>
Implements: Provider<GenericInterceptor<CTX>>
Example
To inject the configuration without automatic reloading:
class SpyInterceptorProvider extends ExpressMiddlewareInterceptorProvider<
SpyConfig
> {
constructor(@config() spyConfig?: SpyConfig) {
super(spy, spyConfig);
}
}
To inject the configuration without automatic reloading:
class SpyInterceptorProvider extends ExpressMiddlewareInterceptorProvider<
SpyConfig
> {
constructor(@config.view() configView?: ContextView<SpyConfig>) {
super(spy, configView);
}
}
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(middlewareFactory, middlewareConfig) | Constructs a new instance of the ExpressMiddlewareInterceptorProvider class |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| middlewareConfig? | CFG | (Optional) | |
| middlewareConfigView? | ContextView<CFG> | (Optional) | |
| middlewareFactory | ExpressMiddlewareFactory<CFG> |
Methods
| Method | Modifiers | Description |
|---|---|---|
| value() |