Skip to main content

formatUtils

Index

Enumerations

LogLevel

LogLevel:

Discard

Discard: discard

Error

Error: error

Info

Info: info

Warning

Warning: warning

Style

Style:

BOLD

BOLD: 2

Type Aliases

Field

Field: { label: string; value: Tuple<any> }

Type declaration

  • label: string
  • value: Tuple<any>

Source

Source<T>: T extends keyof AllTransforms ? Parameters<AllTransforms[T][json]>[0] | null : string | null

Type parameters

  • T

Tuple

Tuple<T>: readonly [Source<T>, T]

Type parameters

Type

Type: keyof typeof Type

Variables

constType

Type: { ADDED: ADDED; CODE: CODE; DEPENDENT: DEPENDENT; DESCRIPTOR: DESCRIPTOR; DURATION: DURATION; ID: ID; IDENT: IDENT; INSPECT: INSPECT; LOCATOR: LOCATOR; MARKDOWN: MARKDOWN; MARKDOWN_INLINE: MARKDOWN_INLINE; NAME: NAME; NO_HINT: NO_HINT; NULL: NULL; NUMBER: NUMBER; PACKAGE_EXTENSION: PACKAGE_EXTENSION; PATH: PATH; RANGE: RANGE; REFERENCE: REFERENCE; REMOVED: REMOVED; RESOLUTION: RESOLUTION; SCOPE: SCOPE; SETTING: SETTING; SIZE: SIZE; SIZE_DIFF: SIZE_DIFF; URL: URL } = ...

Type declaration

  • readonlyADDED: ADDED
  • readonlyCODE: CODE
  • readonlyDEPENDENT: DEPENDENT
  • readonlyDESCRIPTOR: DESCRIPTOR
  • readonlyDURATION: DURATION
  • readonlyID: ID
  • readonlyIDENT: IDENT
  • readonlyINSPECT: INSPECT
  • readonlyLOCATOR: LOCATOR
  • readonlyMARKDOWN: MARKDOWN
  • readonlyMARKDOWN_INLINE: MARKDOWN_INLINE
  • readonlyNAME: NAME
  • readonlyNO_HINT: NO_HINT
  • readonlyNULL: NULL
  • readonlyNUMBER: NUMBER
  • readonlyPACKAGE_EXTENSION: PACKAGE_EXTENSION
  • readonlyPATH: PATH
  • readonlyRANGE: RANGE
  • readonlyREFERENCE: REFERENCE
  • readonlyREMOVED: REMOVED
  • readonlyRESOLUTION: RESOLUTION
  • readonlySCOPE: SCOPE
  • readonlySETTING: SETTING
  • readonlySIZE: SIZE
  • readonlySIZE_DIFF: SIZE_DIFF
  • readonlyURL: URL

constsupportsColor

supportsColor: boolean = ...

constsupportsHyperlinks

supportsHyperlinks: boolean = ...

Functions

addLogFilterSupport

  • Add support support for the logFilters setting to the specified Report instance.


    Parameters

    Returns void

applyColor

  • applyColor(configuration: Configuration, value: string, formatType: string): string
  • Parameters

    Returns string

applyHyperlink

  • applyHyperlink(configuration: Configuration, text: string, href: string): string
  • Parameters

    Returns string

applyStyle

  • applyStyle(configuration: Configuration, text: string, flags: BOLD): string
  • Parameters

    Returns string

json

  • json<T>(value: Source<T>, formatType: string | T): any
  • Type parameters

    • T: NO_HINT | ID | NULL | SCOPE | NAME | RANGE | REFERENCE | NUMBER | PATH | URL | ADDED | REMOVED | CODE | INSPECT | DURATION | SIZE | SIZE_DIFF | IDENT | DESCRIPTOR | LOCATOR | RESOLUTION | DEPENDENT | PACKAGE_EXTENSION | SETTING | MARKDOWN | MARKDOWN_INLINE

    Parameters

    • value: Source<T>
    • formatType: string | T

    Returns any

jsonOrPretty

  • jsonOrPretty<T>(outputJson: boolean, configuration: Configuration, __namedParameters: Tuple<T>): any
  • Type parameters

    • T: NO_HINT | ID | NULL | SCOPE | NAME | RANGE | REFERENCE | NUMBER | PATH | URL | ADDED | REMOVED | CODE | INSPECT | DURATION | SIZE | SIZE_DIFF | IDENT | DESCRIPTOR | LOCATOR | RESOLUTION | DEPENDENT | PACKAGE_EXTENSION | SETTING | MARKDOWN | MARKDOWN_INLINE

    Parameters

    Returns any

mark

  • mark(configuration: Configuration): { Check: string; Cross: string; Question: string }
  • Parameters

    Returns { Check: string; Cross: string; Question: string }

    • Check: string
    • Cross: string
    • Question: string

pretty

  • Type parameters

    • T: NO_HINT | ID | NULL | SCOPE | NAME | RANGE | REFERENCE | NUMBER | PATH | URL | ADDED | REMOVED | CODE | INSPECT | DURATION | SIZE | SIZE_DIFF | IDENT | DESCRIPTOR | LOCATOR | RESOLUTION | DEPENDENT | PACKAGE_EXTENSION | SETTING | MARKDOWN | MARKDOWN_INLINE

    Parameters

    Returns string

prettyField

prettyList

  • prettyList<T>(configuration: Configuration, values: Iterable<Source<T>>, formatType: string | T, __namedParameters?: { separator?: string }): string
  • Type parameters

    • T: NO_HINT | ID | NULL | SCOPE | NAME | RANGE | REFERENCE | NUMBER | PATH | URL | ADDED | REMOVED | CODE | INSPECT | DURATION | SIZE | SIZE_DIFF | IDENT | DESCRIPTOR | LOCATOR | RESOLUTION | DEPENDENT | PACKAGE_EXTENSION | SETTING | MARKDOWN | MARKDOWN_INLINE

    Parameters

    • configuration: Configuration
    • values: Iterable<Source<T>>
    • formatType: string | T
    • __namedParameters: { separator?: string } = {}

    Returns string

prettyTruncatedLocatorList

  • prettyTruncatedLocatorList(configuration: Configuration, locators: Locator[], recommendedLength: number): string

tuple

  • Type parameters

    • T: NO_HINT | ID | NULL | SCOPE | NAME | RANGE | REFERENCE | NUMBER | PATH | URL | ADDED | REMOVED | CODE | INSPECT | DURATION | SIZE | SIZE_DIFF | IDENT | DESCRIPTOR | LOCATOR | RESOLUTION | DEPENDENT | PACKAGE_EXTENSION | SETTING | MARKDOWN | MARKDOWN_INLINE

    Parameters

    Returns Tuple<T>