Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PusherPresenceChannel

Hierarchy

Callable

  • __call(pusher: Pusher, name: string, options: any): PusherChannel
  • Create a new class instance.

    Parameters

    • pusher: Pusher
    • name: string
    • options: any

    Returns PusherChannel

Index

Properties

eventFormatter

eventFormatter: EventFormatter

The event formatter.

name

name: string

The name of the channel.

options

options: any

Channel options.

pusher

pusher: Pusher

The pusher client instance

subscription

subscription: Channel

The subscription of the channel.

Methods

here

  • Register a callback to be called anytime the member list changes.

    Parameters

    • callback: function
        • (users: any[]): void
        • Parameters

          • users: any[]

          Returns void

    Returns PresenceChannel

joining

  • Listen for someone joining the channel.

    Parameters

    • callback: function
        • (user: any): void
        • Parameters

          • user: any

          Returns void

    Returns PresenceChannel

leaving

  • Listen for someone leaving the channel.

    Parameters

    • callback: function
        • (user: any): void
        • Parameters

          • user: any

          Returns void

    Returns PresenceChannel

listen

  • listen(event: string, callback: function): Channel
  • Listen for an event on the channel instance.

    Parameters

    • event: string
    • callback: function
        • (event: any): void
        • Parameters

          • event: any

          Returns void

    Returns Channel

listenForWhisper

  • listenForWhisper(event: string, callback: function): Channel
  • Listen for a whisper event on the channel instance.

    Parameters

    • event: string
    • callback: function
        • (data: any): void
        • Parameters

          • data: any

          Returns void

    Returns Channel

notification

  • notification(callback: function): Channel
  • Listen for a notification on the channel instance.

    Parameters

    • callback: function
        • (notification: any): void
        • Parameters

          • notification: any

          Returns void

    Returns Channel

on

  • on(event: string, callback: pusher.EventCallback): Channel
  • Bind a channel to an event.

    Parameters

    • event: string
    • callback: pusher.EventCallback

    Returns Channel

stopListening

  • stopListening(event: string): Channel
  • Stop listening for an event on the channel instance.

    Parameters

    • event: string

    Returns Channel

subscribe

  • subscribe(): void
  • Subscribe to a Pusher channel.

    Returns void

unsubscribe

  • unsubscribe(): void
  • Unsubscribe from a Pusher channel.

    Returns void

whisper