@pengzhanbo/utils - v3.4.1
    Preparing search index...

    Function isKeyof

    • Check if an object has a property

      检查一个对象是否有属性

      Type Parameters

      • T extends object

      Parameters

      • obj: T

        The object to check. 要检查的对象

      • key: PropertyKey

        The key to check for. 要检查的键

      Returns key is keyof T

      True if the object has the property, false otherwise. 如果对象具有该属性则返回true,否则返回false