Skip to content

Commit 099afee

Browse files
Fix TypeScript 2.0 type checking issues
1 parent 545e1f9 commit 099afee

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/notification.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ export class NotificationComponent implements OnInit, OnDestroy {
236236
return this.position !== 0 ? this.position * 90 : 0;
237237
}
238238

239-
onClick($e: any): void {
240-
this.item.click.emit($e);
239+
onClick($e: MouseEvent): void {
240+
this.item.click!.emit($e);
241241

242242
if (this.clickToClose) {
243243
this.remove();

src/notifications.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class NotificationsService {
5555

5656
// HTML Notification method
5757
html(html: any, type: string, override?: any) {
58-
return this.set({html: html, type: type, icon: 'bare', override: override, title: null, content: null}, true);
58+
return this.set({html: html, type: type, icon: 'bare', override: override}, true);
5959
}
6060

6161
// Remove all notifications method
@@ -64,4 +64,4 @@ export class NotificationsService {
6464
else this.emitter.next({command: 'cleanAll'});
6565
}
6666

67-
}
67+
}

src/simple-notifications.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ export class SimpleNotificationsComponent implements OnInit, OnDestroy {
9090
break;
9191

9292
case 'clean':
93-
this.cleanSingle(item.id);
93+
this.cleanSingle(item.id!);
9494
break;
9595

9696
case 'set':
97-
if (item.add) this.add(item.notification);
97+
if (item.add) this.add(item.notification!);
9898
else this.defaultBehavior(item);
9999
break;
100100

0 commit comments

Comments
 (0)