Skip to content

@serenity-is/corelib / addCustomAttribute

Function: addCustomAttribute()

addCustomAttribute(type, attr): void

Defined in: src/base/system.ts:489

Attaches a custom attribute instance to a type's metadata. JavaScript has no native attribute support, so Serenity stores attributes on typeInfo.customAttributes.

Parameters

type

any

Target type (class / enum object) to attach the attribute to.

attr

CustomAttribute

Attribute instance to add.

Returns

void