• Tests whether or not a key string is a key of the given object type T.

    Type Parameters

    • T extends object
    • K extends string

    Parameters

    • obj: T

      The target object to check the key in.

    • key: string

      The string to test as a key of the target object.

    Returns key is K