Represents the keys of a given type T. This type alias Keys<T> is equivalent to keyof T, which retrieves the union type of keys (property names) of type T.
T
Keys<T>
keyof T
Union type of keys (property names) of type T.
type Person = { name: string; age: number; email: string;}; type PersonKeys = Keys<Person>; => "name" | "age" | "email" Copy
type Person = { name: string; age: number; email: string;}; type PersonKeys = Keys<Person>; => "name" | "age" | "email"
Represents the keys of a given type
T
. This type aliasKeys<T>
is equivalent tokeyof T
, which retrieves the union type of keys (property names) of typeT
.