From c37f4db2418a469608a80062a6d1baf7a0bde18a Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 24 Nov 2021 14:34:03 +0100 Subject: [PATCH] [plugin] Modifications on Plugin Notification * Add function called before Notification gets dismissed * Promises can have any type, we do not need to force void return type --- package.json | 4 ++-- types/plugin.d.ts | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 4087cff..2b927e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "license": "MIT", - "version": "1.0.0-alpha.5", + "version": "1.0.0-alpha.6", "name": "@flaschengeist/types", "author": "Ferdinand Thiessen ", "homepage": "https://flaschengeist.dev/", @@ -24,7 +24,7 @@ }, "devDependencies": { "prettier": "^2.4.1", - "typescript": "^4.4.4" + "typescript": "^4.5.2" }, "prettier": { "singleQuote": true, diff --git a/types/plugin.d.ts b/types/plugin.d.ts index e595f82..78d4cf3 100644 --- a/types/plugin.d.ts +++ b/types/plugin.d.ts @@ -62,10 +62,12 @@ export namespace FG_Plugin { * Interface for a frontend notification */ export interface Notification extends FG.Notification { - /** If set a button for accepting will be shown, this function will get called before deleting the notification */ - accept?(): Promise; - /** If set this function is called before the notification gets deleted */ - reject?(): Promise; + /** If set, a button for accepting will be shown, this function will get called before deleting the notification */ + accept?(): Promise; + /** If set, a reject button is shown and this function is called before the notification gets deleted */ + reject?(): Promise; + /** If set, this function is called before the notification gets deleted */ + dismiss?(): Promise; /** If set the notification text is interpreted as a link to this location */ link?: RouteLocationRaw; /** If set this icon is used */