Not sure if this is possible... but I am trying to convert an interface to tuples using the keys of the interface.
Interface:
interface User {
_id: string;
first_name: string;
last_name: string;
address: {
firstLine: string;
secondLine: string;
state: string;
zip: string;
details: {
active: boolean;
primary: boolean;
}
}
}
The new type should allow me to create an array as such:
const args: UserKeysTuple = ["_id", ["address", ["zip", "details": ["active"]]];
Order does not matter.