import Event from "rx.mini" ; export function enumerate < T > ( arr ) { return arr . map ( ( v , i ) => [ i , v ] ) ; } export type Unpacked < T > = T extends { [ K in keyof T ] : infer U ; } ? U : never ; export function createEventsFromList < T > ( list ) { return list . reduce ( ( acc , cur ) => { acc [ cur ] = new Event ( ) ; return acc ; } , { } ) ; }