nani
Version:
Better error handling for Node
20 lines (19 loc) • 526 B
TypeScript
/**
* Internal class that tracks state for the external `iterate` function.
*/
export declare class Iterator {
/**
* Stores Errors as we encounter them to avoid duplication.
*/
seenErrors: Set<Error>;
/**
* Constructs an Iterator.
*/
constructor();
/**
* Implements the external `iterate` function, using its instance to track
* state and avoid duplicate references.
* @param err - Error instance to iterate.
*/
iterate(err: Error): IterableIterator<Error>;
}