Class MappableGenerator<T, TReturn, TNext>
Implements
- Generator<T, TReturn, TNext>
- Iterable<T>
Properties
Optional returning
returning: any
Methods
Abstract [Symbol.iterator]
- [Symbol.iterator](): Generator<T>
every
- every(p: (v: T, idx: number) => boolean, thisArg?: any): boolean
-
Parameters
-
p: (v: T, idx: number) => boolean
-
- (v: T, idx: number): boolean
-
Parameters
Returns boolean
-
Optional thisArg: any
Returns boolean
filter
-
Parameters
-
p: (v: T) => boolean
-
-
Parameters
Returns boolean
-
Optional thisArg: any
flat
-
Type parameters
Parameters
-
Default value depth: D = 1 as D
flatMap
-
Type parameters
Parameters
-
f: (v: T, idx: number) => R
-
Default value depth: D = 1 as D
forEach
- forEach(f: (v: T) => void, thisArg?: any): any
-
Parameters
-
f: (v: T) => void
-
Optional thisArg: any
Returns any
join
- join(sep?: undefined | string): string
-
Parameters
-
Optional sep: undefined | string
Returns string
map
-
Type parameters
Parameters
-
f: (v: T) => V
-
Optional thisArg: any
Abstract next
- next(): IteratorResult<T>
-
Returns IteratorResult<T>
reduce
- reduce<A>(f: (acc: A | T, v: T) => A): A
- reduce<A>(f: (acc: A, v: T) => A, init: A): A
-
Type parameters
Parameters
-
f: (acc: A | T, v: T) => A
Returns A
-
Type parameters
Parameters
-
f: (acc: A, v: T) => A
-
init: A
Returns A
Abstract return
- return(value: any): IteratorResult<T>
-
Parameters
Returns IteratorResult<T>
slice
-
Parameters
-
Default value start: number = 0
-
Default value end: number = Number.POSITIVE_INFINITY
some
- some(p: (v: T, idx: number) => boolean, thisArg?: any): boolean
-
Parameters
-
p: (v: T, idx: number) => boolean
-
- (v: T, idx: number): boolean
-
Parameters
Returns boolean
-
Optional thisArg: any
Returns boolean
Abstract throw
- throw(e: any): IteratorResult<T>
-
Parameters
Returns IteratorResult<T>
Static concat
-
Type parameters
Parameters
Static every
- every<T>(gen: Genable<T>, p: (v: T, idx: number) => boolean, thisArg?: any): boolean
-
Type parameters
Parameters
-
-
p: (v: T, idx: number) => boolean
-
- (v: T, idx: number): boolean
-
Parameters
Returns boolean
-
Optional thisArg: any
Returns boolean
Static extend
-
Type parameters
Parameters
Static filter
-
Type parameters
Parameters
-
f: (v: T) => boolean
-
-
Parameters
Returns boolean
-
Optional thisArg: any
Static flat
-
Type parameters
Parameters
-
-
Default value depth: D = 1 as D
Static flatMap
-
Type parameters
Parameters
-
f: (v: T, idx: number) => R
-
Default value depth: D = 1 as D
Static map
-
Type parameters
Parameters
-
f: (v: T) => V
-
Optional thisArg: any
Static reduce
- reduce<T, A>(gen: Genable<T>, f: (acc: A | T, v: T) => A): A
- reduce<T, A>(gen: Genable<T>, f: (acc: A, v: T) => A, init: A): A
-
Type parameters
Parameters
-
-
f: (acc: A | T, v: T) => A
Returns A
-
Type parameters
Parameters
-
-
f: (acc: A, v: T) => A
-
init: A
Returns A
Static slice
-
Type parameters
Parameters
-
-
Default value start: number = 0
-
Default value end: number = Number.POSITIVE_INFINITY
Static some
- some<T>(gen: Genable<T>, p: (v: T, idx: number) => boolean, thisArg?: any): boolean
-
Type parameters
Parameters
-
-
p: (v: T, idx: number) => boolean
-
- (v: T, idx: number): boolean
-
Parameters
Returns boolean
-
Optional thisArg: any
Returns boolean
Concatenates generators (or iterators or iterables).
Ensures that any supplied generators are terminated when this is terminated.