Skip to content

Function: ActiveField() ​

ActiveField<_T>(opts?): (target, prop) => void

Defined in: src/decorators.ts:220

Declare a class property as a model field.

Type Parameters ​

_T ​

_T extends ActiveModel

Parameters ​

opts? ​

AttributeValue | ActiveFieldDescriptor

field options (see ActiveFieldDescriptor); a bare non-object value is shorthand for { value }

Returns ​

(target, prop) => void