Module: processTargets/modifiers/scopeHandlers/IteratorInfo
Namespaces
Functions
advanceIteratorsUntil
▸ advanceIteratorsUntil<T
>(iteratorInfos
, criterion
): IteratorInfo
<T
>[]
Advances each iterator until {@link criterion} is true
, pruning iterators
that terminate without {@link criterion} becoming true
.
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
iteratorInfos | IteratorInfo <T >[] | A list of iterator infos |
criterion | (arg : T ) => boolean | The criterion to check |
Returns
IteratorInfo
<T
>[]
A new set of iterator infos that have been advanced until
{@link criterion} is true
. Any iterators that terminate without meeting
{@link criterion} are removed
Defined in
processTargets/modifiers/scopeHandlers/IteratorInfo.ts:45
getInitialIteratorInfos
▸ getInitialIteratorInfos<T
>(iterators
): IteratorInfo
<T
>[]
Asks each iterator for its first value, and constructs IteratorInfos to keep track of iterators along with their values, pruning any iterators that didn't yield a first value.
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
iterators | Iterator <T , any , undefined >[] | The iterators to keep track of |
Returns
IteratorInfo
<T
>[]
A list of IteratorInfos containing each iterator along with the first yielded value, removing any iterators that didn't yield a first value
Defined in
processTargets/modifiers/scopeHandlers/IteratorInfo.ts:19