Skip to content

OutputOptions

Configuration for creating an output channel.

Every field is optional — sensible defaults are applied when omitted.

Signatures

ts
interface OutputOptions {}

Members

Properties

isTTY

Whether stdout is connected to a TTY. When false, output may omit ANSI codes and decorations. Defaults to false (safe default — non-TTY until proven otherwise).

ts
isTTY?: boolean;

jsonMode

Enable JSON output mode.

When true, log and info messages are redirected to stderr so that stdout is reserved exclusively for structured json() output. warn and error continue to write to stderr as normal.

ts
jsonMode?: boolean;

stderr

Writer for stderr-bound messages (warn, error). In JSON mode, log and info are also redirected here so that stdout contains only structured JSON output. Defaults to process.stderr.write when running in Node/Bun.

ts
stderr?: WriteFn;

stdout

Writer for stdout-bound messages (log, info, json). Defaults to process.stdout.write when running in Node/Bun.

ts
stdout?: WriteFn;

verbosity

Verbosity level.

  • 'normal' (default) — emit all messages
  • 'quiet' — suppress info messages
ts
verbosity?: "normal" | "quiet";

See Also

Released under the MIT License.