Skip to content

Commit

Permalink
Merge pull request #94 from fbobbio/fix/typing-aot-errors
Browse files Browse the repository at this point in the history
fix: Types for AOT compile error
  • Loading branch information
flauc authored Nov 1, 2016
2 parents 0271b99 + 9f69980 commit 247350a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/notification.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export class NotificationComponent implements OnInit, OnDestroy {
return this.position !== 0 ? this.position * 90 : 0;
}

onClick($e): void {
onClick($e: any): void {
this.item.click.emit($e);

if (this.clickToClose) {
Expand Down
12 changes: 6 additions & 6 deletions src/push-notifications.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class PushNotificationsService {

requestPermission() {
if ('Notification' in window)
Notification.requestPermission(status => this.permission = status);
Notification.requestPermission((status: any) => this.permission = status);
}

isSupported() {
Expand All @@ -24,7 +24,7 @@ export class PushNotificationsService {

create(title: string, options?: PushNotification): any {

return new Observable(obs => {
return new Observable((obs: any) => {

if (!('Notification' in window)) {
obs.error('Notifications are not available in this envirement');
Expand All @@ -38,9 +38,9 @@ export class PushNotificationsService {

const n = new Notification(title, options);

n.onshow = (e) => obs.next({notification: n, event: e});
n.onclick = (e) => obs.next({notification: n, event: e});
n.onerror = (e) => obs.error({notification: n, event: e});
n.onshow = (e: any) => obs.next({notification: n, event: e});
n.onclick = (e: any) => obs.next({notification: n, event: e});
n.onerror = (e: any) => obs.error({notification: n, event: e});
n.onclose = () => obs.complete();
n.close = () => {
n.close.bind(n);
Expand All @@ -49,4 +49,4 @@ export class PushNotificationsService {
});
}

}
}

0 comments on commit 247350a

Please sign in to comment.