@etsoo/notificationbase 1.0.99 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,12 +67,12 @@ export interface NotifictionRenderSetup {
67
67
  }
68
68
  /**
69
69
  * On return callback
70
- * Undefined value means cancel
70
+ * T = string | undefined, Undefined value means cancel
71
71
  * return false will prevent default action
72
72
  * return string is the error message to show
73
73
  */
74
74
  export interface NotificationReturn<T> {
75
- (value?: T): boolean | string | void | PromiseLike<boolean | string | void>;
75
+ (value: T): boolean | string | void | PromiseLike<boolean | string | void>;
76
76
  }
77
77
  /**
78
78
  * Notification message parameters
@@ -95,7 +95,7 @@ export interface INotifier<UI, C extends NotificationCallProps> {
95
95
  * @param title Title
96
96
  * @param props More properties
97
97
  */
98
- prompt<T = string>(message: NotificationContent<UI>, callback: NotificationReturn<T>, title?: NotificationContent<UI>, props?: C): INotification<UI, C>;
98
+ prompt<T = string | undefined>(message: NotificationContent<UI>, callback: NotificationReturn<T>, title?: NotificationContent<UI>, props?: C): INotification<UI, C>;
99
99
  /**
100
100
  * Show loading
101
101
  * @param title Title
@@ -218,7 +218,7 @@ export declare abstract class NotificationContainer<UI, C extends NotificationCa
218
218
  * @param title Title
219
219
  * @param props More properties
220
220
  */
221
- prompt<T>(message: NotificationContent<UI>, callback: NotificationReturn<T>, title?: string, props?: C): INotification<UI, C>;
221
+ prompt<T = string | undefined>(message: NotificationContent<UI>, callback: NotificationReturn<T>, title?: string, props?: C): INotification<UI, C>;
222
222
  /**
223
223
  * Show loading
224
224
  * @param title Title
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/notificationbase",
3
- "version": "1.0.99",
3
+ "version": "1.1.0",
4
4
  "description": "TypeScript notification component for extending with all features described and partially implemented",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -71,12 +71,12 @@ export interface NotifictionRenderSetup {
71
71
 
72
72
  /**
73
73
  * On return callback
74
- * Undefined value means cancel
74
+ * T = string | undefined, Undefined value means cancel
75
75
  * return false will prevent default action
76
76
  * return string is the error message to show
77
77
  */
78
78
  export interface NotificationReturn<T> {
79
- (value?: T): boolean | string | void | PromiseLike<boolean | string | void>;
79
+ (value: T): boolean | string | void | PromiseLike<boolean | string | void>;
80
80
  }
81
81
 
82
82
  /**
@@ -138,7 +138,7 @@ export interface INotifier<UI, C extends NotificationCallProps> {
138
138
  * @param title Title
139
139
  * @param props More properties
140
140
  */
141
- prompt<T = string>(
141
+ prompt<T = string | undefined>(
142
142
  message: NotificationContent<UI>,
143
143
  callback: NotificationReturn<T>,
144
144
  title?: NotificationContent<UI>,
@@ -455,7 +455,7 @@ export abstract class NotificationContainer<UI, C extends NotificationCallProps>
455
455
  * @param title Title
456
456
  * @param props More properties
457
457
  */
458
- prompt<T>(
458
+ prompt<T = string | undefined>(
459
459
  message: NotificationContent<UI>,
460
460
  callback: NotificationReturn<T>,
461
461
  title?: string,