Interface: INotificationService
services.INotificationService
Hierarchy
Component
\<INotification
>↳
INotificationService
Table of contents
Properties
Methods
Properties
state
• Protected
Abstract
state: INotification
\<any
>
Inherited from
Component.state
Defined in
Methods
add
▸ add\<T
>(items
): null
| INotificationItem
\<T
>[]
Add new notification items
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
items | INotificationItem \<T >[] |
Returns
null
| INotificationItem
\<T
>[]
Defined in
src/services/notificationService.ts:14
clear
▸ clear(): void
Clear the notifications
Returns
void
Defined in
src/services/notificationService.ts:32
remove
▸ remove(id
): void
Remove the specific notification item by id
Parameters
Name | Type |
---|---|
id | UniqueId |
Returns
void
Defined in
src/services/notificationService.ts:19
reset
▸ reset(): void
Reset notifications, this will clear the pending notifications
Returns
void
Defined in
src/services/notificationService.ts:36
subscribe
▸ subscribe(name
, listener
): void
Subscribe the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | string [] | Event name |
listener | Function | Listener function |
Returns
void
Inherited from
Component.subscribe
Defined in
src/common/event/eventBus.ts:11
toggleNotification
▸ toggleNotification(): void
Toggle the Notification view between display or hidden
Returns
void
Defined in
src/services/notificationService.ts:28
unsubscribe
▸ unsubscribe(name
, listener?
): void
Unsubscribe the specific event and the listener function
Parameters
Name | Type | Description |
---|---|---|
name | any | The event name |
listener? | Function | optional, it unsubscribes events via name if not pass the listener function |
Returns
void
Inherited from
Component.unsubscribe
Defined in
src/common/event/eventBus.ts:39
update
▸ update\<T
>(item
): null
| INotificationItem
\<T
>
Update the specific notification item
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
item | INotificationItem \<T > | notification item, the id field is required |
Returns
null
| INotificationItem
\<T
>