Skip to content

Latest commit

 

History

History
24 lines (14 loc) · 564 Bytes

prsc.collect.md

File metadata and controls

24 lines (14 loc) · 564 Bytes

Home > prsc > collect

collect() function

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];

Parameters

Parameter Type Description
gen Generator<T, R> Generator to collect from

Returns:

[T[], R]