ICursor
Defined in: packages/data/src/cursor/icursor.ts:14
A stable position in a sequence, surviving across calls — the extra a plain
Iterator cannot offer, being single-pass, forward-only and positionless.
The interface guarantees only that valid reports the truth; it does not
promise that a cursor survives a mutation of the sequence it was obtained
from. Invalidation rules are documented per implementing class.
Extended by
Section titled “Extended by”Type Parameters
Section titled “Type Parameters”T extends DefinedValue = DefinedValue
The type of elements in the sequence. Anything except
undefined.
Properties
Section titled “Properties”
readonlyvalid:boolean
Defined in: packages/data/src/cursor/icursor.ts:16
False once moved past the end, or once its element was removed.
readonlyvalue:T|undefined
Defined in: packages/data/src/cursor/icursor.ts:19
The element at this position, undefined when not valid.
Methods
Section titled “Methods”advance()
Section titled “advance()”advance():
boolean
Defined in: packages/data/src/cursor/icursor.ts:26
Moves one position forward.
Returns
Section titled “Returns”boolean
false if that moved past the end.
clone()
Section titled “clone()”clone():
ICursor<T>
Defined in: packages/data/src/cursor/icursor.ts:29
An independent cursor at the same position.
Returns
Section titled “Returns”ICursor<T>