summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamat, Trivikram <16024985+trivikr@users.noreply.github.com>2019-08-23 22:02:23 -0700
committerTrivikram Kamat <16024985+trivikr@users.noreply.github.com>2019-09-01 08:18:10 -0700
commit89aea1514b3b44d4b60c6c556aa70e9ffed46391 (patch)
tree53ac24a4a4dae3b14e04a94043bbfe03dab85317
parent9ab1e07774b0c38a66e29f4b0b257ded8ee04d08 (diff)
downloadandroid-node-v8-89aea1514b3b44d4b60c6c556aa70e9ffed46391.tar.gz
android-node-v8-89aea1514b3b44d4b60c6c556aa70e9ffed46391.tar.bz2
android-node-v8-89aea1514b3b44d4b60c6c556aa70e9ffed46391.zip
doc: add extends for derived classes
PR-URL: https://github.com/nodejs/node/pull/29290 Reviewed-By: James M Snell <jasnell@gmail.com>
-rw-r--r--doc/api/child_process.md5
-rw-r--r--doc/api/cluster.md2
-rw-r--r--doc/api/dgram.md6
-rw-r--r--doc/api/domain.md6
-rw-r--r--doc/api/inspector.md5
-rw-r--r--doc/api/net.md10
-rw-r--r--doc/api/readline.md2
-rw-r--r--doc/api/repl.md4
-rw-r--r--doc/api/tty.md20
9 files changed, 34 insertions, 26 deletions
diff --git a/doc/api/child_process.md b/doc/api/child_process.md
index 412092d7d1..8348cad4ae 100644
--- a/doc/api/child_process.md
+++ b/doc/api/child_process.md
@@ -895,8 +895,9 @@ arbitrary command execution.**
added: v2.2.0
-->
-Instances of the `ChildProcess` class are [`EventEmitters`][`EventEmitter`] that
-represent spawned child processes.
+* Extends: {EventEmitter}
+
+Instances of the `ChildProcess` represent spawned child processes.
Instances of `ChildProcess` are not intended to be created directly. Rather,
use the [`child_process.spawn()`][], [`child_process.exec()`][],
diff --git a/doc/api/cluster.md b/doc/api/cluster.md
index 8036f82e79..fb7328aa4d 100644
--- a/doc/api/cluster.md
+++ b/doc/api/cluster.md
@@ -116,6 +116,8 @@ also be used for other use cases requiring worker processes.
added: v0.7.0
-->
+* Extends: {EventEmitter}
+
A `Worker` object contains all public information and method about a worker.
In the master it can be obtained using `cluster.workers`. In a worker
it can be obtained using `cluster.worker`.
diff --git a/doc/api/dgram.md b/doc/api/dgram.md
index dfd9c4d2ea..f4ae367527 100644
--- a/doc/api/dgram.md
+++ b/doc/api/dgram.md
@@ -35,8 +35,9 @@ server.bind(41234);
added: v0.1.99
-->
-The `dgram.Socket` object is an [`EventEmitter`][] that encapsulates the
-datagram functionality.
+* Extends: {EventEmitter}
+
+Encapsulates the datagram functionality.
New instances of `dgram.Socket` are created using [`dgram.createSocket()`][].
The `new` keyword is not to be used to create `dgram.Socket` instances.
@@ -720,7 +721,6 @@ and `udp6` sockets). The bound address and port can be retrieved using
[`Error`]: errors.html#errors_class_error
[`ERR_SOCKET_DGRAM_IS_CONNECTED`]: errors.html#errors_err_socket_dgram_is_connected
[`ERR_SOCKET_DGRAM_NOT_CONNECTED`]: errors.html#errors_err_socket_dgram_not_connected
-[`EventEmitter`]: events.html
[`System Error`]: errors.html#errors_class_systemerror
[`close()`]: #dgram_socket_close_callback
[`cluster`]: cluster.html
diff --git a/doc/api/domain.md b/doc/api/domain.md
index 803fc2b830..4aae68cf40 100644
--- a/doc/api/domain.md
+++ b/doc/api/domain.md
@@ -273,11 +273,12 @@ serverDomain.run(() => {
## Class: Domain
+* Extends: {EventEmitter}
+
The `Domain` class encapsulates the functionality of routing errors and
uncaught exceptions to the active `Domain` object.
-`Domain` is a child class of [`EventEmitter`][]. To handle the errors that it
-catches, listen to its `'error'` event.
+To handle the errors that it catches, listen to its `'error'` event.
### domain.members
@@ -475,7 +476,6 @@ Promises. In other words, no `'error'` event will be emitted for unhandled
`Promise` rejections.
[`Error`]: errors.html#errors_class_error
-[`EventEmitter`]: events.html#events_class_eventemitter
[`domain.add(emitter)`]: #domain_domain_add_emitter
[`domain.bind(callback)`]: #domain_domain_bind_callback
[`domain.exit()`]: #domain_domain_exit
diff --git a/doc/api/inspector.md b/doc/api/inspector.md
index f25d6209c1..f82c53f5bc 100644
--- a/doc/api/inspector.md
+++ b/doc/api/inspector.md
@@ -64,6 +64,8 @@ An exception will be thrown if there is no active inspector.
## Class: inspector.Session
+* Extends: {EventEmitter}
+
The `inspector.Session` is used for dispatching messages to the V8 inspector
back-end and receiving message responses and notifications.
@@ -76,8 +78,6 @@ Create a new instance of the `inspector.Session` class. The inspector session
needs to be connected through [`session.connect()`][] before the messages
can be dispatched to the inspector backend.
-`inspector.Session` is an [`EventEmitter`][] with the following events:
-
### Event: 'inspectorNotification'
<!-- YAML
added: v8.0.0
@@ -217,7 +217,6 @@ session.post('HeapProfiler.takeHeapSnapshot', null, (err, r) => {
```
[`'Debugger.paused'`]: https://chromedevtools.github.io/devtools-protocol/v8/Debugger#event-paused
-[`EventEmitter`]: events.html#events_class_eventemitter
[`session.connect()`]: #inspector_session_connect
[CPU Profiler]: https://chromedevtools.github.io/devtools-protocol/v8/Profiler
[Chrome DevTools Protocol Viewer]: https://chromedevtools.github.io/devtools-protocol/v8/
diff --git a/doc/api/net.md b/doc/api/net.md
index a396edf31a..21614411f5 100644
--- a/doc/api/net.md
+++ b/doc/api/net.md
@@ -60,6 +60,8 @@ net.createServer().listen(
added: v0.1.90
-->
+* Extends: {EventEmitter}
+
This class is used to create a TCP or [IPC][] server.
### new net.Server([options][, connectionListener])
@@ -384,10 +386,11 @@ active server in the event system. If the server is already `unref`ed calling
added: v0.3.4
-->
+* Extends: {stream.Duplex}
+
This class is an abstraction of a TCP socket or a streaming [IPC][] endpoint
-(uses named pipes on Windows, and Unix domain sockets otherwise). A
-`net.Socket` is also a [duplex stream][], so it can be both readable and
-writable, and it is also an [`EventEmitter`][].
+(uses named pipes on Windows, and Unix domain sockets otherwise). It is also
+an [`EventEmitter`][].
A `net.Socket` can be created by the user and used directly to interact with
a server. For example, it is returned by [`net.createConnection()`][],
@@ -1234,7 +1237,6 @@ Returns `true` if input is a version 6 IP address, otherwise returns `false`.
[IPC]: #net_ipc_support
[Identifying paths for IPC connections]: #net_identifying_paths_for_ipc_connections
[Readable Stream]: stream.html#stream_class_stream_readable
-[duplex stream]: stream.html#stream_class_stream_duplex
[half-closed]: https://tools.ietf.org/html/rfc1122
[stream_writable_write]: stream.html#stream_writable_write_chunk_encoding_callback
[unspecified IPv4 address]: https://en.wikipedia.org/wiki/0.0.0.0
diff --git a/doc/api/readline.md b/doc/api/readline.md
index 43d3a7e8f6..898d7e005f 100644
--- a/doc/api/readline.md
+++ b/doc/api/readline.md
@@ -38,6 +38,8 @@ received on the `input` stream.
added: v0.1.104
-->
+* Extends: {EventEmitter}
+
Instances of the `readline.Interface` class are constructed using the
`readline.createInterface()` method. Every instance is associated with a
single `input` [Readable][] stream and a single `output` [Writable][] stream.
diff --git a/doc/api/repl.md b/doc/api/repl.md
index 193e82240b..1edee77b09 100644
--- a/doc/api/repl.md
+++ b/doc/api/repl.md
@@ -333,7 +333,8 @@ function myWriter(output) {
added: v0.1.91
-->
-The `repl.REPLServer` class inherits from the [`readline.Interface`][] class.
+* Extends: {readline.Interface}
+
Instances of `repl.REPLServer` are created using the `repl.start()` method and
*should not* be created directly using the JavaScript `new` keyword.
@@ -696,7 +697,6 @@ For an example of running a REPL instance over [curl(1)][], see:
[`domain`]: domain.html
[`process.setUncaughtExceptionCaptureCallback()`]: process.html#process_process_setuncaughtexceptioncapturecallback_fn
[`readline.InterfaceCompleter`]: readline.html#readline_use_of_the_completer_function
-[`readline.Interface`]: readline.html#readline_class_interface
[`repl.ReplServer`]: #repl_class_replserver
[`util.inspect()`]: util.html#util_util_inspect_object_options
[curl(1)]: https://curl.haxx.se/docs/manpage.html
diff --git a/doc/api/tty.md b/doc/api/tty.md
index 335aef7589..7111f2d228 100644
--- a/doc/api/tty.md
+++ b/doc/api/tty.md
@@ -35,10 +35,11 @@ classes.
added: v0.5.8
-->
-The `tty.ReadStream` class is a subclass of [`net.Socket`][] that represents the
-readable side of a TTY. In normal circumstances [`process.stdin`][] will be the
-only `tty.ReadStream` instance in a Node.js process and there should be no
-reason to create additional instances.
+* Extends: {net.Socket}
+
+Represents the readable side of a TTY. In normal circumstances
+[`process.stdin`][] will be the only `tty.ReadStream` instance in a Node.js
+process and there should be no reason to create additional instances.
### readStream.isRaw
<!-- YAML
@@ -78,10 +79,12 @@ terminal is disabled, including echoing input characters.
added: v0.5.8
-->
-The `tty.WriteStream` class is a subclass of [`net.Socket`][] that represents
-the writable side of a TTY. In normal circumstances, [`process.stdout`][] and
-[`process.stderr`][] will be the only `tty.WriteStream` instances created for a
-Node.js process and there should be no reason to create additional instances.
+* Extends: {net.Socket}
+
+Represents the writable side of a TTY. In normal circumstances,
+[`process.stdout`][] and [`process.stderr`][] will be the only
+`tty.WriteStream` instances created for a Node.js process and there
+should be no reason to create additional instances.
### Event: 'resize'
<!-- YAML
@@ -284,7 +287,6 @@ The `tty.isatty()` method returns `true` if the given `fd` is associated with
a TTY and `false` if it is not, including whenever `fd` is not a non-negative
integer.
-[`net.Socket`]: net.html#net_class_net_socket
[`process.stderr`]: process.html#process_process_stderr
[`process.stdin`]: process.html#process_process_stdin
[`process.stdout`]: process.html#process_process_stdout