@webdeveric/utils
    Preparing search index...
    • Assert that input is a valid property key: a string, number, or symbol.

      Parameters

      • input: unknown
      • error: string | Error = 'input is not a property key'

      Returns asserts input is PropertyKey

      assertIsPropertyKey('key'); // does not throw
      assertIsPropertyKey(42); // does not throw
      assertIsPropertyKey(Symbol('key')); // does not throw
      assertIsPropertyKey({}); // throws TypeError: input is not a property key