MCPcopy Index your code
hub / github.com/loopbackio/loopback-next / interceptor

Method interceptor

packages/core/src/application.ts:575–581  ·  view source on GitHub ↗

* Register an interceptor * @param interceptor - An interceptor function or provider class * @param nameOrOptions - Binding name or options

(
    interceptor: Interceptor | Constructor<Provider<Interceptor>>,
    nameOrOptions?: string | InterceptorBindingOptions,
  )

Source from the content-addressed store, hash-verified

573 * @param nameOrOptions - Binding name or options
574 */
575 public interceptor(
576 interceptor: Interceptor | Constructor<Provider<Interceptor>>,
577 nameOrOptions?: string | InterceptorBindingOptions,
578 ) {
579 const options = toOptions(nameOrOptions);
580 return registerInterceptor(this, interceptor, options);
581 }
582
583 /**
584 * Set up signals that are captured to shutdown the application

Callers 3

loadMethod · 0.80
valueFunction · 0.80

Calls 2

registerInterceptorFunction · 0.90
toOptionsFunction · 0.70

Tested by

no test coverage detected