UNPKG

geninq

Version:

A JavaScript version of the Linq library for Generators

18 lines (17 loc) 507 B
declare global { interface Generator<T = unknown, TReturn = any, TNext = unknown> { /** * Converts the sequence into an array. * @returns The sequence as a type safe array */ array(): T[]; } interface AsyncGenerator<T = unknown, TReturn = any, TNext = unknown> { /** * Converts the sequence into an array. * @returns A promise of the sequence as a type safe array */ array(): Promise<T[]>; } } export {};