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 9ca8251

Browse filesBrowse files
TrottMylesBorins
authored andcommitted
doc,tty: use code markup/markdown in headers
Backport-PR-URL: #31108 PR-URL: #31086 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 86bcf6c commit 9ca8251
Copy full SHA for 9ca8251

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎doc/api/tty.md‎

Copy file name to clipboardExpand all lines: doc/api/tty.md
+17-17Lines changed: 17 additions & 17 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ In most cases, there should be little to no reason for an application to
3030
manually create instances of the `tty.ReadStream` and `tty.WriteStream`
3131
classes.
3232

33-
## Class: tty.ReadStream
33+
## Class: `tty.ReadStream`
3434
<!-- YAML
3535
added: v0.5.8
3636
-->
@@ -41,22 +41,22 @@ Represents the readable side of a TTY. In normal circumstances
4141
[`process.stdin`][] will be the only `tty.ReadStream` instance in a Node.js
4242
process and there should be no reason to create additional instances.
4343

44-
### readStream.isRaw
44+
### `readStream.isRaw`
4545
<!-- YAML
4646
added: v0.7.7
4747
-->
4848

4949
A `boolean` that is `true` if the TTY is currently configured to operate as a
5050
raw device. Defaults to `false`.
5151

52-
### readStream.isTTY
52+
### `readStream.isTTY`
5353
<!-- YAML
5454
added: v0.5.8
5555
-->
5656

5757
A `boolean` that is always `true` for `tty.ReadStream` instances.
5858

59-
### readStream.setRawMode(mode)
59+
### `readStream.setRawMode(mode)`
6060
<!-- YAML
6161
added: v0.7.7
6262
-->
@@ -74,7 +74,7 @@ including modifiers. Additionally, all special processing of characters by the
7474
terminal is disabled, including echoing input characters.
7575
`CTRL`+`C` will no longer cause a `SIGINT` when in this mode.
7676

77-
## Class: tty.WriteStream
77+
## Class: `tty.WriteStream`
7878
<!-- YAML
7979
added: v0.5.8
8080
-->
@@ -86,7 +86,7 @@ Represents the writable side of a TTY. In normal circumstances,
8686
`tty.WriteStream` instances created for a Node.js process and there
8787
should be no reason to create additional instances.
8888

89-
### Event: 'resize'
89+
### Event: `'resize'`
9090
<!-- YAML
9191
added: v0.7.7
9292
-->
@@ -102,7 +102,7 @@ process.stdout.on('resize', () => {
102102
});
103103
```
104104

105-
### writeStream.clearLine(dir\[, callback\])
105+
### `writeStream.clearLine(dir[, callback])`
106106
<!-- YAML
107107
added: v0.7.7
108108
changes:
@@ -123,7 +123,7 @@ changes:
123123
`writeStream.clearLine()` clears the current line of this `WriteStream` in a
124124
direction identified by `dir`.
125125

126-
### writeStream.clearScreenDown(\[callback\])
126+
### `writeStream.clearScreenDown([callback])`
127127
<!-- YAML
128128
added: v0.7.7
129129
changes:
@@ -140,15 +140,15 @@ changes:
140140
`writeStream.clearScreenDown()` clears this `WriteStream` from the current
141141
cursor down.
142142

143-
### writeStream.columns
143+
### `writeStream.columns`
144144
<!-- YAML
145145
added: v0.7.7
146146
-->
147147

148148
A `number` specifying the number of columns the TTY currently has. This property
149149
is updated whenever the `'resize'` event is emitted.
150150

151-
### writeStream.cursorTo(x\[, y\]\[, callback\])
151+
### `writeStream.cursorTo(x[, y][, callback])`
152152
<!-- YAML
153153
added: v0.7.7
154154
changes:
@@ -167,7 +167,7 @@ changes:
167167
`writeStream.cursorTo()` moves this `WriteStream`'s cursor to the specified
168168
position.
169169

170-
### writeStream.getColorDepth(\[env\])
170+
### `writeStream.getColorDepth([env])`
171171
<!-- YAML
172172
added: v9.9.0
173173
-->
@@ -202,7 +202,7 @@ To enforce a specific color support, use one of the below environment settings.
202202
Disabling color support is also possible by using the `NO_COLOR` and
203203
`NODE_DISABLE_COLORS` environment variables.
204204

205-
### writeStream.getWindowSize()
205+
### `writeStream.getWindowSize()`
206206
<!-- YAML
207207
added: v0.7.7
208208
-->
@@ -214,7 +214,7 @@ corresponding to this `WriteStream`. The array is of the type
214214
`[numColumns, numRows]` where `numColumns` and `numRows` represent the number
215215
of columns and rows in the corresponding [TTY](tty.html).
216216

217-
### writeStream.hasColors(\[count\]\[, env\])
217+
### `writeStream.hasColors([count][, env])`
218218
<!-- YAML
219219
added: v11.13.0
220220
-->
@@ -243,14 +243,14 @@ process.stdout.hasColors(2 ** 24, { TMUX: '1' });
243243
// Returns false (the environment setting pretends to support 2 ** 8 colors).
244244
```
245245

246-
### writeStream.isTTY
246+
### `writeStream.isTTY`
247247
<!-- YAML
248248
added: v0.5.8
249249
-->
250250

251251
A `boolean` that is always `true`.
252252

253-
### writeStream.moveCursor(dx, dy\[, callback\])
253+
### `writeStream.moveCursor(dx, dy[, callback])`
254254
<!-- YAML
255255
added: v0.7.7
256256
changes:
@@ -269,15 +269,15 @@ changes:
269269
`writeStream.moveCursor()` moves this `WriteStream`'s cursor *relative* to its
270270
current position.
271271

272-
### writeStream.rows
272+
### `writeStream.rows`
273273
<!-- YAML
274274
added: v0.7.7
275275
-->
276276

277277
A `number` specifying the number of rows the TTY currently has. This property
278278
is updated whenever the `'resize'` event is emitted.
279279

280-
## tty.isatty(fd)
280+
## `tty.isatty(fd)`
281281
<!-- YAML
282282
added: v0.5.8
283283
-->

0 commit comments

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