Visit plain records sequentially, parent before children, awaiting each visitor.
Arrays, including nested arrays, are containers; primitives and opaque objects
are ignored. Record children are selected from own array-valued properties.
A shared record is visited at each occurrence; cycles on the active traversal
path reject with TypeError. This helper does not copy or mutate input, though
the visitor may mutate its records. Visitor failures reject immediately.
Type Parameters
Textendsobject = Record<string,unknown>
TContext = undefined
Parameters
input: unknown
A record or an arbitrarily nested array of records.
Visit plain records sequentially, parent before children, awaiting each visitor.
Arrays, including nested arrays, are containers; primitives and opaque objects are ignored. Record children are selected from own array-valued properties. A shared record is visited at each occurrence; cycles on the active traversal path reject with TypeError. This helper does not copy or mutate input, though the visitor may mutate its records. Visitor failures reject immediately.