From 4aeebe5ad4d98e19885647f1f50ed94d3868321c Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Sat, 4 Jul 2020 10:52:24 +0200 Subject: [PATCH] :recycle: (notification) --- src/utils/notification.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/utils/notification.ts b/src/utils/notification.ts index cf17bbc..705d55c 100644 --- a/src/utils/notification.ts +++ b/src/utils/notification.ts @@ -1,12 +1,13 @@ declare const Notification: any -let showNotification: - | ((title: string, options?: NotificationOptions) => Promise) - | null = null +type ShowNotification = ( + title: string, + options?: NotificationOptions +) => Promise -export const setNotificationInstance = ( - sn: (title: string, options?: NotificationOptions) => Promise -) => { +let showNotification: ShowNotification | null = null + +export const setNotificationInstance = (sn: ShowNotification) => { showNotification = sn }