Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace EventManager

Index

Type aliases

BusSubscription

BusSubscription: []

Variables

Const busSubscriptions

busSubscriptions: Map<EventBus, [string | number | symbol, ((...args: any[]) => R) | Iterable<(...args: any[]) => R>, undefined | number][]> = new Map<EventBus, BusSubscription[]>()

Const subscriberMap

subscriberMap: Map<IEventSubscriberClass, Map<IEventSubscriber, [Actions | CreatureManager | DoodadManager | Doodads | Game | ItemManager | Items | Language | LocalPlayer | Mods | Multiplayer | NPCManager | PlayerManager | Players | SaveManager | Steamworks | TileEventManager | TileEvents | Ui | (Function & { prototype: T }) | {}, string | number | symbol, (...args: any[]) => R, undefined | number][]>> = new Map<IEventSubscriberClass, Map<IEventSubscriber, Array<[EventBus | IEventEmitterHostClass<any>, string | number | symbol, AnyFunction, number?]>>>()

Functions

deregisterEventBusSubscriber

  • deregisterEventBusSubscriber(subscriber: object): void
  • Parameters

    • subscriber: object

    Returns void

initializeBusSubscriptions

  • initializeBusSubscriptions(eventBus: EventBus): [string | number | symbol, ((...args: any[]) => R) | Iterable<(...args: any[]) => R>, undefined | number][]
  • Parameters

    Returns [string | number | symbol, ((...args: any[]) => R) | Iterable<(...args: any[]) => R>, undefined | number][]

registerEventBusSubscriber

  • registerEventBusSubscriber(subscriber: object): void
  • Parameters

    • subscriber: object

    Returns void

subscribe

  • subscribe<E, K>(emitter: E, event: K, handler: IterableOr<Handler<E, K>>, priority?: number): void
  • Type parameters

    Parameters

    • emitter: E
    • event: K
    • handler: IterableOr<Handler<E, K>>
    • Default value priority: number = 0

    Returns void

unsubscribe

  • unsubscribe<E, K>(emitter: E, event: K, handler: IterableOr<Handler<E, K>>, priority?: number): undefined | false | true
  • Type parameters

    Parameters

    • emitter: E
    • event: K
    • handler: IterableOr<Handler<E, K>>
    • Default value priority: number = 0

    Returns undefined | false | true

until

waitFor

  • waitFor<E, K>(emitter: E, event: K, priority?: number): Promise<Parameters<Handler<E, K>>>
  • Type parameters

    Parameters

    • emitter: E
    • event: K
    • Default value priority: number = 0

    Returns Promise<Parameters<Handler<E, K>>>

Generated using TypeDoc