import { IterableActivity , Source } from "./activity" ; function entriesGen < T = any > ( ) { return function * ( source ) { let i = - 1 ; for ( const item of source ) { yield [ ++ i , item ] ; } } ; } export function entries < T = any > ( ) ; export function entries < T > ( source ) ; export function entries < T > ( source ? ) { return source ? entriesGen < T > ( ) ( source ) : entriesGen < T > ( ) ; }