Skip to main content

abstract class AsyncStreamBase<T>

undocumented

Implements: AsyncStream<T>

Extended by: AsyncOfStream<T>, FromResource<T,R>, AsyncTransformerStream<T,R>, FromSource<T>, AsyncFromStream<T>

Type parameters

NameDescription
Tundocumented

Methods

[Symbol.asyncIterator]

undocumented

Definition

abstract [Symbol.asyncIterator](): AsyncFastIterator<T>;

Overrides

AsyncFastIterable.[Symbol.asyncIterator]

append

undocumented

Definition

append(value: AsyncOptLazy<T>): AsyncStream.NonEmpty<T>;

Parameters

NameTypeDescription
valueAsyncOptLazy<T>

Overrides

AsyncStream.append

asNormal

undocumented

Definition

asNormal(): AsyncStream<T>;

assumeNonEmpty

undocumented

Definition

assumeNonEmpty(): AsyncStream.NonEmpty<T>;

Overrides

AsyncStream.assumeNonEmpty

asyncStream

undocumented

Definition

asyncStream(): this;

Overrides

AsyncStream.asyncStream

collect

undocumented

Definition

collect<R>(collectFun: AsyncCollectFun<T, R>): AsyncStream<R>;

Type parameters

NameDescription
R

Parameters

NameTypeDescription
collectFunAsyncCollectFun<T, R>

Overrides

AsyncStream.collect

concat

undocumented

Definition

concat(...others: ArrayNonEmpty<AsyncStreamSource<T>>): any;

Parameters

NameTypeDescription
othersArrayNonEmpty<AsyncStreamSource<T>>

Overrides

AsyncStream.concat

contains

undocumented

Definition

contains(searchValue: T, options?: {
    amount?: number;
    eq?: Eq<T>;
    negate?: boolean;
  }): Promise<boolean>;

Parameters

NameTypeDescription
searchValueT
options{
    amount?: number;
    eq?: Eq<T>;
    negate?: boolean;
  }

Overrides

AsyncStream.contains

containsSlice

undocumented

Definition

containsSlice(source: AsyncStreamSource.NonEmpty<T>, options?: {
    eq?: Eq<T>;
    amount?: number;
  }): Promise<boolean>;

Parameters

NameTypeDescription
sourceAsyncStreamSource.NonEmpty<T>
options{
    eq?: Eq<T>;
    amount?: number;
  }

Overrides

AsyncStream.containsSlice

count

undocumented

Definition

count(): Promise<number>;

Overrides

AsyncStream.count

countElement

undocumented

Definition

countElement(value: T, options?: {
    eq?: Eq<T>;
    negate?: boolean;
  }): Promise<number>;

Parameters

NameTypeDescription
valueT
options{
    eq?: Eq<T>;
    negate?: boolean;
  }

Overrides

AsyncStream.countElement

distinctPrevious

undocumented

Definition

distinctPrevious(options?: {
    eq?: Eq<T> | undefined;
    negate?: boolean | undefined;
  }): AsyncStream<T>;

Parameters

NameTypeDescription
options{
    eq?: Eq<T> | undefined;
    negate?: boolean | undefined;
  }

Overrides

AsyncStream.distinctPrevious

drop

undocumented

Definition

drop(amount: number): AsyncStream<T>;

Parameters

NameTypeDescription
amountnumber

Overrides

AsyncStream.drop

dropWhile

undocumented

Definition

dropWhile(pred: (value: T, index: number) => MaybePromise<boolean>, options?: {
    negate?: boolean;
  }): AsyncStream<T>;

Parameters

NameTypeDescription
pred(value: T, index: number) => MaybePromise<boolean>
options{
    negate?: boolean;
  }

Overrides

AsyncStream.dropWhile

elementAt

undocumented

Definition

elementAt<O>(index: number, otherwise?: AsyncOptLazy<O>): Promise<T | O>;

Type parameters

NameDescription
O

Parameters

NameTypeDescription
indexnumber
otherwiseAsyncOptLazy<O>

Overrides

AsyncStream.elementAt

equals

undocumented

Definition

equals(other: AsyncStreamSource<T>, options?: {
    eq?: Eq<T>;
    negate?: boolean;
  }): Promise<boolean>;

