Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b52024f

Browse files
committedJun 4, 2020
Use a different function type for the Event template.
1 parent 80cb3ac commit b52024f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎Source/Core/Event.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import defined from "./defined.js";
77
* exposed as a property for others to subscribe to.
88
*
99
* @alias Event
10-
* @template Listener extends Function = Function
10+
* @template Listener extends (...args: any[]) => any = (...args: any[]) => any
1111
* @constructor
1212
* @example
1313
* MyObject.prototype.myListener = function(arg1, arg2) {
@@ -120,7 +120,7 @@ function compareNumber(a, b) {
120120
/**
121121
* Raises the event by calling each registered listener with all supplied arguments.
122122
*
123-
* @param {...Object} arguments This method takes any number of parameters and passes them through to the listener functions.
123+
* @param {...Parameters<Listener>} arguments This method takes any number of parameters and passes them through to the listener functions.
124124
*
125125
* @see Event#addEventListener
126126
* @see Event#removeEventListener

0 commit comments

Comments
 (0)
Please sign in to comment.