@cowwoc/requirements - v4.0.12
    Preparing search index...

    Interface ConfigurationUpdater

    Updates the configuration used by new validators.

    interface ConfigurationUpdater {
        allowDiff(): boolean;
        allowDiff(allowDiff: boolean): ConfigurationUpdater;
        allowDiff(mayDiff?: boolean): boolean | ConfigurationUpdater;
        close(): void;
        errorTransformer(): (error: Error) => Error;
        errorTransformer(
            errorTransformer: (error: Error) => Error,
        ): ConfigurationUpdater;
        errorTransformer(
            errorTransformer?: (error: Error) => Error,
        ): ConfigurationUpdater | ((error: Error) => Error);
        recordStacktrace(): boolean;
        recordStacktrace(recordStacktrace: boolean): ConfigurationUpdater;
        recordStacktrace(
            recordStacktrace?: boolean,
        ): boolean | ConfigurationUpdater;
        stringMappers(): MutableStringMappers;
    }
    Index

    Methods

    • Returns true if error stack traces should reference the code that triggers a validation failure. When set to false, the error type remains unchanged, but the stack trace location is undefined. Users who only plan to list of failure messages instead of errors may experience a performance improvement if this value is set to false.

      Returns boolean

      true if errors must be recorded when a validation failure occurs

    • Specifies whether error stack traces should reference the code that triggers a validation failure. When set to false, the error type remains unchanged, but the stack trace location is undefined. Users who only plan to list of failure messages instead of errors may experience a performance improvement if this value is set to false.

      Parameters

      • recordStacktrace: boolean

        true if errors must be recorded when a validation failure occurs

      Returns ConfigurationUpdater

      this

    • Parameters

      • OptionalrecordStacktrace: boolean

      Returns boolean | ConfigurationUpdater