Course lesson

Restrict Available Operations on Values using Value Objects

Value Objects are another pattern in Domain-driven Design that provide more structure around what you can and cannot do with a type.

Duration
8 min
Access
Included
Transcript
Retained from source evidence

Value Objects are another pattern in Domain-driven Design that provide more structure around what you can and cannot do with a type.

In TypeScript we create Value Objects with classes that will define what operations can be performed to the value on the class itself. In this lesson we'll explore how to create a Value Object for our Money type.