Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Pty

A pseudo terminal used for controlling a Tty. This interface acts as a pseudo terminal master, {@link Pty#slave} returns the assocated slave pseudo terminal.

Hierarchy

  • Pty

Index

Methods

setSize

  • setSize(width: number, height: number): Pty
  • Resize the terminal.

    Parameters

    • width: number
    • height: number

    Returns Pty

slave

  • Returns Tty

stdoutHandler

  • stdoutHandler(handler: ((res: string) => void) | Handler<string>): Pty
  • Set the standard out handler of the pseudo terminal.

    Parameters

    • handler: ((res: string) => void) | Handler<string>

    Returns Pty

write

  • write(data: string): Pty
  • Write data to the slave standard input of the pseudo terminal.

    Parameters

    • data: string

    Returns Pty

Static create

  • create(): Pty
  • create(terminalType: string): Pty
  • Create a new pseudo terminal with no terminal type.

    Returns Pty

  • Create a new pseudo terminal.

    Parameters

    • terminalType: string

    Returns Pty

Generated using TypeDoc