-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TTY: Document WriteStream.cursorTo and others #22893
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,6 +106,60 @@ added: v0.7.7 | |
A `number` specifying the number of columns the TTY currently has. This property | ||
is updated whenever the `'resize'` event is emitted. | ||
|
||
### writeStream.cursorTo(x, y) | ||
<!-- YAML | ||
added: v0.7.7 | ||
--> | ||
|
||
* `x` {number} | ||
* `y` {number} | ||
|
||
`writeStream.cursorTo` moves this `WriteStream`'s cursor to the specified | ||
position. | ||
|
||
### writeStream.moveCursor(dx, dy) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doc sections need to be ABC-sorted by their headings. |
||
<!-- YAML | ||
added: v0.7.7 | ||
--> | ||
|
||
* `dx` {number} | ||
* `dy` {number} | ||
|
||
`writeStream.moveCursor` moves this `WriteStream`'s cursor *relative* to its | ||
current position. | ||
|
||
### writeStream.clearLine(dir) | ||
<!-- YAML | ||
added: v0.7.7 | ||
--> | ||
|
||
* `dir` {number} | ||
* `-1` - to the left from cursor | ||
* `1` - to the right from cursor | ||
* `0` - the entire line | ||
|
||
`writeStream.clearLine` clears the current line of this `WriteStream` in a | ||
direction identified by `dir`. | ||
|
||
### writeStream.clearScreenDown() | ||
<!-- YAML | ||
added: v0.7.7 | ||
--> | ||
|
||
`writeStream.clearScreenDown` clears this `WriteStream` from the current | ||
cursor down. | ||
|
||
### writeStream.getWindowSize() | ||
<!-- YAML | ||
added: v0.7.7 | ||
--> | ||
* Returns: {array} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
`writeStream.getWindowSize` returns the size of the [TTY]() corresponding | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems the link should be |
||
to this `WriteStream`. The array is of the type `[numColumns, numRows]` | ||
where `numColumns` and `numRows` represents the number of columns and rows | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. represents -> represent. |
||
in the corresponding [TTY](). | ||
|
||
### writeStream.isTTY | ||
<!-- YAML | ||
added: v0.5.8 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`writeStream.cursorTo`
->`writeStream.cursorTo()`
as per ourdoc/STYLE_GUIDE.md
. The same for the method mentions below.