ix
Version:
The Interactive Extensions for JavaScript
19 lines (15 loc) • 546 B
text/typescript
import { AsyncIterableX } from '../../asynciterable/asynciterablex.js';
import { max } from '../../asynciterable/max.js';
import { ExtremaOptions } from '../../asynciterable/extremaoptions.js';
export async function maxProto<TSource, TResult = TSource>(
this: AsyncIterable<TSource>,
options?: ExtremaOptions<TSource, TResult>
): Promise<TResult> {
return max(this, options);
}
AsyncIterableX.prototype.max = maxProto;
declare module '../../asynciterable/asynciterablex' {
interface AsyncIterableX<T> {
max: typeof maxProto;
}
}