MutableOptions
Defined in: packages/ddd-core/domain/decorators/mutable.decorator.ts:8
Registration options for a mutable aggregate field.
Type Parameters
Section titled “Type Parameters”TValue
Section titled “TValue”TValue = unknown
The value type stored in the backing property.
Properties
Section titled “Properties”
readonlyoptionalas?:string
Defined in: packages/ddd-core/domain/decorators/mutable.decorator.ts:14
Public patch key a domain method uses for this field. Defaults to the
decorated property name with a single leading underscore removed
(_username becomes username).
normalize?
Section titled “normalize?”
readonlyoptionalnormalize?: (value) =>TValue
Defined in: packages/ddd-core/domain/decorators/mutable.decorator.ts:22
Invariant check and coercion applied before the value reaches the backing property. Throw a domain exception here to reject the mutation; the aggregate is then left untouched, no version is advanced and no event is recorded.
Parameters
Section titled “Parameters”TValue
Returns
Section titled “Returns”TValue