Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type Aliases

CommandHandler<State>: ((command: any, context: replicatedentity.ReplicatedEntity.CommandContext<State>) => Promise<CommandReply> | CommandReply)

Type Parameters

Type declaration

CommandHandlers<State>: {}

Replicated entity command handlers.

Type Parameters

Type declaration

OnStateSetCallback<State>: ((state: State, entityId: string) => void)

Type Parameters

Type declaration

    • (state: State, entityId: string): void
    • A state set handler callback.

      remarks

      This is invoked whenever a new state is set on the Replicated Entity, to allow the state to be enriched with domain specific properties and methods. This may be due to the state being set explicitly from a command handler on the command context, or implicitly as the default value, or implicitly when a new state is received from the proxy.

      Parameters

      • state: State

        The Replicated Data state that was set

      • entityId: string

        The id of the entity

      Returns void

DefaultValueCallback<State>: ((entityId: string) => State | null)

Type Parameters

Type declaration

    • (entityId: string): State | null
    • A callback that is invoked to create a default value if the Kalix proxy doesn't send an existing one.

      Parameters

      • entityId: string

        The id of the entity

      Returns State | null

      The default value to use for this entity

Generated using TypeDoc