componentized

An interface providing an optional terminal-input for stdin as a link-time authority.

Types

use resource terminal-input

from wasi:cli/terminal-input@0.2.0

The input side of a terminal.

Functions

functionget-terminal-stdin: func() -> option<terminal-input>

If stdin is connected to a terminal, return a terminal-input handle allowing further interaction with it.

WIT

/// An interface providing an optional `terminal-input` for stdin as a
/// link-time authority.
interface terminal-stdin {
  use terminal-input.{terminal-input};

  /// If stdin is connected to a terminal, return a `terminal-input` handle
  /// allowing further interaction with it.
  get-terminal-stdin: func() -> option<terminal-input>;
}