Function isEqual

  • Asserts that a value is equal to a specific value.

    Type Parameters

    • T = unknown

    Parameters

    • val: T

      Value to check

    • expected: T

      Expected value

    • OptionalerrorOrMessage: string | Error

      Error object or message to throw if the value is not equal to the expected value

    Returns asserts val is T