Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

Destructible

Destructible<T>: T extends {} ? T : {}

Type parameters

  • T

EventHandlers

EventHandlers<State, Event, Payloads>: {}

事件处理器

Type parameters

Type declaration

EventPayloadMap

EventPayloadMap<T>: {}

Type parameters

  • T

Type declaration

EventPayloads

EventPayloads<Event>: {}

事件有效载荷

Type parameters

  • Event: string | number

Type declaration

GameEvent

GameEvent<name, Payload>: Destructible<Payload> & IEventContext & { payload: Payload; type: name }

Type parameters

  • name: string | number | symbol

  • Payload

GameEventType

GameEventType<Payloads>: EventPayloadMap<Payloads>[keyof Payloads]

Type parameters

  • Payloads: object

Handler

Handler<StateOperator, name, Payload>: (operator: StateOperator, event: GameEvent<name, Payload>) => any

Type parameters

  • StateOperator

  • name: string | number | symbol

  • Payload

Type declaration

    • (operator: StateOperator, event: GameEvent<name, Payload>): any
    • Parameters

      • operator: StateOperator
      • event: GameEvent<name, Payload>

      Returns any

ReduxEventHandlers

ReduxEventHandlers<State, Event, Payloads, Action>: {}

ReduxGame 事件处理器

Type parameters

  • State

  • Event: string | number

  • Payloads: EventPayloads<Event> = {}

  • Action: ReduxAction = AnyAction

Type declaration

Functions

fromServerOnly

  • fromServerOnly<StateOperator, name, P>(handler: Handler<StateOperator, name, P>): Handler<StateOperator, name, P>
  • 限制某个事件的处理方法只在由服务端派发时运行,该方法传入一个事件处理方法,返回一个新的事件处理方法。

    Type parameters

    • StateOperator

    • name: string | number | symbol

    • P

    Parameters

    • handler: Handler<StateOperator, name, P>

    Returns Handler<StateOperator, name, P>

serverOnly

  • serverOnly<StateOperator, name, P>(handler: Handler<StateOperator, name, P>): Handler<StateOperator, name, P>
  • 限制某个事件的处理方法只在服务端运行,该方法传入一个事件处理方法,返回一个新的事件处理方法。

    Type parameters

    • StateOperator

    • name: string | number | symbol

    • P

    Parameters

    • handler: Handler<StateOperator, name, P>

    Returns Handler<StateOperator, name, P>

Legend

  • Object literal
  • Variable
  • Function with type parameter
  • Type alias with type parameter
  • Interface
  • Interface with type parameter
  • Enumeration
  • Class with type parameter

Generated using TypeDoc