You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was documented, but they don't exist anymore...
Collection Methods and *Seq Methods
There are a number of collection methods provided, such as fold, map, and filter. These methods assume that they are acting on a FunPromise<T extends Iterable<U>>, and the type system will ensure that you
are if you're using Typescript: attempts to call those functions on something
that is not Iterable will end up with a return type of FunPromise<never>.
If, however, you circumvent the typing (eg: by using JavaScript to call the
method), then the resolved value of the FunPromise will be cast to an array
using _.castArray from Lodash,
which probably does what you want.
There are also methods whose names end in *Seq. These methods also operate on
a FunPromise<T extends Iterable<U>>. They are functionally identical to their Seq-less counterparts, but with one additional guarantee: the first element of
the iterable will be forced to resolve and will be processed before ever looking
at the second element, and so on. This may be useful for debugging or other
times when you are particular about making sure one thing works before the next
occurs.
The text was updated successfully, but these errors were encountered:
This was documented, but they don't exist anymore...
Collection Methods and
*Seq
MethodsThere are a number of collection methods provided, such as
fold
,map
, andfilter
. These methods assume that they are acting on aFunPromise<T extends Iterable<U>>
, and the type system will ensure that youare if you're using Typescript: attempts to call those functions on something
that is not
Iterable
will end up with a return type ofFunPromise<never>
.If, however, you circumvent the typing (eg: by using JavaScript to call the
method), then the resolved value of the
FunPromise
will be cast to an arrayusing
_.castArray
from Lodash,which probably does what you want.
There are also methods whose names end in
*Seq
. These methods also operate ona
FunPromise<T extends Iterable<U>>
. They are functionally identical to theirSeq
-less counterparts, but with one additional guarantee: the first element ofthe iterable will be forced to resolve and will be processed before ever looking
at the second element, and so on. This may be useful for debugging or other
times when you are particular about making sure one thing works before the next
occurs.
The text was updated successfully, but these errors were encountered: