Skip to content

RenderContext

The output decisions the framework will make for a given argv, resolved before .run().

RenderContext is a framework-created, non-exhaustive value: obtain instances from resolveRenderContext — do not implement it. New readonly members may be added in minor releases.

Signatures

ts
interface RenderContext {}

Members

Properties

[renderContextBrand]

Framework-construction seal. Obtain values from resolveRenderContext(); do not implement this interface.

ts
[renderContextBrand]: never;

color

The gated ANSI palette the output channel will expose as out.color — identity formatters when color is off; color.isColorSupported is the boolean gate.

ts
color: Colors;

isHyperlinkSupported

Whether OSC 8 hyperlinks should be emitted (see out.isHyperlinkSupported).

ts
isHyperlinkSupported: boolean;

isTTY

The TTY status the output channel will carry.

ts
isTTY: boolean;

jsonMode

Whether a pre-separator --json puts the run in JSON mode.

ts
jsonMode: boolean;

verbosity

Active verbosity after pre-separator --quiet/-q detection.

ts
verbosity: "normal" | "quiet";

See Also

Released under the MIT License.