/** Returns the indexes of the given array. */ export default function keysOf(arr: T): number[]; /** Returns an array of the given function's own properties. */ export default function keysOf(fn: T): (string | symbol)[]; /** Returns an array of the given object's own properties. */ export default function keysOf(obj: T): (keyof T | symbol)[]; export default function keysOf(obj: object): (string | number | symbol)[] { if (Array.isArray(obj)) { return obj.map((_, i) => i); } else { return Reflect.ownKeys(obj); } }