Class OutputSettings

[[Output]] production parameters. OutputSettings provide contextual configuration parameters to output producers, such as [[Writer Writers]]. Uses include enabling pretty printing and styling generated output. Subclasses can provide additional parameters understood by specialized output producers.

Hierarchy

  • OutputSettings

Implements

Constructors

  • Parameters

    • lineSeparator: string
    • pretty: boolean
    • styled: boolean
    • precision: number

    Returns OutputSettings

Properties

lineSeparator: string

The Unicode code point sequence used to separate lines of text. Defaults to the runtime operating system's line separator.

precision: number

Returns the numeric precision output producers should use when formatting numbers.

Methods

  • Returns a copy of these settings with the given pretty flag.

    Parameters

    • pretty: boolean

    Returns OutputSettings

  • Returns a copy of these settings with the given styled flag.

    Parameters

    • styled: boolean

    Returns OutputSettings

  • Parameters

    • that: unknown

    Returns boolean

  • Parameters

    • lineSeparator: string
    • pretty: boolean
    • styled: boolean
    • precision: number

    Returns OutputSettings

  • Writes a developer readable, debug-formatted string representation of this object to output.

    Type Parameters

    • T

    Parameters

    Returns Output<T>

    the continuation of the output.

    Throws

    [[OutputException]] if the output exits the cont state before the full debug string has been written.

  • Parameters

    • that: unknown

    Returns boolean

  • Returns number

  • Returns true if output producers should pretty print their output, when possible.

    Returns boolean

  • Returns true if output producers should style their output, when possible.

    Returns boolean

  • Returns string

  • Returns a copy of these settings with the given lineSeparator.

    Parameters

    • lineSeparator: string

    Returns string | OutputSettings

  • Returns a copy of these settings with the given numeric precision.

    Parameters

    • precision: number

    Returns OutputSettings

  • Returns OutputSettings configured with the given lineSeparator, pretty printing enabled if isPretty is true, styling enabled if isStyled is true, and with the given numeric precision.

    Parameters

    • Optional lineSeparator: string
    • Optional pretty: boolean
    • Optional styled: boolean
    • Optional precision: number

    Returns OutputSettings

  • Converts a loosely typed settings value to an instance of OutputSettings.

    Parameters

    Returns OutputSettings

  • Returns OutputSettings configured with the system line separator, pretty printing enabled, and styling disabled.

    Returns OutputSettings

  • Returns OutputSettings configured with the system line separator, pretty printing enabled, and styling enabled.

    Returns OutputSettings

  • Returns OutputSettings configured with the system line separator, pretty printing disabled, and styling disabled.

    Returns OutputSettings

  • Returns OutputSettings configured with the system line separator, pretty printing disabled, and styling enabled.

    Returns OutputSettings

Generated using TypeDoc