- to<TSource, TResult>(src: Iterable<TSource>, ctor: (new (src: Iterable<TSource>) => TResult)): TResult
-
Parameters
-
src: Iterable<TSource>
-
ctor: (new (src: Iterable<TSource>) => TResult)
-
- new (src: Iterable<TSource>): TResult
-
Returns TResult
Returns TResult
Creates a new instance of the passed in ctor with the Enumerable as input. Useful for custom iterables.
Example
Typeparam
TSource The type of the source iterable.
Typeparam
TResult The type of the returned object.
Returns
A new instance of the passed in ctor with the enumerable passed as input.