Target
@rotorsoft/act-root / act/src / Target
Type Alias: Target<TActor>
Target<
TActor> =object
Defined in: libs/act/src/types/action.ts:71
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:73
expectedVersion?โ
readonlyoptionalexpectedVersion?:number
Defined in: libs/act/src/types/action.ts:74
streamโ
readonlystream:string
Defined in: libs/act/src/types/action.ts:72