/** * Extract the keys of an object. * * @template T The object to extract the keys from * @returns The keys of the object */ type Key = T extends Iterable ? number : T extends object ? keyof T : PropertyKey; export type { Key };