import { MapFunc } from './arrays' export type Key = string | number | symbol export function fromKeys(keys: K[], callbackfn: MapFunc) { return Object.assign({}, ...keys.map((key, index) => ({ [key]: callbackfn(key, index, keys) }))) as Record }