Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IModuleChannel

An interface to communicate with another component.

api-version

1

user

Hierarchy

  • IModuleChannel

Index

Methods

  • containsOnAnotherSide(eventNames: string[]): boolean
  • Tells whether the given events are currently registered on another-side channel or not.

    api-version

    1

    user

    Parameters

    • eventNames: string[]

      Event names to search.

    Returns boolean

    Return true if the given events are registered all on another-side channel, otherwise false.

  • receive(eventName: string, listener: ((...args: any) => void)): void
  • Register a listener to receive the given event which is sent from another-side channel.

    api-version

    1

    user

    Parameters

    • eventName: string

      An event name.

    • listener: ((...args: any) => void)

      A listener to receive the given event.

        • (...args: any): void
        • Parameters

          • Rest ...args: any

          Returns void

    Returns void

  • remove(eventName: string, listener: ((...args: any) => void)): void
  • Remove a listener matched with the event name.

    api-version

    1

    user

    Parameters

    • eventName: string

      An event name to search.

    • listener: ((...args: any) => void)

      A listener to remove.

        • (...args: any): void
        • Parameters

          • Rest ...args: any

          Returns void

    Returns void

  • removeAll(eventName: string): void
  • Remove all listeners matched with the event name.

    api-version

    1

    user

    Parameters

    • eventName: string

      An event name to remove.

    Returns void

  • send(eventName: string, ...args: any): void
  • Send an event to another-side channel by the string name.

    api-version

    1

    user

    Parameters

    • eventName: string

      An event name.

    • Rest ...args: any

      Any parameters which are sent.

    Returns void

Generated using TypeDoc