archstone 1.3.0-rc.3 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/index.d.ts +1 -1
- package/dist/domain/application/index.d.ts +1 -1
- package/dist/domain/enterprise/index.d.ts +1 -1
- package/dist/domain/index.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/shared/{chunk-v5h13a5p.d.ts → chunk-z9br464b.d.ts} +7 -1
- package/package.json +1 -1
- package/skills/use-archstone/SKILL.md +1 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DomainEvent, DomainEvents, Either, EventHandler1 as EventHandler, Optional, UniqueEntityId, ValueObject, WatchedList, left, right } from "../shared/chunk-
|
|
1
|
+
import { DomainEvent, DomainEvents, Either, EventHandler1 as EventHandler, Optional, UniqueEntityId, ValueObject, WatchedList, left, right } from "../shared/chunk-z9br464b.js";
|
|
2
2
|
export { right, left, WatchedList, ValueObject, UniqueEntityId, Optional, EventHandler, Either, DomainEvents, DomainEvent };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Creatable, Deletable, Findable, Repository, Saveable, UseCase, UseCaseError } from "../../shared/chunk-
|
|
1
|
+
import { Creatable, Deletable, Findable, Repository, Saveable, UseCase, UseCaseError } from "../../shared/chunk-z9br464b.js";
|
|
2
2
|
export { UseCaseError, UseCase, Saveable, Repository, Findable, Deletable, Creatable };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AggregateRoot, DomainEvent, DomainEvents, Entity, EventHandler } from "../../shared/chunk-
|
|
1
|
+
import { AggregateRoot, DomainEvent, DomainEvents, Entity, EventHandler } from "../../shared/chunk-z9br464b.js";
|
|
2
2
|
export { EventHandler, Entity, DomainEvents, DomainEvent, AggregateRoot };
|
package/dist/domain/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AggregateRoot, Creatable, Deletable, DomainEvent, DomainEvents, Entity, EventHandler, Findable, Repository, Saveable, UseCase, UseCaseError } from "../shared/chunk-
|
|
1
|
+
import { AggregateRoot, Creatable, Deletable, DomainEvent, DomainEvents, Entity, EventHandler, Findable, Repository, Saveable, UseCase, UseCaseError } from "../shared/chunk-z9br464b.js";
|
|
2
2
|
export { UseCaseError, UseCase, Saveable, Repository, Findable, EventHandler, Entity, DomainEvents, DomainEvent, Deletable, Creatable, AggregateRoot };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AggregateRoot, Creatable, Deletable, DomainEvent, DomainEvents, Either, Entity, Findable, Optional, Repository, Saveable, UniqueEntityId, UseCase, UseCaseError, ValueObject, WatchedList, left, right } from "./shared/chunk-
|
|
1
|
+
import { AggregateRoot, Creatable, Deletable, DomainEvent, DomainEvents, Either, Entity, Findable, Optional, Repository, Saveable, UniqueEntityId, UseCase, UseCaseError, ValueObject, WatchedList, left, right } from "./shared/chunk-z9br464b.js";
|
|
2
2
|
export { right, left, WatchedList, ValueObject, UseCaseError, UseCase, UniqueEntityId, Saveable, Repository, Optional, Findable, Entity, Either, DomainEvents, DomainEvent, Deletable, Creatable, AggregateRoot };
|
|
@@ -313,8 +313,14 @@ interface EventHandler {
|
|
|
313
313
|
}
|
|
314
314
|
/**
|
|
315
315
|
* Callback function invoked when a domain event is dispatched.
|
|
316
|
+
*
|
|
317
|
+
* The bivariant method signature allows handlers typed to a specific
|
|
318
|
+
* `DomainEvent` subtype to be registered — TypeScript enforces strict
|
|
319
|
+
* contravariance on function types but not on method signatures.
|
|
316
320
|
*/
|
|
317
|
-
type DomainEventCallback =
|
|
321
|
+
type DomainEventCallback = {
|
|
322
|
+
bivarianceHack(event: DomainEvent): Promise<void>;
|
|
323
|
+
}["bivarianceHack"];
|
|
318
324
|
/**
|
|
319
325
|
* Central registry and dispatcher for domain events.
|
|
320
326
|
*
|
package/package.json
CHANGED
|
@@ -44,7 +44,7 @@ Define as interfaces only. Use `Repository<T>` or compose `Findable`, `Creatable
|
|
|
44
44
|
|
|
45
45
|
## Domain Events
|
|
46
46
|
|
|
47
|
-
Raise inside the aggregate via `addDomainEvent()`. Dispatch after persistence via `DomainEvents.dispatchEventsForAggregate(aggregate.id)`. Define handlers as classes implementing `EventHandler
|
|
47
|
+
Raise inside the aggregate via `addDomainEvent()`. Dispatch after persistence via `DomainEvents.dispatchEventsForAggregate(aggregate.id)`. Define handlers as classes implementing `EventHandler<T>`. See [Domain Event Patterns](references/domain-events.md).
|
|
48
48
|
|
|
49
49
|
## Testing
|
|
50
50
|
|