Parameters

NameTypeDescription
otherAsyncStreamSource<T>
options{
    eq?: Eq<T>;
    negate?: boolean;
  }

Overrides

AsyncStream.equals

every

undocumented

Definition

every(pred: (value: T, index: number) => MaybePromise<boolean>, options?: {
    negate?: boolean;
  }): Promise<boolean>;

Parameters

NameTypeDescription
pred(value: T, index: number) => MaybePromise<boolean>
options{
    negate?: boolean;
  }

Overrides

AsyncStream.every

filter

undocumented

Definition

filter(pred: (value: T, index: number, halt: () => void) => MaybePromise<boolean>, options?: {
    negate?: boolean | undefined;
  }): any;

Parameters

NameTypeDescription
pred(value: T, index: number, halt: () => void) => MaybePromise<boolean>
options{
    negate?: boolean | undefined;
  }

Overrides

AsyncStream.filter

filterPure

undocumented

Definition

filterPure<A extends readonly unknown[]>(options: {
    pred: (value: T, ...args: A) => MaybePromise<boolean>;
    negate?: boolean | undefined;
  }, ...args: A): any;

Type parameters

NameConstraintsDescription
Areadonly unknown[]

Parameters

NameTypeDescription
options{
    pred: (value: T, ...args: A) => MaybePromise<boolean>;
    negate?: boolean | undefined;
  }
argsA

Overrides

AsyncStream.filterPure

find

undocumented

Definition

find<O>(pred: (value: T, index: number) => MaybePromise<boolean>, options?: {
    occurrance?: number | undefined;
    negate?: boolean | undefined;
    otherwise?: AsyncOptLazy<O>;
  }): Promise<T | O>;

Type parameters

NameDescription
O

Parameters

NameTypeDescription
pred(value: T, index: number) => MaybePromise<boolean>
options{
    occurrance?: number | undefined;
    negate?: boolean | undefined;
    otherwise?: AsyncOptLazy<O>;
  }

Overrides

AsyncStream.find

first

undocumented

Definition

first<O>(otherwise?: AsyncOptLazy<O>): Promise<T | O>;

Type parameters

NameDescription
O

Parameters

NameTypeDescription
otherwiseAsyncOptLazy<O>

Overrides

AsyncStream.first

flatMap

undocumented

Definition

flatMap<T2>(flatMapFun: (value: T, index: number, halt: () => void) => AsyncStreamSource<T2>): AsyncStream<T2>;

Type parameters

NameDescription
T2

Parameters

NameTypeDescription
flatMapFun(value: T, index: number, halt: () => void) => AsyncStreamSource<T2>

Overrides

AsyncStream.flatMap

flatZip

undocumented

Definition

flatZip<T2>(flatMapFun: (value: T, index: number, halt: () => void) => AsyncStreamSource<T2>): AsyncStream<[T, T2]>;

Type parameters

NameDescription
T2

Parameters

NameTypeDescription
flatMapFun(value: T, index: number, halt: () => void) => AsyncStreamSource<T2>

Overrides

AsyncStream.flatZip

fold

undocumented

Definition

fold<R>(init: AsyncOptLazy<R>, next: (current: R, value: T, index: number, halt: () => void) => MaybePromise<R>): Promise<R>;

Type parameters

NameDescription
R

Parameters

NameTypeDescription
initAsyncOptLazy<R>
next(current: R, value: T, index: number, halt: () => void) => MaybePromise<R>

Overrides

AsyncStream.fold

foldStream

undocumented

Definition

foldStream<R>(init: AsyncOptLazy<R>, next: (current: R, value: T, index: number, halt: () => void) => MaybePromise<R>): AsyncStream<R>;

Type parameters

NameDescription
R

Parameters

NameTypeDescription
initAsyncOptLazy<R>
next(current: R, value: T, index: number, halt: () => void) => MaybePromise<R>

Overrides

AsyncStream.foldStream

forEach

undocumented

Definition

forEach(f: (value: T, index: number, halt: () => void) => MaybePromise<void>, options?: {
    state?: TraverseState;
  }): Promise<void>;

Parameters

