import { AsyncIterableX } from '../../asynciterable/asynciterablex.js'; import { max } from '../../asynciterable/max.js'; import { ExtremaOptions } from '../../asynciterable/extremaoptions.js'; export async function maxProto( this: AsyncIterable, options?: ExtremaOptions ): Promise { return max(this, options); } AsyncIterableX.prototype.max = maxProto; declare module '../../asynciterable/asynciterablex' { interface AsyncIterableX { max: typeof maxProto; } }