♻️ (notification)

This commit is contained in:
2020-07-04 10:52:24 +02:00
parent fe674c73df
commit 4aeebe5ad4

View File

@@ -1,12 +1,13 @@
declare const Notification: any
let showNotification:
| ((title: string, options?: NotificationOptions) => Promise<void>)
| null = null
type ShowNotification = (
title: string,
options?: NotificationOptions
) => Promise<void>
export const setNotificationInstance = (
sn: (title: string, options?: NotificationOptions) => Promise<void>
) => {
let showNotification: ShowNotification | null = null
export const setNotificationInstance = (sn: ShowNotification) => {
showNotification = sn
}