NameTypeDescription
f(value: T, index: number, halt: () => void) => MaybePromise<void>
options{
    state?: TraverseState;
  }

Overrides

AsyncStream.forEach

forEachPure

undocumented

Definition

forEachPure<A extends readonly unknown[]>(f: (value: T, ...args: A) => MaybePromise<void>, ...args: A): Promise<void>;

Type parameters

NameConstraintsDescription
Areadonly unknown[]

Parameters

NameTypeDescription
f(value: T, ...args: A) => MaybePromise<void>
argsA

Overrides

AsyncStream.forEachPure

groupBy

undocumented

Definition

groupBy<K, R>(valueToKey: (value: T, index: number) => MaybePromise<K>, options?: {
    collector?: AsyncReducer.Accept<readonly [K, T], R> | undefined;
  }): Promise<R>;

Type parameters

NameDescription
K
R

Parameters

NameTypeDescription
valueToKey(value: T, index: number) => MaybePromise<K>
options{
    collector?: AsyncReducer.Accept<readonly [K, T], R> | undefined;
  }

Overrides

AsyncStream.groupBy

indexed

undocumented

Definition

indexed(options?: {
    startIndex?: number;
  }): AsyncStream<[number, T]>;

Parameters

NameTypeDescription
options{
    startIndex?: number;
  }

Overrides

AsyncStream.indexed

indexOf

undocumented

Definition

indexOf(searchValue: T, options?: {
    occurrance?: number | undefined;
    eq?: Eq<T> | undefined;
    negate?: boolean | undefined;
  }): Promise<number | undefined>;

Parameters

NameTypeDescription
searchValueT
options{
    occurrance?: number | undefined;
    eq?: Eq<T> | undefined;
    negate?: boolean | undefined;
  }

Overrides

AsyncStream.indexOf

indexWhere

undocumented

Definition

indexWhere(pred: (value: T, index: number) => MaybePromise<boolean>, options?: {
    occurrance?: number;
    negate?: boolean;
  }): Promise<number | undefined>;

Parameters

NameTypeDescription
pred(value: T, index: number) => MaybePromise<boolean>
options{
    occurrance?: number;
    negate?: boolean;
  }

Overrides

AsyncStream.indexWhere

indicesOf

undocumented

Definition

indicesOf(searchValue: T, options?: {
    eq?: Eq<T>;
    negate?: boolean;
  }): AsyncStream<number>;

Parameters

NameTypeDescription
searchValueT
options{
    eq?: Eq<T>;
    negate?: boolean;
  }

Overrides

AsyncStream.indicesOf

indicesWhere

undocumented

Definition

indicesWhere(pred: (value: T) => MaybePromise<boolean>, options?: {
    negate?: boolean;
  }): AsyncStream<number>;

Parameters

NameTypeDescription
pred(value: T) => MaybePromise<boolean>
options{
    negate?: boolean;
  }

Overrides

AsyncStream.indicesWhere

intersperse

undocumented

Definition

intersperse(sep: AsyncStreamSource<T>): AsyncStream<T>;

Parameters

NameTypeDescription
sepAsyncStreamSource<T>

Overrides

AsyncStream.intersperse

join

undocumented

Definition

join({ sep, start, end, valueToString, ifEmpty, }?: {
    sep?: string | undefined;
    start?: string | undefined;
    end?: string | undefined;
    valueToString?: StringConstructor | undefined;
    ifEmpty?: undefined;
  }): Promise<string>;

Parameters

NameTypeDescription
{ sep, start, end, valueToString, ifEmpty, }{
    sep?: string | undefined;
    start?: string | undefined;
    end?: string | undefined;
    valueToString?: StringConstructor | undefined;
    ifEmpty?: undefined;
  }

Overrides

AsyncStream.join

last

undocumented

Definition

last<O>(otherwise?: AsyncOptLazy<O>): Promise<T | O>;

Type parameters

NameDescription
O

Parameters

NameTypeDescription
otherwiseAsyncOptLazy<O>

Overrides

AsyncStream.last

map

undocumented

Definition

map<T2>(mapFun: (value: T, index: number) => MaybePromise<T2>): AsyncStream<T2>;

Type parameters

NameDescription
T2

Parameters

NameTypeDescription
mapFun(value: T, index: number) => MaybePromise<T2>

