Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Term

The terminal.

Hierarchy

Index

Methods

close

  • close(): void
  • Close the connection to terminal.

    Returns void

closeHandler

  • closeHandler(handler: ((res: void) => void) | Handler<void>): Term
  • Set a handler that will be called when the terminal is closed.

    Parameters

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

    Returns Term

echo

  • echo(text: string): Term
  • Echo some text in the terminal, escaped if necessary.

    Parameters

    • text: string

    Returns Term

height

  • height(): number
  • Returns number

interruptHandler

  • Set an interrupt signal handler on the term.

    Parameters

    Returns Term

lastAccessedTime

  • lastAccessedTime(): number
  • Returns number

readline

  • readline(prompt: string, lineHandler: ((res: string) => void) | Handler<string>): void
  • readline(prompt: string, lineHandler: ((res: string) => void) | Handler<string>, completionHandler: ((res: Completion) => void) | Handler<Completion>): void
  • Prompt the user a line of text.

    Parameters

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

    Returns void

  • Prompt the user a line of text, providing a completion handler to handle user's completion.

    Parameters

    • prompt: string
    • lineHandler: ((res: string) => void) | Handler<string>
    • completionHandler: ((res: Completion) => void) | Handler<Completion>

    Returns void

resizehandler

  • resizehandler(handler: ((res: void) => void) | Handler<void>): Term
  • Parameters

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

    Returns Term

setSession

  • Associate the term with a session.

    Parameters

    Returns Term

stdinHandler

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

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

    Returns Term

suspendHandler

  • Set a suspend signal handler on the term.

    Parameters

    Returns Term

type

  • type(): string
  • Returns string

width

  • width(): number
  • Returns number

write

  • write(data: string): Term
  • Parameters

    • data: string

    Returns Term

Generated using TypeDoc