mirror of
https://github.com/ae-utbm/sith.git
synced 2026-05-22 00:40:22 +00:00
add doc comments for notifications
This commit is contained in:
@@ -7,11 +7,30 @@ export enum NotificationLevel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface NotificationPlugin {
|
export interface NotificationPlugin {
|
||||||
|
/**
|
||||||
|
* Add an error message to the notifications.
|
||||||
|
*/
|
||||||
error: (message: string) => void;
|
error: (message: string) => void;
|
||||||
|
/**
|
||||||
|
* Add a warning message to the notifications
|
||||||
|
*/
|
||||||
warning: (message: string) => void;
|
warning: (message: string) => void;
|
||||||
|
/**
|
||||||
|
* Add a success message to the notifications
|
||||||
|
*/
|
||||||
success: (message: string) => void;
|
success: (message: string) => void;
|
||||||
|
/**
|
||||||
|
* Remove all notifications displayed on the page.
|
||||||
|
*/
|
||||||
clear: () => void;
|
clear: () => void;
|
||||||
|
/**
|
||||||
|
* Add multiple notifications at once.
|
||||||
|
* The added notifications can have different notification levels.
|
||||||
|
*/
|
||||||
addMany: (notifs: Notification[]) => void;
|
addMany: (notifs: Notification[]) => void;
|
||||||
|
/**
|
||||||
|
* Return all notifications displayed on the page.
|
||||||
|
*/
|
||||||
getAll: () => Notification[];
|
getAll: () => Notification[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user