Skip to content

Introduce value object interface / abstract #4

Open
@adenhertog

Description

@adenhertog

Create a new base class (ie; ValueObject<PropertyType>) that can be inherited to create a value object concrete definition.

Value objects are a core concept of DDD and represent things that are identified by their value rather than their hash/id/reference etc. See: https://martinfowler.com/bliki/ValueObject.html

There're already some examples on the web on this practice in typescript (eg https://khalilstemmler.com/articles/typescript-value-object/) that can be used. This task can be used to create a similar base and exposed in ddd.

Side note: operator overloading provides a cleaner way to do this in other languages, but that doesn't appear to be coming to java/typescript: microsoft/TypeScript#6936

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions