Documentation / @blazetrails/activemodel / AttributeRegistration
Variable: AttributeRegistration
constAttributeRegistration: {ClassMethods: {_defaultAttributes:AttributeSet;attribute:void;attributeTypes:Record<string,ValueType<unknown>> |Hash<string,ValueType<unknown>>;decorateAttributes:void;typeForAttribute:ValueType; };[included]:void; }
Defined in: packages/activemodel/lib/attribute-registration.ts:250
Type Declaration
ClassMethods
ClassMethods: {
_defaultAttributes:AttributeSet;attribute:void;attributeTypes:Record<string,ValueType<unknown>> |Hash<string,ValueType<unknown>>;decorateAttributes:void;typeForAttribute:ValueType; }
ClassMethods._defaultAttributes()
_defaultAttributes(
this):AttributeSet
Parameters
| Parameter | Type |
|---|---|
this | AttributeHostInternals & HostAsClass |
Returns
Invented Arm
registerSubclass — PERMANENT
ClassMethods.attribute()
attribute(
this,name,type?,options?):void
Parameters
| Parameter | Type | Default value |
|---|---|---|
this | AttributeRegistrationHost | undefined |
name | string | undefined |
type | string | ValueType<unknown> | AttributeOptions | null | null |
options | AttributeOptions | {} |
Returns
void
ClassMethods.attributeTypes()
attributeTypes(
this):Record<string,ValueType<unknown>> |Hash<string,ValueType<unknown>>
Parameters
| Parameter | Type |
|---|---|
this | AttributeHostInternals |
Returns
Record<string, ValueType<unknown>> | Hash<string, ValueType<unknown>>
Invented Arm
if — PERMANENT
ClassMethods.decorateAttributes()
decorateAttributes(
this,names,decorator):void
Parameters
| Parameter | Type |
|---|---|
this | AttributeHostInternals |
names | string[] | null |
decorator | AttributeDecorator |
Returns
void
ClassMethods.typeForAttribute()
typeForAttribute(
this,attributeName,block?):ValueType
Parameters
| Parameter | Type |
|---|---|
this | AttributeHostInternals |
attributeName | string |
block? | () => ValueType |
Returns
[included]()
[included](
base):void
Parameters
| Parameter | Type |
|---|---|
base | (...args) => unknown |
Returns
void