/** * @internal * @module sync-impl * */ import type { GeneratorOps } from "./types"; import { Enhancements } from "./enhancements"; type sync = 'sync'; /** * Utilities to create and use generators which can be manipulated in various ways. * * Most methods come both as instance (prototype) methods and as static methods. They * provide equivalent functionality, but the static methods allow use on `Iterator` and * `Iterable` objects without first converting to a generator. * * The [[EnhancedGenerator.enhance]] method will add additional instance methods to * an ordinary generator's prototype (a new prototype, **not** modifying any global prototype!). * It can also be used to convert `Iterator` and `Iterable` objects to [[EnhancedGenerator]]. * * For methods which return a EnhancedGenerator, care is take to propagate any `Generator.throw` * and `Generator.return` calls to any supplied generators, so they can properly terminate. * * The exception is [[EnhancedGenerator.flat]] (and by extension, [[EnhancedGenerator.flatMap]]), which cannot know what nested generators * they might encounter in the future. Any generators encountered so far will be terminated, however. * * @typeParam T the type of values returned in the iteration result. * @typeParam TReturn the type of values returned in the iteration result when the generator terminates * @typeParam TNext the type of value which can be passed to `.next(val)`. */ export declare abstract class EnhancedGenerator extends Enhancements implements Generator, Iterable, Iterator { abstract [Symbol.toStringTag]: 'EnhancedGenerator'; } /** * Factory for synchronous generator operators. See [[GeneratorOps]] for details. * @internal */ export declare const impl: GeneratorOps; export {}; //# sourceMappingURL=sync-impl.d.ts.map