Interface ValidationErrorTransformOptions<TSeverity, TContext>

Options that allow customizing generation of resulting publish validation error objects.

Type Parameters

  • TSeverity extends string

  • TContext extends string

Hierarchy

  • ValidationErrorTransformOptions

Properties

overrideErrorTransformer?: ((error) => undefined | DetailedValidationError<TSeverity, TContext>)

Type declaration

    • (error): undefined | DetailedValidationError<TSeverity, TContext>
    • Allows to fully override default generation logic for error validation object. Called for each error. If an undefined value is returned - default logic will be applied. If DetailedValidationError is returned - default generation logic is skipped and returned error object is used instead.

      Parameters

      Returns undefined | DetailedValidationError<TSeverity, TContext>

setContext?: ((error) => "METADATA" | TContext)

Type declaration

    • (error): "METADATA" | TContext
    • Overrides default METADATA context value with a custom returned value. Called for each error.

      Parameters

      Returns "METADATA" | TContext

setSeverity?: ((error) => "ERROR" | TSeverity)

Type declaration

    • (error): "ERROR" | TSeverity
    • Overrides default ERROR severity value with a custom returned value. Called for each error.

      Parameters

      Returns "ERROR" | TSeverity

Generated using TypeDoc