@webdeveric/utils
    Preparing search index...
    • Assert that input is a bigint or undefined.

      Parameters

      • input: unknown
      • error: string | Error = 'input is not an optional bigint'

      Returns asserts input is bigint | undefined

      assertIsOptionalBigInt(10n); // does not throw
      assertIsOptionalBigInt(undefined); // does not throw
      assertIsOptionalBigInt(10); // throws TypeError: input is not an optional bigint