@nevware21/tripwire - v0.1.7
    Preparing search index...

    Interface IConfigApi<T>

    Provides the additional API functions for the configuration instance

    0.1.5

    The IConfigApi interface provides additional API functions for the configuration instance. It provides access to the current configuration settings, including verbosity, stack trace options, default messages, formatting options, circular reference handling, and diff display settings.

    interface IConfigApi<T> {
        addFormatter: (formatter: IFormatter | IFormatter[]) => IRemovable;
        clone: (options?: IConfig) => T;
        formatMgr: IFormatManager;
        reset: () => void;
    }

    Type Parameters

    • T
    Index

    Properties

    addFormatter: (formatter: IFormatter | IFormatter[]) => IRemovable

    Adds a new value formatter that will be used to for all new assertion contexts

    Type Declaration

    The returned IRemovable can be used to remove the formatter(s) when they are no longer needed.

    clone: (options?: IConfig) => T

    Returns the current config options in a new plain object

    Type Declaration

      • (options?: IConfig): T
      • Parameters

        • Optionaloptions: IConfig

          The options to override the current config options

        Returns T

    formatMgr: IFormatManager

    The format manager responsible for managing value formatters.

    The format manager handles registration and retrieval of custom formatters used for formatting values in assertion error messages. Formatters are checked in priority order: current context formatters (highest priority), parent context formatters (medium priority), and default formatters (lowest priority). When cloning a config, the format manager is also cloned to maintain isolation between contexts.

    0.1.5

    reset: () => void

    Resets the current config options to their default values removing any customizations

    This will restore all config options to their original default values as defined in package defaults.