Class
abstract class Class
It carries the behaviour every class here is expected to have rather than any behaviour of its own, and cannot be instantiated. Extend it when a value object of yours should behave like the library's — being recognised by the guards and compared by equals rather than by identity.
Examples
Shape
class Money extends Class {
constructor(amount) {
super();
this.amount = amount;
}
}
See also
Source
23 September 2026
This documentation was generated with AI (Claude) from the library's source code.