I want to know if it’s possible to get a generic interface or type and get it’s properties like an array of objects, like this:
interface UserData {
email: string
}
keys = extractKeys<UserData>()
console.log(keys) // [ 'email' ]
I want to know if it’s possible to get a generic interface or type and get it’s properties like an array of objects, like this:
interface UserData {
email: string
}
keys = extractKeys<UserData>()
console.log(keys) // [ 'email' ]