Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NotificationManager

Notification manager

Hierarchy

  • NotificationManager

Implements

  • IDisposable

Index

Constructors

constructor

Properties

Private _changed

_changed: any

Private _isDisposed

_isDisposed: any

Private _queue

_queue: any

Accessors

changed

  • Signal emitted whenever a notification changes.

    Returns ISignal<NotificationManager, IChange>

count

  • get count(): number
  • Total number of notifications.

    Returns number

isDisposed

  • get isDisposed(): boolean
  • Whether the manager is disposed or not.

    Returns boolean

notifications

  • The list of notifications.

    Returns INotification<ReadonlyJSONValue>[]

Methods

dismiss

  • dismiss(id?: string): void
  • Dismiss one notification (specified by its id) or all if no id provided.

    Parameters

    • Optional id: string

      Notification id

    Returns void

dispose

  • dispose(): void
  • Dispose the manager.

    Returns void

has

  • has(id: string): boolean
  • Test whether a notification exists or not.

    Parameters

    • id: string

      Notification id

    Returns boolean

    Notification status

notify

  • Add a new notification.

    This will trigger the changed signal with an added event.

    Type parameters

    • T: ReadonlyJSONValue = ReadonlyJSONValue

    Parameters

    • message: string

      Notification message

    • type: TypeOptions

      Notification type

    • options: IOptions<T>

      Notification option

    Returns string

    Notification unique id

update

  • update<T>(args: IUpdate<T>): boolean
  • Update an existing notification.

    If the notification does not exists this won't do anything.

    Once updated the notification will be moved at the begin of the notification stack.

    Type parameters

    • T: ReadonlyJSONValue = ReadonlyJSONValue

    Parameters

    Returns boolean

    Whether the update was successful or not.

Generated using TypeDoc