@tspro/ts-utils-lib
    Preparing search index...

    Function hasProperties

    • Usage:
        hasProperties(obj, ["a", "b"]);          // Gives type Record
        hasProperties(obj, ["a", "b"] as const); // Gives type Record<"a" | "b", unknown>
      

      Type Parameters

      • T extends readonly string[]

      Parameters

      • obj: unknown
      • props: string[] | T

      Returns obj is Record<T[number], unknown>