Overrides

AsyncStream.map

mapPure

undocumented

Definition

mapPure<T2, A extends readonly unknown[]>(mapFun: (value: T, ...args: A) => MaybePromise<T2>, ...args: A): AsyncStream<T2>;

Type parameters

NameConstraintsDescription
T2
Areadonly unknown[]

Parameters

NameTypeDescription
mapFun(value: T, ...args: A) => MaybePromise<T2>
argsA

Overrides

AsyncStream.mapPure

max

undocumented

Definition

max<O>(otherwise?: AsyncOptLazy<O>): Promise<T | O>;

Type parameters

NameDescription
O

Parameters

NameTypeDescription
otherwiseAsyncOptLazy<O>

Overrides

AsyncStream.max

maxBy

undocumented

Definition

maxBy<O>(compare: (v1: T, v2: T) => number, otherwise?: AsyncOptLazy<O>): Promise<T | O>;

Type parameters

NameDescription
O

Parameters

NameTypeDescription
compare(v1: T, v2: T) => number
otherwiseAsyncOptLazy<O>

Overrides

AsyncStream.maxBy

min

undocumented

Definition

min<O>(otherwise?: AsyncOptLazy<O>): Promise<T | O>;

Type parameters

NameDescription
O

Parameters

NameTypeDescription
otherwiseAsyncOptLazy<O>

Overrides

AsyncStream.min

minBy

undocumented

Definition

minBy<O>(compare: (v1: T, v2: T) => number, otherwise?: AsyncOptLazy<O>): Promise<T | O>;

Type parameters

NameDescription
O

Parameters

NameTypeDescription
compare(v1: T, v2: T) => number
otherwiseAsyncOptLazy<O>

Overrides

AsyncStream.minBy

mkGroup

undocumented

Definition

mkGroup({ sep, start, end, }?: {
    sep?: AsyncStreamSource<T>;
    start?: AsyncStreamSource<T>;
    end?: AsyncStreamSource<T>;
  }): any;

Parameters

NameTypeDescription
{ sep, start, end, }{
    sep?: AsyncStreamSource<T>;
    start?: AsyncStreamSource<T>;
    end?: AsyncStreamSource<T>;
  }

Overrides

AsyncStream.mkGroup

partition

undocumented

Definition

partition(pred: (value: T, index: number) => MaybePromise<boolean>, options?: {
    collectorTrue?: any;
    collectorFalse?: any;
  }): Promise<[any, any]>;

Parameters

NameTypeDescription
pred(value: T, index: number) => MaybePromise<boolean>
options{
    collectorTrue?: any;
    collectorFalse?: any;
  }

Overrides

AsyncStream.partition

prepend

undocumented

Definition

prepend(value: AsyncOptLazy<T>): AsyncStream.NonEmpty<T>;

Parameters

NameTypeDescription
valueAsyncOptLazy<T>

Overrides

AsyncStream.prepend

reduce

undocumented

Definition

reduce<const S extends AsyncReducer.CombineShape<T>>(shape: S & AsyncReducer.CombineShape<T>): Promise<AsyncReducer.CombineResult<S>>;

Type parameters

NameConstraintsDescription
SAsyncReducer.CombineShape<T>

Parameters

NameTypeDescription
shapeS & AsyncReducer.CombineShape<T>

Overrides

AsyncStream.reduce

reduceStream

undocumented

Definition

reduceStream<const S extends AsyncReducer.CombineShape<T>>(shape: S & AsyncReducer.CombineShape<T>): AsyncStream<AsyncReducer.CombineResult<S>>;

Type parameters

NameConstraintsDescription
SAsyncReducer.CombineShape<T>

Parameters

NameTypeDescription
shapeS & AsyncReducer.CombineShape<T>

Overrides

AsyncStream.reduceStream

repeat

undocumented

Definition

repeat(amount?: number): AsyncStream<T>;

Parameters

NameTypeDescription
amountnumber

Overrides

AsyncStream.repeat

single

undocumented

Definition

single<O>(otherwise?: AsyncOptLazy<O>): Promise<T | O>;

Type parameters

NameDescription
O

Parameters

NameTypeDescription
otherwiseAsyncOptLazy<O>

