Skip to main content

externalAnsiDiffFormatter

A DiffFormatter that uses ANSI escape codes to format the output.

Implements

Index

Constructors

externalconstructor

  • Instantiates an AnsiDiffFormatter, configured with colour support options for Chalk. When no chalkOptions object is provided, Chalk will auto-detect colour support automatically based on the execution environment.

    Available colour support levels:

    • 0 - All colours disabled.
    • 1 - Basic 16 colours support.
    • 2 - ANSI 256 colours support.
    • 3 - Truecolor - 16 million colours support.

    Parameters

    • externaloptionalchalkOptions: Options

    Returns AnsiDiffFormatter

Methods

externalexpected

  • expected(line: string): string
  • Parameters

    • externalline: string

    Returns string

externalreceived

  • received(line: string): string
  • Parameters

    • externalline: string

    Returns string

externalunchanged

  • unchanged(line: string): string
  • Parameters

    • externalline: string

    Returns string