1interface Person {
2 name: string;
3 age: number;
4 location: string;
5}
6
7type K1 = keyof Person; // "name" | "age" | "location"
8type K2 = keyof Person[]; // "length" | "push" | "pop" | "concat" | ...
9type K3 = keyof { [x: string]: Person }; // string