Overrides

AsyncStream.single

some

undocumented

Definition

some(pred: (value: T, index: number) => MaybePromise<boolean>, options?: {
    negate?: boolean;
  }): Promise<boolean>;

Parameters

NameTypeDescription
pred(value: T, index: number) => MaybePromise<boolean>
options{
    negate?: boolean;
  }

Overrides

AsyncStream.some

splitOn

undocumented

Definition

splitOn<R>(sepElem: T, options?: {
    eq?: Eq<T> | undefined;
    negate?: boolean | undefined;
    collector?: AsyncReducer.Accept<T, R> | undefined;
  }): AsyncStream<R>;

Type parameters

NameDescription
R

Parameters

NameTypeDescription
sepElemT
options{
    eq?: Eq<T> | undefined;
    negate?: boolean | undefined;
    collector?: AsyncReducer.Accept<T, R> | undefined;
  }

Overrides

AsyncStream.splitOn

splitOnSlice

undocumented

Definition

splitOnSlice<R>(sepSlice: AsyncStreamSource<T>, options?: {
    eq?: Eq<T> | undefined;
    collector?: AsyncReducer.Accept<T, R> | undefined;
  }): AsyncStream<R>;

Type parameters

NameDescription
R

Parameters

NameTypeDescription
sepSliceAsyncStreamSource<T>
options{
    eq?: Eq<T> | undefined;
    collector?: AsyncReducer.Accept<T, R> | undefined;
  }

Overrides

AsyncStream.splitOnSlice

splitWhere

undocumented

Definition

splitWhere<R>(pred: (value: T, index: number) => MaybePromise<boolean>, options?: {
    negate?: boolean | undefined;
    collector?: AsyncReducer.Accept<T, R> | undefined;
  }): AsyncStream<R>;

Type parameters

NameDescription
R

Parameters

NameTypeDescription
pred(value: T, index: number) => MaybePromise<boolean>
options{
    negate?: boolean | undefined;
    collector?: AsyncReducer.Accept<T, R> | undefined;
  }

Overrides

AsyncStream.splitWhere

take

undocumented

Definition

take(amount: number): AsyncStream<T>;

Parameters

NameTypeDescription
amountnumber

Overrides

AsyncStream.take

takeWhile

undocumented

Definition

takeWhile(pred: (value: T, index: number) => MaybePromise<boolean>, options?: {
    negate?: boolean;
  }): AsyncStream<T>;

Parameters

NameTypeDescription
pred(value: T, index: number) => MaybePromise<boolean>
options{
    negate?: boolean;
  }

Overrides

AsyncStream.takeWhile

toArray

undocumented

Definition

toArray(): Promise<T[]>;

Overrides

AsyncStream.toArray

toJSON

undocumented

Definition

toJSON(): Promise<ToJSON<T[], 'AsyncStream'>>;

Overrides

AsyncStream.toJSON

toString

undocumented

Definition

toString(): string;

Overrides

AsyncStream.toString

transform

undocumented

Definition

transform<R>(transformer: AsyncTransformer.Accept<T, R>): AsyncStream<R>;

Type parameters

NameDescription
R

Parameters

NameTypeDescription
transformerAsyncTransformer.Accept<T, R>

Overrides

AsyncStream.transform

window

undocumented

Definition

window<R>(windowSize: number, options?: {
    skipAmount?: number | undefined;
    collector?: AsyncReducer.Accept<T, R> | undefined;
  }): AsyncStream<R>;

Type parameters

NameDescription
R

Parameters

NameTypeDescription
windowSizenumber
options{
    skipAmount?: number | undefined;
    collector?: AsyncReducer.Accept<T, R> | undefined;
  }

Overrides

AsyncStream.window

withOnly

undocumented

Definition

withOnly<F extends T>(values: F[]): AsyncStream<F>;

Type parameters

NameConstraintsDescription
FT

Parameters

NameTypeDescription
valuesF[]

Overrides

AsyncStream.withOnly

without

undocumented

Definition

without<F extends T>(values: F[]): any;

Type parameters

NameConstraintsDescription
FT

Parameters

NameTypeDescription
valuesF[]

Overrides

AsyncStream.without