Type Manipulation
keyof
type Person = {
name: string;
age: number;
}
type keyOfPerson = keyof Person;
// Similar to type keyOfPerson = 'name' | 'age':
type keyOfAny = keyof any;
// Similar to type keyOfAny = string | number | symbol
type Person = {
name: string;
age: number;
}
type keyOfPerson = keyof Person;
// Similar to type keyOfPerson = 'name' | 'age':
type keyOfAny = keyof any;
// Similar to type keyOfAny = string | number | symbol