NotificationService
Defined in: src/modules/features/notifications/notification.service.ts:25
Service for managing in-game notifications.
Constructors
Constructor
new NotificationService(): NotificationService;Returns
NotificationService
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
notificationsState | WebOwnedObservable<NotificationsState> | Web-owned observable for notifications. Contains the list of active notifications. | src/modules/features/notifications/notification.service.ts:30 |
Methods
clearNotifications()
clearNotifications(_ctx: EventContext<[]>): Promise<void>;Defined in: src/modules/features/notifications/notification.service.ts:110
Clear all notifications immediately, cancelling any pending timers.
Parameters
| Parameter | Type |
|---|---|
_ctx | EventContext<[]> |
Returns
Promise<void>
dispose()
dispose(): void;Defined in: src/modules/features/notifications/notification.service.ts:130
Dispose the service, clearing all pending timers. Should be called from module onStop hook.
Returns
void
pushNotification()
pushNotification(ctx: EventContext<[NotificationInput]>): Promise<void>;Defined in: src/modules/features/notifications/notification.service.ts:52
Push a new notification. Can be called from client, server, or web.
Parameters
| Parameter | Type |
|---|---|
ctx | EventContext<[NotificationInput]> |
Returns
Promise<void>
removeNotification()
removeNotification(ctx: EventContext<[string]>): Promise<void>;Defined in: src/modules/features/notifications/notification.service.ts:74
Remove a notification by ID with exit animation.
Parameters
| Parameter | Type |
|---|---|
ctx | EventContext<[string]> |
Returns
Promise<void>