Initial commit - Event Planner application
This commit is contained in:
22
node_modules/@nestjs/common/interfaces/microservices/pre-request-hook.interface.d.ts
generated
vendored
Normal file
22
node_modules/@nestjs/common/interfaces/microservices/pre-request-hook.interface.d.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import { Observable } from 'rxjs';
|
||||
import { ExecutionContext } from '../features/execution-context.interface.js';
|
||||
/**
|
||||
* Interface describing a global preRequest hook for microservices.
|
||||
*
|
||||
* Hooks are executed before guards, allowing setup of context (e.g. AsyncLocalStorage)
|
||||
* that is available to all downstream enhancers.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* const als = new AsyncLocalStorage();
|
||||
* app.registerPreRequestHook((context, next) => {
|
||||
* als.enterWith({ correlationId: uuid() });
|
||||
* return next();
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface PreRequestHook {
|
||||
(context: ExecutionContext, next: () => Observable<unknown>): Observable<unknown>;
|
||||
}
|
||||
Reference in New Issue
Block a user