geninq
Version:
A JavaScript version of the Linq library for Generators
20 lines (19 loc) • 892 B
TypeScript
declare global {
interface Generator<T = unknown, TReturn = any, TNext = unknown> {
/**
* Concatenates two sequences.
* @param item The sequence to concatenate to the first sequence.
* @returns A Generator<T> that contains the concatenated elements of the two input sequences.
*/
concat(item: Generator<T, TNext, TReturn> | T[]): Generator<T, TNext, TReturn>;
}
interface AsyncGenerator<T = unknown, TReturn = any, TNext = unknown> {
/**
* Concatenates two sequences.
* @param item The sequence to concatenate to the first sequence.
* @returns An AsyncGenerator<T> that contains the concatenated elements of the two input sequences.
*/
concat(item: AsyncGenerator<T, TNext, TReturn> | Generator<T, TNext, TReturn> | T[]): AsyncGenerator<T, TNext, TReturn>;
}
}
export {};