Helper to collect both the yielded values and the returned value from a generator.
Signature:
export declare function collect<T, R>(gen: Generator<T, R>): [T[], R];
Parameter | Type | Description |
---|---|---|
gen | Generator<T, R> | Generator to collect from |
Returns:
[T[], R]