@@ -65,9 +65,9 @@ export class NotifierContainerComponent implements OnDestroy, OnInit {
65
65
/**
66
66
* Constructor
67
67
*
68
- * @param { ChangeDetectorRef } changeDetector Change detector, used for manually triggering change detection runs
69
- * @param { NotifierQueueService } notifierQueueService Notifier queue service
70
- * @param { NotifierService } notifierService Notifier service
68
+ * @param changeDetector Change detector, used for manually triggering change detection runs
69
+ * @param notifierQueueService Notifier queue service
70
+ * @param notifierService Notifier service
71
71
*/
72
72
public constructor ( changeDetector : ChangeDetectorRef , notifierQueueService : NotifierQueueService , notifierService : NotifierService ) {
73
73
this . changeDetector = changeDetector ;
@@ -99,9 +99,9 @@ export class NotifierContainerComponent implements OnDestroy, OnInit {
99
99
/**
100
100
* Notification identifier, used as the ngFor trackby function
101
101
*
102
- * @param { number } index Index
103
- * @param { NotifierNotification } notification Notifier notification
104
- * @returns { string } Notification ID as the unique identnfier
102
+ * @param index Index
103
+ * @param notification Notifier notification
104
+ * @returns Notification ID as the unique identnfier
105
105
*/
106
106
public identifyNotification ( index : number , notification : NotifierNotification ) : string {
107
107
return notification . id ;
@@ -110,7 +110,7 @@ export class NotifierContainerComponent implements OnDestroy, OnInit {
110
110
/**
111
111
* Event handler, handles clicks on notification dismiss buttons
112
112
*
113
- * @param { string } notificationId ID of the notification to dismiss
113
+ * @param notificationId ID of the notification to dismiss
114
114
*/
115
115
public onNotificationDismiss ( notificationId : string ) : void {
116
116
this . queueService . push ( {
@@ -122,7 +122,7 @@ export class NotifierContainerComponent implements OnDestroy, OnInit {
122
122
/**
123
123
* Event handler, handles notification ready events
124
124
*
125
- * @param { NotifierNotificationComponent } notificationComponent Notification component reference
125
+ * @param notificationComponent Notification component reference
126
126
*/
127
127
public onNotificationReady ( notificationComponent : NotifierNotificationComponent ) : void {
128
128
let currentNotification : NotifierNotification = this . notifications [ this . notifications . length - 1 ] ; // Get the latest notification
@@ -133,8 +133,8 @@ export class NotifierContainerComponent implements OnDestroy, OnInit {
133
133
/**
134
134
* Handle incoming actions by mapping action types to methods, and then running them
135
135
*
136
- * @param { NotifierAction } action Action object
137
- * @returns { Promise<undefined> } Promise, resolved when done
136
+ * @param action Action object
137
+ * @returns Promise, resolved when done
138
138
*/
139
139
private handleAction ( action : NotifierAction ) : Promise < undefined > {
140
140
switch ( action . type ) { // TODO: Maybe a map (actionType -> class method) is a cleaner solution here?
@@ -160,8 +160,8 @@ export class NotifierContainerComponent implements OnDestroy, OnInit {
160
160
*
161
161
* We simply add the notification to the list, and then wait until its properly initialized / created / rendered.
162
162
*
163
- * @param { NotifierAction } action Action object
164
- * @returns { Promise<undefined> } Promise, resolved when done
163
+ * @param action Action object
164
+ * @returns Promise, resolved when done
165
165
*/
166
166
private handleShowAction ( action : NotifierAction ) : Promise < undefined > {
167
167
return new Promise < undefined > ( ( resolve : ( ) => void , reject : ( ) => void ) => {
@@ -178,7 +178,7 @@ export class NotifierContainerComponent implements OnDestroy, OnInit {
178
178
* shift all older notifications, and then show our new notification. In addition, if there are too many notification on the screen,
179
179
* we hide the oldest one first. Furthermore, if configured, animation overlapping is applied.
180
180
*
181
- * @param { NotifierNotification } notification New notification to show
181
+ * @param notification New notification to show
182
182
*/
183
183
private continueHandleShowAction ( notification : NotifierNotification ) : void {
184
184
@@ -281,8 +281,8 @@ export class NotifierContainerComponent implements OnDestroy, OnInit {
281
281
* notification. If there exist older notifications, we then shift them around to fill the gap. Once both hiding the given notification
282
282
* and shifting the older notificaitons is done, the given notification gets finally removed (from the DOM).
283
283
*
284
- * @param { NotifierAction } action Action object, payload contains the notification ID
285
- * @returns { Promise<undefined> } Promise, resolved when done
284
+ * @param action Action object, payload contains the notification ID
285
+ * @returns Promise, resolved when done
286
286
*/
287
287
private handleHideAction ( action : NotifierAction ) : Promise < undefined > {
288
288
return new Promise < undefined > ( ( resolve : ( ) => void , reject : ( ) => void ) => {
@@ -345,8 +345,8 @@ export class NotifierContainerComponent implements OnDestroy, OnInit {
345
345
/**
346
346
* Hide the oldest notification (bridge to handleHideAction)
347
347
*
348
- * @param { NotifierAction } action Action object
349
- * @returns { Promise<undefined> } Promise, resolved when done
348
+ * @param action Action object
349
+ * @returns Promise, resolved when done
350
350
*/
351
351
private handleHideOldestAction ( action : NotifierAction ) : Promise < undefined > {
352
352
@@ -365,8 +365,8 @@ export class NotifierContainerComponent implements OnDestroy, OnInit {
365
365
/**
366
366
* Hide the newest notification (bridge to handleHideAction)
367
367
*
368
- * @param { NotifierAction } action Action object
369
- * @returns { Promise<undefined> } Promise, resolved when done
368
+ * @param action Action object
369
+ * @returns Promise, resolved when done
370
370
*/
371
371
private handleHideNewestAction ( action : NotifierAction ) : Promise < undefined > {
372
372
@@ -385,8 +385,8 @@ export class NotifierContainerComponent implements OnDestroy, OnInit {
385
385
/**
386
386
* Hide all notifications at once
387
387
*
388
- * @param { NotifierAction } action Action object
389
- * @returns { Promise<undefined> } Promise, resolved when done
388
+ * @param action Action object
389
+ * @returns Promise, resolved when done
390
390
*/
391
391
private handleHideAllAction ( action : NotifierAction ) : Promise < undefined > {
392
392
return new Promise < undefined > ( ( resolve : ( ) => void , reject : ( ) => void ) => {
@@ -437,10 +437,10 @@ export class NotifierContainerComponent implements OnDestroy, OnInit {
437
437
/**
438
438
* Shift multiple notifications at once
439
439
*
440
- * @param { Array<NotifierNotification> } notifications List containing the notifications to be shifted
441
- * @param { number } distance Distance to shift (in px)
442
- * @param { boolean } toMakePlace Flag, defining in which direciton to shift
443
- * @returns { Promise<undefined> } Promise, resolved when done
440
+ * @param notifications List containing the notifications to be shifted
441
+ * @param distance Distance to shift (in px)
442
+ * @param toMakePlace Flag, defining in which direciton to shift
443
+ * @returns Promise, resolved when done
444
444
*/
445
445
private shiftNotifications ( notifications : Array < NotifierNotification > , distance : number , toMakePlace : boolean ) : Promise < undefined > {
446
446
return new Promise < undefined > ( ( resolve : ( ) => void , reject : ( ) => void ) => {
@@ -463,7 +463,7 @@ export class NotifierContainerComponent implements OnDestroy, OnInit {
463
463
/**
464
464
* Add a new notification to the list of notifications (triggers change detection)
465
465
*
466
- * @param { NotifierNotification } notification Notification to add to the list of notifications
466
+ * @param notification Notification to add to the list of notifications
467
467
*/
468
468
private addNotificationToList ( notification : NotifierNotification ) : void {
469
469
this . notifications . push ( notification ) ;
@@ -473,7 +473,7 @@ export class NotifierContainerComponent implements OnDestroy, OnInit {
473
473
/**
474
474
* Remove an existing notification from the list of notifications (triggers change detection)
475
475
*
476
- * @param { NotifierNotification } notification Notification to be removed from the list of notifications
476
+ * @param notification Notification to be removed from the list of notifications
477
477
*/
478
478
private removeNotificationFromList ( notification : NotifierNotification ) : void {
479
479
this . notifications =
@@ -492,8 +492,8 @@ export class NotifierContainerComponent implements OnDestroy, OnInit {
492
492
/**
493
493
* Helper: Find a notification in the notification list by a given notification ID
494
494
*
495
- * @param { string } notificationId Notification ID, used for finding notification
496
- * @returns { NotifierNotification | undefined } Notification, undefined if not found
495
+ * @param notificationId Notification ID, used for finding notification
496
+ * @returns Notification, undefined if not found
497
497
*/
498
498
private findNotificationById ( notificationId : string ) : NotifierNotification | undefined {
499
499
return this . notifications . find ( ( currentNotification : NotifierNotification ) => currentNotification . id === notificationId ) ;
@@ -502,8 +502,8 @@ export class NotifierContainerComponent implements OnDestroy, OnInit {
502
502
/**
503
503
* Helper: Find a notification's index by a given notification ID
504
504
*
505
- * @param { string } notificationId Notification ID, used for finding a notification's index
506
- * @returns { number | undefined } Notification index, undefined if not found
505
+ * @param notificationId Notification ID, used for finding a notification's index
506
+ * @returns Notification index, undefined if not found
507
507
*/
508
508
private findNotificationIndexById ( notificationId : string ) : number | undefined {
509
509
const notificationIndex : number =
0 commit comments