export function mapValues( this: T, fn: (value: T[U], key: U, object: T) => V ): object & Object & { [K in U]: V } { let result: any = {} this.forEach((item, key) => result[key] = fn(item, key as U, this)) return result }