♻️ (notification) typing
This commit is contained in:
@@ -1,28 +1,19 @@
|
|||||||
declare const Notification: any
|
declare const Notification: any
|
||||||
|
|
||||||
let showNotification:
|
let showNotification:
|
||||||
| ((
|
| ((title: string, options?: NotificationOptions) => Promise<void>)
|
||||||
title: string,
|
|
||||||
options?: NotificationOptions | undefined
|
|
||||||
) => Promise<void>)
|
|
||||||
| null = null
|
| null = null
|
||||||
|
|
||||||
export const setNotificationInstance = (
|
export const setNotificationInstance = (
|
||||||
sn: (
|
sn: (title: string, options?: NotificationOptions) => Promise<void>
|
||||||
title: string,
|
|
||||||
options?: NotificationOptions | undefined
|
|
||||||
) => Promise<void>
|
|
||||||
) => {
|
) => {
|
||||||
showNotification = sn
|
showNotification = sn
|
||||||
}
|
}
|
||||||
|
|
||||||
export const notify = (
|
export const notify = (title: string, options?: NotificationOptions) => {
|
||||||
title: string,
|
|
||||||
options?: NotificationOptions | undefined
|
|
||||||
) => {
|
|
||||||
const showCustomNotification = (
|
const showCustomNotification = (
|
||||||
title: string,
|
title: string,
|
||||||
options?: NotificationOptions | undefined
|
options?: NotificationOptions
|
||||||
) => {
|
) => {
|
||||||
if (!showNotification) {
|
if (!showNotification) {
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user