Given the following object:
const obj = { a: 1, b: 2, c: 3 };
I would like to build a type that returns:
type ObjKeysAsArray<T> = ?; // ObjKeysAsArray<typeof obj>: ["a", "b", "c"]
I thought about (keyof typeof obj)[]
, but it would return ("a" | "b" | "c")[]
, which is not what I want.