Skip to main content
Version: Current

EventMigration

@rotorsoft/act-root


@rotorsoft/act-root / act/src / EventMigration

Type Alias: EventMigration<TOld, TNew>

EventMigration<TOld, TNew> = object

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

Per-event migration definition for ScanOptions.event_migrations. Carries both the rename target and the schema-guarded transform that rewrites the event's data payload.

Type Parameters​

TOld​

TOld

TNew​

TNew

Properties​

from_schema​

readonly from_schema: object

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

Schema of the source event's data. Throws on mismatch.

parse​

parse: (data) => TOld

Parameters​
data​

unknown

Returns​

TOld


migrate​

readonly migrate: (data) => TNew

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

Pure data transformer.

Parameters​

data​

TOld

Returns​

TNew


to​

readonly to: string

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

Target event name (the current version).


to_schema​

readonly to_schema: object

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

Schema of the migrated event's data. Throws on mismatch.

parse​

parse: (data) => TNew

Parameters​
data​

unknown

Returns​

TNew