Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fb89be6

Browse filesBrowse files
Trottruyadorno
authored andcommitted
doc: use correct Error type for EventEmitter.defaultMaxListener
If a bad value is assigned to EventEmitter.defaultMaxListener, a RangeError is thrown and not a TypeError. Update documentation to reflect this. PR-URL: #35069 Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 8bbf92a commit fb89be6
Copy full SHA for fb89be6

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎doc/api/events.md‎

Copy file name to clipboardExpand all lines: doc/api/events.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ By default, a maximum of `10` listeners can be registered for any single
333333
event. This limit can be changed for individual `EventEmitter` instances
334334
using the [`emitter.setMaxListeners(n)`][] method. To change the default
335335
for *all* `EventEmitter` instances, the `EventEmitter.defaultMaxListeners`
336-
property can be used. If this value is not a positive number, a `TypeError`
336+
property can be used. If this value is not a positive number, a `RangeError`
337337
is thrown.
338338

339339
Take caution when setting the `EventEmitter.defaultMaxListeners` because the

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.