Function: valueObject()
valueObject(klass, properties)
valueObject<
C
,P
>(klass
:Newable
<C
>,properties
:NonEmptyObject
<P
>):ValueObjectModel
Builds a ValueObjectModel based on a Class.
Type Parameters
Type Parameter | Description |
---|---|
C extends object | The class type. |
P extends Properties <C > | - |
Parameters
Parameter | Type | Description |
---|---|---|
klass | Newable <C > | The class of the value object. |
properties | NonEmptyObject <P > | The properties of the value object. |
Returns
The created value object model.
Defined in
packages/verse-core/src/model/builder.ts:156
valueObject(name, properties)
valueObject<
O
,P
>(name
:string
,properties
:NonEmptyObject
<P
>):ValueObjectModel
Builds a ValueObjectModel based on an Object.
Type Parameters
Type Parameter |
---|
O extends object |
P extends Properties <O > |
Parameters
Parameter | Type | Description |
---|---|---|
name | string | The name of the value object. |
properties | NonEmptyObject <P > | The properties of the entity. |
Returns
The created value object model.