Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
doc: make events Extends usage consistent
The docs use `* Extends: {type}` to define inheritance. This
commit updates the events documentation to be consistent.

PR-URL: #33777
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
cjihrig committed Jun 9, 2020
commit 2e49010bc8f2d05f6b0eca66bd9fca08cb5745a5
4 changes: 3 additions & 1 deletion doc/api/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -1277,11 +1277,13 @@ added: REPLACEME

Removes the `listener` from the list of handlers for event `type`.

### Class: `NodeEventTarget extends EventTarget`
### Class: `NodeEventTarget`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The addition of the * Extends: line below is good, but to be honest I'd much prefer if we started adding the extends ... in the header line also as a best practice to make the extension more visible.

<!-- YAML
added: REPLACEME
-->

* Extends: {EventTarget}

The `NodeEventTarget` is a Node.js-specific extension to `EventTarget`
that emulates a subset of the `EventEmitter` API.

Expand Down
2 changes: 1 addition & 1 deletion tools/doc/type-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const customTypesMap = {
'net.Socket': 'net.html#net_class_net_socket',

'NodeEventTarget':
'events.html#events_class_nodeeventtarget_extends_eventtarget',
'events.html#events_class_nodeeventtarget',

'os.constants.dlopen': 'os.html#os_dlopen_constants',

Expand Down