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

      Parameters

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

      Returns asserts input is boolean | undefined

      assertIsOptionalBoolean(true); // does not throw
      assertIsOptionalBoolean(undefined); // does not throw
      assertIsOptionalBoolean('true'); // throws TypeError: input is not an optional boolean