Skip to content

getBehaviorId

getBehaviorId(cls): BehaviorId

Defined in: packages/pipeline/src/helpers/behavior-id.ts:50

Returns the identity used to deduplicate a behavior and resolve its options.

By default the constructor reference is the identity. A behavior that must be recognized across multiple loaded copies of the same package can opt into a stable string identity through PIPELINE_BEHAVIOR_ID.

Constructor<IPipelineBehavior<unknown, unknown>>

Behavior class whose identity should be resolved.

BehaviorId

The constructor reference or the behavior’s explicit stable id.

Stable identity across duplicated package copies

export class LoggingBehavior implements IPipelineBehavior {
static readonly [PIPELINE_BEHAVIOR_ID] = 'my-package:LoggingBehavior';
}