I need to get the names of the keys of the object that comes as generic type T
I tried to do this through an
function getGnericTypeKeys<T>(): string[] {
return Object.keys({} as T);
}
and
function getGnericTypeKeys<T>(): string[] {
return Object.getOwnProperties({} as T);
}
and
function getGnericTypeKeys<T>(): string[] {
return Reflect.ownKeys({} as T);
}