Skip to content

Commit 3c8f19f

Browse files
TrottMyles Borins
authored and
Myles Borins
committed
doc: add added: in for tty
Refs: #6578 PR-URL: #6783 Reviewed-By: James M Snell <[email protected]>
1 parent 5b50b1c commit 3c8f19f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

doc/api/tty.md

+24
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,44 @@ false
1818
```
1919

2020
## Class: ReadStream
21+
<!-- YAML
22+
added: v0.5.8
23+
-->
2124

2225
A `net.Socket` subclass that represents the readable portion of a tty. In normal
2326
circumstances, `process.stdin` will be the only `tty.ReadStream` instance in any
2427
Node.js program (only when `isatty(0)` is true).
2528

2629
### rs.isRaw
30+
<!-- YAML
31+
added: v0.7.7
32+
-->
2733

2834
A `Boolean` that is initialized to `false`. It represents the current "raw" state
2935
of the `tty.ReadStream` instance.
3036

3137
### rs.setRawMode(mode)
38+
<!-- YAML
39+
added: v0.7.7
40+
-->
3241

3342
`mode` should be `true` or `false`. This sets the properties of the
3443
`tty.ReadStream` to act either as a raw device or default. `isRaw` will be set
3544
to the resulting mode.
3645

3746
## Class: WriteStream
47+
<!-- YAML
48+
added: v0.5.8
49+
-->
3850

3951
A `net.Socket` subclass that represents the writable portion of a tty. In normal
4052
circumstances, `process.stdout` will be the only `tty.WriteStream` instance
4153
ever created (and only when `isatty(1)` is true).
4254

4355
### Event: 'resize'
56+
<!-- YAML
57+
added: v0.7.7
58+
-->
4459

4560
`function () {}`
4661

@@ -55,16 +70,25 @@ process.stdout.on('resize', () => {
5570
```
5671

5772
### ws.columns
73+
<!-- YAML
74+
added: v0.7.7
75+
-->
5876

5977
A `Number` that gives the number of columns the TTY currently has. This property
6078
gets updated on `'resize'` events.
6179

6280
### ws.rows
81+
<!-- YAML
82+
added: v0.7.7
83+
-->
6384

6485
A `Number` that gives the number of rows the TTY currently has. This property
6586
gets updated on `'resize'` events.
6687

6788
## tty.isatty(fd)
89+
<!-- YAML
90+
added: v0.5.8
91+
-->
6892

6993
Returns `true` or `false` depending on if the `fd` is associated with a
7094
terminal.

0 commit comments

Comments
 (0)