Skip to main content

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​

PropertyTypeDescriptionDefined in
notificationsStateWebOwnedObservable<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​

ParameterType
_ctxEventContext<[]>

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​

ParameterType
ctxEventContext<[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​

ParameterType
ctxEventContext<[string]>

Returns​

Promise<void>