Skip to content

v8.3.4

Choose a tag to compare

@github-actions github-actions released this 06 Oct 10:46
· 18 commits to master since this release
804e7c9

Changes

  • fix(factories): 🐛 Return subclass from static factories (#94)

Release details

Pull request notes

Closes #94

UUID.generate, ShortId.generate, Timestamp.now/new/fromSeconds and Duration.from* now instantiate through the receiver (new this(...)) with a typed this, so subclasses get subclass instances and types, and isEqual works against them.

Note: calling the factories detached (const f = UUID.generate; f(), .map(Duration.fromDays)) no longer works.

Adds regression tests in tests/value-objects/SubclassFactories.spec.ts.