Improve typing of CallbackList#forEach
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 30 Oct 2020 08:50:11 +0000 (09:50 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 30 Oct 2020 09:50:36 +0000 (10:50 +0100)
wcfsetup/install/files/ts/WoltLabSuite/Core/CallbackList.ts

index 9061183a5e49ee2a8cb17f7ef2d271372fb87cb7..988d2b8242d13969af2b89f5e5cdabd4f617fa1f 100644 (file)
@@ -36,7 +36,7 @@ class CallbackList {
   /**
    * Invokes callback function on each registered callback.
    */
-  forEach(identifier: string | null, callback: Callback): void {
+  forEach(identifier: string | null, callback: (cb: Callback) => unknown): void {
     if (identifier === null) {
       this._callbacks.forEach((callbacks, identifier) => {
         callbacks.forEach(callback);