Skip to main content

LoadTarget

@rotorsoft/act-root


@rotorsoft/act-root / act/src / LoadTarget

Type Alias: LoadTarget<TActor>

LoadTarget<TActor> = object

Defined in: libs/act/src/types/action.ts:94

Auth-aware target for IAct.load. Symmetric with Target (used by IAct.do) but without expectedVersion โ€” load is a read, not a write โ€” and with optional asOf for time-travel.

Passing a LoadTarget (rather than a bare stream string) is the framework's explicit "I'm reading on behalf of this actor" signal. The read-path runs the state's .discloses(predicate) against this actor; sensitive fields come back as plaintext when authorized, [REDACTED] otherwise. The bare-string load form always default-denies (everything comes back [REDACTED]), so callers who need plaintext access must explicitly construct a LoadTarget. actor is optional โ€” anonymous background calls (close-cycle replay, internal restart seeding) pass just the stream and get the default-deny path.

Type Parametersโ€‹

TActorโ€‹

TActor extends Actor = Actor

The actor type bound at act().withActor<TActor>().

Propertiesโ€‹

actor?โ€‹

readonly optional actor?: TActor

Defined in: libs/act/src/types/action.ts:96


asOf?โ€‹

readonly optional asOf?: AsOf

Defined in: libs/act/src/types/action.ts:97


streamโ€‹

readonly stream: string

Defined in: libs/act/src/types/action.ts:95