Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "test-error"

Index

Functions

Functions

testError

  • testError<T>(type: Type<T>, value: T): Error | undefined
  • Calls the .testError method of type or falls back to an implementation derived from .test.

    Type parameters

    • T

    Parameters

    • type: Type<T>

      The type used for the test.

    • value: T

      The value to match.

    Returns Error | undefined

    Undefined if the value matches, otherwise an Error instance.

Generated using TypeDoc