1
0
This commit is contained in:
2026-04-06 18:45:31 +02:00
parent 31c0757780
commit ae5305f3c6
6 changed files with 39 additions and 13 deletions

View File

@@ -918,19 +918,19 @@ export class DelegatedAsyncSequence<TElement> extends AsyncSequenceMarker implem
return this.#sequence.boundsBy(selector, comparer);
}
order(comparer?: MaybeAsyncComparisonOrComparer<TElement> | undefined): AsyncSequence<TElement> {
order(comparer?: MaybeAsyncComparisonOrComparer<TElement> | undefined): OrderedAsyncSequence<TElement> {
return this.#sequence.order(comparer);
}
orderBy<TBy>(selector: MaybeAsyncConverter<TElement, TBy>, comparer?: MaybeAsyncComparisonOrComparer<TBy> | undefined): AsyncSequence<TElement> {
orderBy<TBy>(selector: MaybeAsyncConverter<TElement, TBy>, comparer?: MaybeAsyncComparisonOrComparer<TBy> | undefined): OrderedAsyncSequence<TElement> {
return this.#sequence.orderBy(selector, comparer);
}
orderDescending(comparer?: MaybeAsyncComparisonOrComparer<TElement> | undefined): AsyncSequence<TElement> {
orderDescending(comparer?: MaybeAsyncComparisonOrComparer<TElement> | undefined): OrderedAsyncSequence<TElement> {
return this.#sequence.orderDescending(comparer);
}
orderByDescending<TBy>(selector: MaybeAsyncConverter<TElement, TBy>, comparer?: MaybeAsyncComparisonOrComparer<TBy> | undefined): AsyncSequence<TElement> {
orderByDescending<TBy>(selector: MaybeAsyncConverter<TElement, TBy>, comparer?: MaybeAsyncComparisonOrComparer<TBy> | undefined): OrderedAsyncSequence<TElement> {
return this.#sequence.orderByDescending(selector, comparer);
}
@@ -1241,6 +1241,20 @@ export class WrappedObjectAsync<T> extends BaseAsyncSequence<T> {
}
}
export class WrappedPromise<T> extends BaseAsyncSequence<T> {
readonly #promise: Promise<MaybeAsyncIterable<T>>;
constructor(promise: Promise<MaybeAsyncIterable<T>>) {
super();
this.#promise = promise;
}
override async *iterator() {
yield* await this.#promise;
}
}
export class WrappedArrayAsync<T> extends BaseAsyncSequence<T> {
readonly #array: ReadonlyArray<MaybePromiseLike<T>>;