export interface Dictionary < T > { [ key ] : T ; } param collection param iteratee export const keyBy = ( collection , iteratee ) => { return collection . reduce < any > ( ( acc , curr ) => { acc [ iteratee ( curr ) ] = curr ; return acc ; } , { } ) ; } ;