# Class: Tty

## vertx-shell-js/tty~ Tty

#### new Tty()

Provide interactions with the Shell TTY.

Source:
  - vertx-shell-js/tty.js, line 29

### Methods

#### height() → {number}

Source:
  - vertx-shell-js/tty.js, line 70

##### Returns:

- the current height, i.e the number of columns or if unknown
- Type
    number

#### resizehandler(handler) → {Tty}

Set a resize handler, the handler is called when the tty size changes.

##### Parameters:

Name | Type | Description
--- | --- | ---
`handler` | function | the resize handler

Source:
  - vertx-shell-js/tty.js, line 116

##### Returns:

this object

Type
  Tty

#### stdinHandler(handler) → {Tty}

Set a stream handler on the standard input to read the data.

##### Parameters:

Name | Type | Description
--- | --- | ---
`handler` | function | the standard input

Source:
  - vertx-shell-js/tty.js, line 84

##### Returns:

this object

Type
  Tty

#### type() → {string}

Source:
  - vertx-shell-js/tty.js, line 42

##### Returns:

- the declared tty type, for instance , , etc... it can be null when the tty does not have declared its type.
- Type
    string

#### width() → {number}

Source:
  - vertx-shell-js/tty.js, line 56

##### Returns:

- the current width, i.e the number of rows or if unknown
- Type
    number

#### write(data) → {Tty}

Write data to the standard output.

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | string | the data to write

Source:
  - vertx-shell-js/tty.js, line 101

##### Returns:

this object

Type
  Tty