Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type Aliases

Handler<State, Events>: Events extends any ? ((event: Events, state: State | undefined, context: UpdateHandlerContext) => State | undefined) : never

A handler for transforming an incoming event and the previous view state into a new state

param event

The event, this will be of the type of the gRPC event handler input type

param state

The previous view state or 'undefined' if no previous state was stored

param context

The view handler context

returns

The state to store in the view or undefined to not update/store state for the event

Type Parameters

  • State extends object = any

    the type of the stored state

  • Events extends object = any

    the type of all update events, based on the gRPC method input type

Handlers<State, Events>: {}

View update handlers.

remarks

The names of the properties must match the names of all the view methods specified in the gRPC descriptor.

Type Parameters

  • State extends object = any

    the type of the stored state

  • Events extends object = any

    the type of all update events, based on the gRPC method input types

Type declaration

  • [methodName: string]: Handler<State, Events>

Generated using TypeDoc