Target
@rotorsoft/act-root / act/src / Target
Type Alias: Target<TActor>
Target<
TActor> =object
Defined in: libs/act/src/types/action.ts:69
Target specification for action execution.
Identifies which state instance (stream) should process the action and who is performing it. The target combines the stream identifier with actor context for complete audit trail.
Examples
const target: Target = {
stream: "user-123",
actor: { id: "admin", name: "Admin User" }
};
await app.do("updateProfile", target, { email: "new@example.com" });
const userId = "user-" + Date.now();
await app.do("createUser", {
stream: userId,
actor: currentUser
}, userData);
Type Parameters
TActor
Actor type extending base Actor (default: Actor)
Properties
actor
readonlyactor:TActor
Defined in: libs/act/src/types/action.ts:71
expectedVersion?
readonlyoptionalexpectedVersion:number
Defined in: libs/act/src/types/action.ts:72
stream
readonlystream:string
Defined in: libs/act/src/types/action.ts:70