diff --git a/src/client/rize/adapter/NotificationService.ts b/src/client/rize/adapter/NotificationService.ts index 2a786013..7777a0aa 100644 --- a/src/client/rize/adapter/NotificationService.ts +++ b/src/client/rize/adapter/NotificationService.ts @@ -80,15 +80,15 @@ function requestPermittion(): Rx.Observable { } function showNotification(topic: NotifedTopic): Rx.Observable { - let notification: Notification = new (window as any).Notification(topic.title, { + let notification: Notification | void = new (window as any).Notification(topic.title, { body: topic.body, icon: topic.icon, }); const timeout = Rx.Observable.empty().delay(5 * 1000); - const click = Rx.Observable.fromEvent(notification, 'click').take(1); + const click = Rx.Observable.fromEvent(notification!, 'click').take(1); const close: Rx.Observable = click.race(timeout).do(function(){ notification.close(); - notification = null; + notification = undefined; }); return close.share(); } \ No newline at end of file diff --git a/src/client/rize/rize.ts b/src/client/rize/rize.ts index 5cd6bc55..aee4f23a 100644 --- a/src/client/rize/rize.ts +++ b/src/client/rize/rize.ts @@ -50,7 +50,7 @@ export class RizeClient { console.log(data.value); }); - const view = React.createElement(RizeAppView, null); + const view = React.createElement(RizeAppView, undefined); const mountpoint = document.getElementById('js-mountpoint-app'); ReactDOM.render(view, mountpoint); }