Function notHasKeys

  • check if object has keys

    Type Parameters

    • T extends Record<string, any>
    • K extends string | number | symbol

    Parameters

    • object: T
    • keys: K | K[]

      a key or array of keys in the object.

    • Optionalmessage: string

    Returns void

    hasKeys({a: 1}, 'a');
    
    hasKeys({a: 1, b: 2}, ['a', 'b']);
    
  • Type Parameters

    • K
    • T extends Map<K, any>

    Parameters

    • object: T
    • keys: K | K[]
    • Optionalmessage: string

    Returns void