Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Events

The wrapper around events provided by Velt.

Hierarchy

  • Events

Index

Methods

handleEvent

  • handleEvent(event: any): void
  • Execute every event listener that matches this event.

    Parameters

    • event: any

    Returns void

on

  • on(event: string | number | symbol, callback: (...args: any[]) => any): { close: any }
  • Run the callback each time the event is found.

    Parameters

    • event: string | number | symbol
    • callback: (...args: any[]) => any
        • (...args: any[]): any
        • Parameters

          • Rest ...args: any[]

          Returns any

    Returns { close: any }

    • close: function
      • close(): void
      • Close the given event listener.

        Returns void

once

  • once(event: string | number | symbol): Promise<any>
  • once(event: string | number | symbol, cond: (...args: any[]) => any): Promise<any>
  • once(event: string | number | symbol, cond: (...args: any[]) => any, callback: (...args: any[]) => any): Promise<any>
  • once(event: string | number | symbol, cond: (...args: any[]) => any, callback: WaitForOpts): Promise<any>
  • Wait for the next event to be listened that matches the event type specified and the optional condition.

    Parameters

    • event: string | number | symbol

      The event to wait for.

    Returns Promise<any>

  • Parameters

    • event: string | number | symbol
    • cond: (...args: any[]) => any
        • (...args: any[]): any
        • Parameters

          • Rest ...args: any[]

          Returns any

    Returns Promise<any>

  • Parameters

    • event: string | number | symbol
    • cond: (...args: any[]) => any
        • (...args: any[]): any
        • Parameters

          • Rest ...args: any[]

          Returns any

    • callback: (...args: any[]) => any
        • (...args: any[]): any
        • Parameters

          • Rest ...args: any[]

          Returns any

    Returns Promise<any>

  • Parameters

    • event: string | number | symbol
    • cond: (...args: any[]) => any
        • (...args: any[]): any
        • Parameters

          • Rest ...args: any[]

          Returns any

    • callback: WaitForOpts

    Returns Promise<any>

waitFor

  • waitFor(event: string | number | symbol): Promise<any>
  • waitFor(event: string | number | symbol, cond: (...args: any[]) => any): Promise<any>
  • waitFor(event: string | number | symbol, cond: (...args: any[]) => any, callback: (...args: any[]) => any): Promise<any>
  • waitFor(event: string | number | symbol, cond: (...args: any[]) => any, callback: WaitForOpts): Promise<any>
  • Wait for the next event to be listened that matches the event type specified and the optional condition.

    alias

    once

    Parameters

    • event: string | number | symbol

      The event to wait for.

    Returns Promise<any>

  • Parameters

    • event: string | number | symbol
    • cond: (...args: any[]) => any
        • (...args: any[]): any
        • Parameters

          • Rest ...args: any[]

          Returns any

    Returns Promise<any>

  • Parameters

    • event: string | number | symbol
    • cond: (...args: any[]) => any
        • (...args: any[]): any
        • Parameters

          • Rest ...args: any[]

          Returns any

    • callback: (...args: any[]) => any
        • (...args: any[]): any
        • Parameters

          • Rest ...args: any[]

          Returns any

    Returns Promise<any>

  • Parameters

    • event: string | number | symbol
    • cond: (...args: any[]) => any
        • (...args: any[]): any
        • Parameters

          • Rest ...args: any[]

          Returns any

    • callback: WaitForOpts

    Returns Promise<any>

Generated using TypeDoc