You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -67,11 +77,12 @@ function dispatchWailsEvent(event) {
67
77
/**
68
78
* Register a callback function to be called multiple times for a specific event.
69
79
*
80
+
* @template [D=unknown]
70
81
* @param {string} eventName - The name of the event to register the callback for.
71
-
* @param {function} callback - The callback function to be called when the event is triggered.
82
+
* @param {WailsEventCallback<D>} callback - The callback function to be called when the event is triggered.
72
83
* @param {number} maxCallbacks - The maximum number of times the callback can be called for the event. Once the maximum number is reached, the callback will no longer be called.
73
84
*
74
-
@return {function} - A function that, when called, will unregister the callback from the event.
85
+
@return {() => void} - A function that, when called, will unregister the callback from the event.
Copy file name to clipboardExpand all lines: v3/internal/runtime/desktop/@wailsio/runtime/types/events.d.ts
+24-13Lines changed: 24 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -2,28 +2,31 @@ export function setup(): void;
2
2
/**
3
3
* Register a callback function to be called multiple times for a specific event.
4
4
*
5
+
* @template [D=unknown]
5
6
* @param {string} eventName - The name of the event to register the callback for.
6
-
* @param {function} callback - The callback function to be called when the event is triggered.
7
+
* @param {WailsEventCallback<D>} callback - The callback function to be called when the event is triggered.
7
8
* @param {number} maxCallbacks - The maximum number of times the callback can be called for the event. Once the maximum number is reached, the callback will no longer be called.
8
9
*
9
-
@return {function} - A function that, when called, will unregister the callback from the event.
10
+
@return {() => void} - A function that, when called, will unregister the callback from the event.
0 commit comments