Takes an object type and produces a string or numeric literal union of its keys. import { Equal, Expect } from "../helpers/type-utils"; const testingFrameworks = { vitest: { label: "Vitest", }, jest: { label: "Jest", }, mocha: { label: "Mocha", }, }; type TestingFramework = keyof typeof testingFrameworks; // type TestingFramework = "vitest" | "jest" | "mocha" Links https://www.typescriptlang.org/docs/handbook/2/keyof-types.html