Kind: Interface
Source: packages/core/inspector/interfaces/extras.interface.ts
Part of: Core
Enhancers attached through APP_PIPE, APP_GUARD, APP_INTERCEPTOR, and APP_FILTER tokens.
AttachedEnhancerDefinition represents an enhancer registered through NestJS application-level tokens such as APP_PIPE, APP_GUARD, APP_INTERCEPTOR, or APP_FILTER. It links the discovered enhancer definition to the identifier of the dependency graph node that provides or declares it.
Properties
| Property | Type |
|---|---|
nodeId | string |
Diagram
mermaidgraph LR A[APP_PIPE / APP_GUARD / APP_INTERCEPTOR / APP_FILTER] --> B[AttachedEnhancerDefinition] B --> C[nodeId: string] C --> D[Inspector dependency graph node]
Usage
tsimport type { AttachedEnhancerDefinition } from './interfaces/extras.interface';
const attachedGuard: AttachedEnhancerDefinition = {
nodeId: 'auth-guard-provider-node',
};
function registerAttachedEnhancer(
enhancer: AttachedEnhancerDefinition,
) {
console.log(`Tracking application enhancer node: ${enhancer.nodeId}`);
}
registerAttachedEnhancer(attachedGuard);
AI Coding Instructions
- Use
nodeIdto reference the corresponding provider or dependency-graph node; do not store the enhancer instance directly in this interface. - Populate this definition only for enhancers attached through
APP_PIPE,APP_GUARD,APP_INTERCEPTOR, orAPP_FILTER. - Ensure
nodeIdmatches the identifier generated by the inspector's graph or provider-discovery process. - Keep this interface lightweight and serializable because it may be stored or emitted as inspector metadata.
Relationships
- IMPORTS →
EnhancerSubtype
Was this page helpful?