@tsdotnet/type - v1.2.7
    Preparing search index...

    Function hasMember

    • Will detect if a member exists (using 'in'). Returns true if a property or method exists on the object or its prototype.

      Type Parameters

      • T = unknown
      • K extends PropertyKey = keyof T

      Parameters

      • instance: unknown
      • property: K

        Name of the member.

      • verify: boolean = false

        When true, if the member exists but is undefined, it will return false.

      Returns instance is { [P in PropertyKey]: unknown } & T